Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
eea2092
pkg/cvo/sync_worker: Generalize CancelError to ContextError
wking May 28, 2020
adf8fd6
pkg/cvo/sync_worker: Do not treat "All errors were context errors..."…
wking May 28, 2020
99f6ba5
Merge pull request #378 from openshift-cherrypick-robot/cherry-pick-3…
openshift-merge-robot Jun 3, 2020
202578a
Expand supported set of probe field mutations
ironcladlou Jun 15, 2020
40ec7e4
Merge pull request #389 from openshift-cherrypick-robot/cherry-pick-3…
openshift-merge-robot Jun 19, 2020
2326bcc
Bug 1855577: Updating the golang.org/x/text version to v0.3.3
LalatenduMohanty Jul 14, 2020
dc662b7
pkg/cvo: Set NoDesiredImage reason when desired.Image is empty
wking May 27, 2020
f00e20f
pkg/cvo/status: Raise Operator leveling grace-period to 20 minutes
wking Jul 31, 2020
b0f92e5
Merge pull request #427 from wking/raise-operator-leveling-timeout-4.5
openshift-merge-robot Aug 19, 2020
9713dc5
Merge pull request #409 from openshift-cherrypick-robot/cherry-pick-4…
openshift-merge-robot Aug 20, 2020
55ff603
pkg/start: Drop the internal EnableMetrics
wking Apr 15, 2020
d257c32
pkg/cvo/metrics: Graceful server shutdown
wking Apr 15, 2020
f8774c0
pkg/start: Register metrics directly
wking Apr 15, 2020
d8ca134
pkg/cvo/egress: Pull HTTPS/Proxy egress into separate file
wking Apr 21, 2020
905b305
pkg/start: Release leader lease on graceful shutdown
wking Aug 3, 2020
c8af639
pkg/start/start_integration_test: Do not assume "deleted" for ConfigM…
wking Aug 5, 2020
c8f99b2
pkg/start: Fill in deferred HandleCrash
wking Aug 6, 2020
a42bfb7
cmd/start: Include the version in the outgoing log line
wking Aug 25, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Expand supported set of probe field mutations
Before this change, only the initialDelaySeconds field of probes could be
updated. This patch expands the set of supported fields to include all the
other int32 fields of probes so that CVO will roll out such changes.
  • Loading branch information
ironcladlou authored and openshift-cherrypick-robot committed Jun 18, 2020
commit 202578a52b06b6155d35f954eedef12f24b3fef8
4 changes: 4 additions & 0 deletions lib/resourcemerge/core.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,10 @@ func ensureProbePtr(modified *bool, existing **corev1.Probe, required *corev1.Pr

func ensureProbe(modified *bool, existing *corev1.Probe, required corev1.Probe) {
setInt32(modified, &existing.InitialDelaySeconds, required.InitialDelaySeconds)
setInt32(modified, &existing.TimeoutSeconds, required.TimeoutSeconds)
setInt32(modified, &existing.PeriodSeconds, required.PeriodSeconds)
setInt32(modified, &existing.SuccessThreshold, required.SuccessThreshold)
setInt32(modified, &existing.FailureThreshold, required.FailureThreshold)

ensureProbeHandler(modified, &existing.Handler, required.Handler)
}
Expand Down
92 changes: 92 additions & 0 deletions lib/resourcemerge/core_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,98 @@ func TestEnsurePodSpec(t *testing.T) {
},
},
},
{
name: "modify container readiness probe",
existing: corev1.PodSpec{
Containers: []corev1.Container{
{
Name: "test",
ReadinessProbe: &corev1.Probe{
InitialDelaySeconds: 1,
TimeoutSeconds: 2,
PeriodSeconds: 3,
SuccessThreshold: 4,
FailureThreshold: 5,
},
},
},
},
input: corev1.PodSpec{
Containers: []corev1.Container{
{
Name: "test",
ReadinessProbe: &corev1.Probe{
InitialDelaySeconds: 7,
TimeoutSeconds: 8,
PeriodSeconds: 9,
SuccessThreshold: 10,
FailureThreshold: 11,
},
},
},
},
expectedModified: true,
expected: corev1.PodSpec{
Containers: []corev1.Container{
{
Name: "test",
ReadinessProbe: &corev1.Probe{
InitialDelaySeconds: 7,
TimeoutSeconds: 8,
PeriodSeconds: 9,
SuccessThreshold: 10,
FailureThreshold: 11,
},
},
},
},
},
{
name: "modify container liveness probe",
existing: corev1.PodSpec{
Containers: []corev1.Container{
{
Name: "test",
LivenessProbe: &corev1.Probe{
InitialDelaySeconds: 1,
TimeoutSeconds: 2,
PeriodSeconds: 3,
SuccessThreshold: 4,
FailureThreshold: 5,
},
},
},
},
input: corev1.PodSpec{
Containers: []corev1.Container{
{
Name: "test",
LivenessProbe: &corev1.Probe{
InitialDelaySeconds: 7,
TimeoutSeconds: 8,
PeriodSeconds: 9,
SuccessThreshold: 10,
FailureThreshold: 11,
},
},
},
},
expectedModified: true,
expected: corev1.PodSpec{
Containers: []corev1.Container{
{
Name: "test",
LivenessProbe: &corev1.Probe{
InitialDelaySeconds: 7,
TimeoutSeconds: 8,
PeriodSeconds: 9,
SuccessThreshold: 10,
FailureThreshold: 11,
},
},
},
},
},
}

for _, test := range tests {
Expand Down