Skip to content

Commit

Permalink
[Feature] 3.10 Rotation Prevention (#1499)
Browse files Browse the repository at this point in the history
  • Loading branch information
ajanikow authored Nov 22, 2023
1 parent 5859f0b commit 5a7d305
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/deployment/rotation/arangod_containers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
5 changes: 5 additions & 0 deletions pkg/deployment/rotation/arangod_probes.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 5a7d305

Please sign in to comment.