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:
parent
5859f0b896
commit
5a7d305fca
2 changed files with 9 additions and 0 deletions
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue