initialising/updating crds do not inherit chart labels when running helmify against the kustomize build example
fire-ant opened this issue · comments
Helmify version: 0.3.15
example chart: https://github.com/fire-ant/consulkv-operator
instructions:
clone the example chart and run 'make helm'. the output returns a diff where the labels will not render.
expected result:
the go template instruction remains unchanged and is inserted into the labels field of the crd.yaml.
actual result:
helmify should render the labels for the crd in 'crds/'
Due to how crds are templated it appears that the labels line of the crd needs to be affixed to include from the _helpers inside the templates directory, alternatively it may be better to handle this templating inside the logic of helmify itself (Im a little unsure of which is better and why)
Just tried it out and it looks ok. CRD contains the same labels as in kustomize build config/default
output.
Try:
- add any labels to crd
- generate chart
kustomize build config/default | helmify -crd-dir consulkv-operator-helm
- render chart templates
helm template ./consulkv-operator-helm
- compare with original
kustomize build config/default
output
For me it looks ok, all original labels are in place + app labels generated by helm.
poor description that the 'lack of labels' caused the unrendered templating to be passed through, thanks for the fix!