cilium-dbg: Add preflight checker for cilium-configmap#43025
cilium-dbg: Add preflight checker for cilium-configmap#43025gandro merged 1 commit intocilium:mainfrom
Conversation
|
It’s probably not the user’s job to do preflight checks. Instead, |
There was a problem hiding this comment.
This is on the way towards what we need here but at least two significant changes are needed:
- Rather than check a
.yamlfile, this needs to grab the Cilium config (ConfigMap) from the current cluster, and check its contents.cilium-dbgis the CLI which is available in all running Cilium pods, such as those used by thepreflight.enabledDeploymet. - An invocation of this command needs to be added to the Cilium preflight Deployment Helm template, with the appropriate exit status upon failure.
See https://github.com/cilium/cilium/blob/main/install/kubernetes/cilium/templates/cilium-preflight/deployment.yaml#L52 for the example of cilium-dbg preflight validate-cnp and it's related implementation.
|
Commit 48f86b3 does not match "(?m)^Signed-off-by:". Please follow instructions provided in https://docs.cilium.io/en/stable/contributing/development/contributing_guide/#developer-s-certificate-of-origin |
|
Commits 48f86b3, 954ad2e do not match "(?m)^Signed-off-by:". Please follow instructions provided in https://docs.cilium.io/en/stable/contributing/development/contributing_guide/#developer-s-certificate-of-origin |
954ad2e to
77006e8
Compare
|
Commit 48f86b3 does not match "(?m)^Signed-off-by:". Please follow instructions provided in https://docs.cilium.io/en/stable/contributing/development/contributing_guide/#developer-s-certificate-of-origin |
|
Commit 48f86b3 does not match "(?m)^Signed-off-by:". Please follow instructions provided in https://docs.cilium.io/en/stable/contributing/development/contributing_guide/#developer-s-certificate-of-origin |
c5a34c3 to
be3deb3
Compare
Hi @asauber Thanks for the feedback! |
1222e39 to
205c589
Compare
|
/test |
asauber
left a comment
There was a problem hiding this comment.
Implementation LGTM. Let's check if the preflight tests pass.
|
/test |
9363dfd to
c32a13d
Compare
|
Build seems broken
|
c32a13d to
7bac54a
Compare
Thanks for pointing this out. I've pushed a fix and the CI is now green. |
|
Thanks. Please don't forget to squash your commits again |
7bac54a to
2b5af6d
Compare
|
/test |
0e7d0e7 to
718e129
Compare
|
/test |
|
The Most This appears to be similar to #43787. |
Introduce a new validate-configmap subcommand under cilium-dbg preflight. Also update the Helm chart to enable the validator and improve error readability. Signed-off-by: andy176631 <andy17663@gmail.com>
718e129 to
329f55f
Compare
|
Please note that pushing to the branch invalidates the test result (thus making the PR unmergable). Unless there's something to fix, I recommend not pushing to the branch. |
|
Understood. I now have a better understanding of the timing around rebasing and pushing. Thanks for the guidance! |
|
/test |
|
Thanks to gandro, asauber, and squeed for the guidance in helping me complete my first PR! |
Description
When upgrading Cilium, the user may introduce unrecognized keys in Cilium config (
ConfigMap) due to:Such upgrades are likely to succeed initially, but may later fail in connectivity tests or cause issues in production environments.
This PR adds a validator in
cilium-dbg preflightthat validates the Cilium config (ConfigMap) in a live cluster environment before an upgrade. This ensures that all configuration keys are recognized by both the new versions of thedaemonand theoperator, allowing users to review any unrecognized keys and evaluate their potential impact on the system.The
cilium-dbg preflightcommand runs in a Deployment created in the running cluster.Fixes: #42781