fix(crds): remove status blocks from templates to fix helm install #152
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.
Fixes #151
Problem
Helm install fails with "got unexpected nil transformer" on Kubernetes 1.25+ due to empty status blocks in CRD templates. The empty
acceptedNames.kindandacceptedNames.pluralfields cause nil pointer errors during Helm's 3-way merge.Solution
Removed explicit status blocks from all 27 CRD templates in
charts/crds/templates/. Status fields are server-managed and should not be in templates. The Kubernetes API server generates them automatically after CRD validation.Changes
status:blocks containing emptyacceptedNames,conditions, andstoredVersionsspec.versions[].subresources.status: {}declarations (required for CRD functionality)Testing
Tested on Kubernetes v1.32 with Helm v3:
Installation
helm install sveltos-crdssucceeds (previously failed)helm upgrade sveltos-crdsworks correctlysveltos-crdsandprojectsveltosVerification
acceptedNames,conditions, andstoredVersionsauto-generated with correct valuesBackward Compatibility
helm template | kubectl apply) still workskubectl apply --dry-run=servervalidation unchangedThe original error is resolved. Helm install now works without workarounds.