-
Notifications
You must be signed in to change notification settings - Fork 12
fix: convert one-time jobs to Helm hooks to prevent ArgoCD OutOfSync #899
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
fffe770
d32537a
41bcd83
b76d609
ee17e79
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,6 +9,8 @@ metadata: | |
| .Values.defaults.annotations | ||
| .Values.components.miscellaneous.configLoader.annotations | ||
| (dict "checksum/values" (include "cloudzero-agent.configurationChecksum" .)) | ||
| (dict "helm.sh/hook" "pre-install,pre-upgrade") | ||
| (dict "helm.sh/hook-delete-policy" "before-hook-creation") | ||
|
Comment on lines
+12
to
+13
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When an upgrade changes values represented in the agent, validator, helmless, webhook, or aggregator ConfigMaps, this pre-upgrade hook runs before Helm applies the new ordinary manifests. It therefore loads and validates the previous revision's configuration, causing the deployed revision and the configuration sent to CloudZero to disagree until a later successful run. Prompt To Fix With AIThis is a comment left during a code review.
Path: helm/templates/config-loader-job.yaml
Line: 12-13
Comment:
**Pre-upgrade hook reads stale configuration**
When an upgrade changes values represented in the agent, validator, helmless, webhook, or aggregator ConfigMaps, this pre-upgrade hook runs before Helm applies the new ordinary manifests. It therefore loads and validates the previous revision's configuration, causing the deployed revision and the configuration sent to CloudZero to disagree until a later successful run.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly. |
||
| ) | ||
| ) | nindent 2 }} | ||
| {{- include "cloudzero-agent.generateLabels" (dict | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On a fresh installation, Helm runs these pre-install Jobs before creating their ordinary ConfigMaps, service accounts, Secrets, and RBAC resources. The config-loader and helmless hooks are always rendered, so their pods cannot start and the installation blocks before the required release resources are created.
Prompt To Fix With AI