@@ -289,13 +289,21 @@ func podNeedsRotation(p v1.Pod, apiObject metav1.Object, spec api.DeploymentSpec
289
289
}*/
290
290
291
291
// Check service account
292
- if p .Spec .ServiceAccountName != groupSpec .GetServiceAccountName () {
292
+ if normalizeServiceAccountName ( p .Spec .ServiceAccountName ) != normalizeServiceAccountName ( groupSpec .GetServiceAccountName () ) {
293
293
return true , "ServiceAccountName changed"
294
294
}
295
295
296
296
return false , ""
297
297
}
298
298
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
+
299
307
// tlsKeyfileNeedsRenewal decides if the certificate in the given keyfile
300
308
// should be renewed.
301
309
func tlsKeyfileNeedsRenewal (log zerolog.Logger , keyfile string ) bool {
@@ -374,6 +382,7 @@ func createRotateMemberPlan(log zerolog.Logger, member api.MemberStatus,
374
382
log .Debug ().
375
383
Str ("id" , member .ID ).
376
384
Str ("role" , group .AsRole ()).
385
+ Str ("reason" , reason ).
377
386
Msg ("Creating rotation plan" )
378
387
plan := api.Plan {
379
388
api .NewAction (api .ActionTypeRotateMember , group , member .ID , reason ),
@@ -389,6 +398,7 @@ func createUpgradeMemberPlan(log zerolog.Logger, member api.MemberStatus,
389
398
log .Debug ().
390
399
Str ("id" , member .ID ).
391
400
Str ("role" , group .AsRole ()).
401
+ Str ("reason" , reason ).
392
402
Msg ("Creating upgrade plan" )
393
403
plan := api.Plan {
394
404
api .NewAction (api .ActionTypeUpgradeMember , group , member .ID , reason ),
0 commit comments