fix(shield): add startupProbe to cluster-shield deployment#2589
Closed
juan-rodriguez-gracia wants to merge 1 commit intosysdiglabs:mainfrom
Closed
fix(shield): add startupProbe to cluster-shield deployment#2589juan-rodriguez-gracia wants to merge 1 commit intosysdiglabs:mainfrom
juan-rodriguez-gracia wants to merge 1 commit intosysdiglabs:mainfrom
Conversation
Cluster-shield currently has only a liveness probe with a ~50s budget (initialDelaySeconds=5, periodSeconds=5, failureThreshold=9). On slow or noisy clusters (observed on GKE with Windows node pools) the /healthz endpoint can take longer than 50s to become responsive during CVM warmup, causing the kubelet to kill the container with exit 1067 and restart it. The test that asserts zero restarts then fails. Add a startupProbe with a ~5 minute budget (failureThreshold=30, periodSeconds=10) so the liveness probe is suspended during warmup and only takes over once the container has reported healthy at least once. Steady-state liveness/readiness behaviour is unchanged.
Contributor
|
Hi @juan-rodriguez-gracia. Thanks for your PR. After inspecting your changes someone with write access to this repo needs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Cluster-shield currently has only a liveness probe with a ~50s budget (
initialDelaySeconds=5, periodSeconds=5, failureThreshold=9). On slow or noisy clusters the/healthzendpoint can take longer than 50s to become responsive during CVM warmup, causing the kubelet to kill the container with exit code 1067 and restart it.This PR adds a
startupProbewith a ~5 minute budget so the liveness probe is suspended during warmup and only takes over once the container has reported healthy at least once. Steady-state liveness/readiness behaviour is unchanged.Motivation
Observed on QA build Kubelet events from the failing pod:
Pod
lastState.terminated.exitCode: 1067, reasonError. The pod recovers on restart — this is startup latency, not a steady-state bug.What changed
charts/shield/values.yaml: newcluster.probes.startupsection with default budget of ~5 min (initialDelay=15, period=10, failureThreshold=30, timeout=3).charts/shield/templates/cluster/deployment.yaml: renderstartupProbebeforelivenessProbewhencluster.probes.startupis set. Theifguard lets users disable the startup probe by settingcluster.probes.startup: null.charts/shield/tests/cluster/deployment_test.yaml: three new cases — default startup probe, custom overrides, and explicit disable.charts/shield/Chart.yaml: bump1.34.5 → 1.34.6.Test plan
helm unittest charts/shield→ 79/79 pass locallyhelm lint charts/shield -f charts/shield/ci/test-values.yamlcleanhelm template ... -f ci/test-values.yamlrenders the expectedstartupProbeblockqa/QA-shield/cluster/gke-windows-2019-x86_64to confirm no cluster-shield restartsNotes / Trade-offs
/healthzstability; a shorter budget would still risk flakes on noisy clusters.cluster.probes.startup: nullpreserves the current behaviour for users who want to override it.failureThreshold/initialDelaySecondson the liveness probe itself, but that weakens steady-state liveness semantics. A dedicated startupProbe is the minimal-blast-radius option.Related
test_cluster_shield_pods_no_restarts