1
0
Fork 0
mirror of https://github.com/arangodb/kube-arangodb.git synced 2024-12-15 17:51:03 +00:00

[Feature] 3.10 Rotation Prevention (#1499)

This commit is contained in:
Adam Janikowski 2023-11-22 10:55:47 +01:00 committed by GitHub
parent 5859f0b896
commit 5a7d305fca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

View file

@ -258,6 +258,10 @@ func areProbesEqual(a, b *core.Probe) bool {
}
func isManagedProbe(a, b *core.Probe) bool {
if a == nil || b == nil {
return false
}
if a.Exec == nil || b.Exec == nil {
return false
}

View file

@ -50,6 +50,11 @@ func compareServerContainerProbes(ds api.DeploymentSpec, g api.ServerGroup, spec
if !areProbesEqual(spec.LivenessProbe, status.LivenessProbe) {
if isManagedProbe(spec.LivenessProbe, status.LivenessProbe) {
if spec.LivenessProbe.FailureThreshold != status.LivenessProbe.FailureThreshold {
status.LivenessProbe.FailureThreshold = spec.LivenessProbe.FailureThreshold
mode = mode.And(compare.SilentRotation)
}
q := status.LivenessProbe.DeepCopy()
q.Exec = spec.LivenessProbe.Exec.DeepCopy()