feat: fix and improve ConfigMap and CR deployment#59
Merged
mchmarny merged 3 commits intoNVIDIA:mainfrom Feb 5, 2026
Merged
Conversation
Coverage Report ✅
Coverage BadgeNo Go source files changed in this PR. |
This commit addresses three issues with the Helm umbrella chart generation:
1. Fix ConfigMaps incorrectly placed in post-install directory
- ConfigMaps (dcgm-exporter.yaml, kernel-module-params.yaml) are standard
K8s resources that should be deployed during helm install
- Added isCRDDependentResource() to distinguish between standard K8s
resources and Custom Resources based on apiVersion
- Standard resources now go to templates/, CRs get Helm hooks
2. Use Helm hooks for CRD-dependent resources instead of post-install
- Replaced the separate post-install/ directory approach with Helm
post-install/post-upgrade hooks
- Added addHelmHookAnnotation() to inject hook annotations into CRs
- This enables single-step deployment compatible with GitOps (ArgoCD/Flux),
CI/CD pipelines, and standard Helm workflows
- Removed processManifestForKubectl() as it's no longer needed
3. Clean up old CRs before helm install/upgrade
- Added helm.sh/hook-delete-policy: before-hook-creation annotation
- Ensures old CRs are deleted before new ones are created during upgrades
- Provides idempotent deployments with fresh CR state on each upgrade
Also fixes documentation:
- Updated docs/architecture/component.md to remove kubectl apply post-install
- Fixed make dev -> make dev-env typo
a8d07d1 to
7f8b013
Compare
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.
Summary
This PR addresses three issues with the Helm umbrella chart generation for ConfigMap and CRD-dependent resources:
Fix ConfigMaps incorrectly placed in post-install directory
helm install, not via separatekubectl applyisCRDDependentResource()to distinguish between standard K8s resources (v1, apps/v1, etc.) and Custom Resources based on apiVersiontemplates/, only CRs get Helm hooksUse Helm hooks for CRD-dependent resources instead of post-install
post-install/directory approach with Helmpost-install,post-upgradehooksaddHelmHookAnnotation()to inject hook annotations into CRsprocessManifestForKubectl()as it's no longer neededClean up old CRs before helm install/upgrade
helm.sh/hook-delete-policy: before-hook-creationannotationAlso fixes documentation in
docs/architecture/component.md:kubectl apply -f post-install/stepmake dev->make dev-envtypoTest plan
make test- all tests passmake lint- no issuestemplates/and CRs have hook annotationshelm installworks