mirror of
https://github.com/arangodb/kube-arangodb.git
synced 2024-12-15 17:51:03 +00:00
Merge branch 'master' into feature/plan-action-timeout
This commit is contained in:
commit
705c3c74b5
2 changed files with 16 additions and 1 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,4 +1,5 @@
|
|||
.DS_Store
|
||||
.envrc
|
||||
.gobuild
|
||||
bin
|
||||
logs
|
||||
|
|
|
@ -289,13 +289,21 @@ func podNeedsRotation(p v1.Pod, apiObject metav1.Object, spec api.DeploymentSpec
|
|||
}*/
|
||||
|
||||
// Check service account
|
||||
if p.Spec.ServiceAccountName != groupSpec.GetServiceAccountName() {
|
||||
if normalizeServiceAccountName(p.Spec.ServiceAccountName) != normalizeServiceAccountName(groupSpec.GetServiceAccountName()) {
|
||||
return true, "ServiceAccountName changed"
|
||||
}
|
||||
|
||||
return false, ""
|
||||
}
|
||||
|
||||
// normalizeServiceAccountName replaces default with empty string, otherwise returns the input.
|
||||
func normalizeServiceAccountName(name string) string {
|
||||
if name == "default" {
|
||||
return ""
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// tlsKeyfileNeedsRenewal decides if the certificate in the given keyfile
|
||||
// should be renewed.
|
||||
func tlsKeyfileNeedsRenewal(log zerolog.Logger, keyfile string) bool {
|
||||
|
@ -344,6 +352,8 @@ func createScalePlan(log zerolog.Logger, members api.MemberStatusList, group api
|
|||
plan = append(plan, api.NewAction(api.ActionTypeAddMember, group, ""))
|
||||
}
|
||||
log.Debug().
|
||||
Int("count", count).
|
||||
Int("actual-count", len(members)).
|
||||
Int("delta", toAdd).
|
||||
Str("role", group.AsRole()).
|
||||
Msg("Creating scale-up plan")
|
||||
|
@ -360,6 +370,8 @@ func createScalePlan(log zerolog.Logger, members api.MemberStatusList, group api
|
|||
api.NewAction(api.ActionTypeRemoveMember, group, m.ID),
|
||||
)
|
||||
log.Debug().
|
||||
Int("count", count).
|
||||
Int("actual-count", len(members)).
|
||||
Str("role", group.AsRole()).
|
||||
Msg("Creating scale-down plan")
|
||||
}
|
||||
|
@ -374,6 +386,7 @@ func createRotateMemberPlan(log zerolog.Logger, member api.MemberStatus,
|
|||
log.Debug().
|
||||
Str("id", member.ID).
|
||||
Str("role", group.AsRole()).
|
||||
Str("reason", reason).
|
||||
Msg("Creating rotation plan")
|
||||
plan := api.Plan{
|
||||
api.NewAction(api.ActionTypeRotateMember, group, member.ID, reason),
|
||||
|
@ -389,6 +402,7 @@ func createUpgradeMemberPlan(log zerolog.Logger, member api.MemberStatus,
|
|||
log.Debug().
|
||||
Str("id", member.ID).
|
||||
Str("role", group.AsRole()).
|
||||
Str("reason", reason).
|
||||
Msg("Creating upgrade plan")
|
||||
plan := api.Plan{
|
||||
api.NewAction(api.ActionTypeUpgradeMember, group, member.ID, reason),
|
||||
|
|
Loading…
Reference in a new issue