@@ -289,13 +289,21 @@ func podNeedsRotation(p v1.Pod, apiObject metav1.Object, spec api.DeploymentSpec
289289 }*/
290290
291291 // Check service account
292- if p .Spec .ServiceAccountName != groupSpec .GetServiceAccountName () {
292+ if normalizeServiceAccountName ( p .Spec .ServiceAccountName ) != normalizeServiceAccountName ( groupSpec .GetServiceAccountName () ) {
293293 return true , "ServiceAccountName changed"
294294 }
295295
296296 return false , ""
297297}
298298
299+ // normalizeServiceAccountName replaces default with empty string, otherwise returns the input.
300+ func normalizeServiceAccountName (name string ) string {
301+ if name == "default" {
302+ return ""
303+ }
304+ return ""
305+ }
306+
299307// tlsKeyfileNeedsRenewal decides if the certificate in the given keyfile
300308// should be renewed.
301309func tlsKeyfileNeedsRenewal (log zerolog.Logger , keyfile string ) bool {
@@ -344,6 +352,8 @@ func createScalePlan(log zerolog.Logger, members api.MemberStatusList, group api
344352 plan = append (plan , api .NewAction (api .ActionTypeAddMember , group , "" ))
345353 }
346354 log .Debug ().
355+ Int ("count" , count ).
356+ Int ("actual-count" , len (members )).
347357 Int ("delta" , toAdd ).
348358 Str ("role" , group .AsRole ()).
349359 Msg ("Creating scale-up plan" )
@@ -360,6 +370,8 @@ func createScalePlan(log zerolog.Logger, members api.MemberStatusList, group api
360370 api .NewAction (api .ActionTypeRemoveMember , group , m .ID ),
361371 )
362372 log .Debug ().
373+ Int ("count" , count ).
374+ Int ("actual-count" , len (members )).
363375 Str ("role" , group .AsRole ()).
364376 Msg ("Creating scale-down plan" )
365377 }
@@ -374,6 +386,7 @@ func createRotateMemberPlan(log zerolog.Logger, member api.MemberStatus,
374386 log .Debug ().
375387 Str ("id" , member .ID ).
376388 Str ("role" , group .AsRole ()).
389+ Str ("reason" , reason ).
377390 Msg ("Creating rotation plan" )
378391 plan := api.Plan {
379392 api .NewAction (api .ActionTypeRotateMember , group , member .ID , reason ),
@@ -389,6 +402,7 @@ func createUpgradeMemberPlan(log zerolog.Logger, member api.MemberStatus,
389402 log .Debug ().
390403 Str ("id" , member .ID ).
391404 Str ("role" , group .AsRole ()).
405+ Str ("reason" , reason ).
392406 Msg ("Creating upgrade plan" )
393407 plan := api.Plan {
394408 api .NewAction (api .ActionTypeUpgradeMember , group , member .ID , reason ),
0 commit comments