Skip to content
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

initialising/updating crds do not inherit chart labels when running helmify against the kustomize build example #48

Closed
fire-ant opened this issue Jul 8, 2022 · 3 comments

Comments

@fire-ant
Copy link
Contributor

fire-ant commented Jul 8, 2022

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)

@fire-ant fire-ant changed the title upgrading crds do not inherit chart labels initialising/updating crds do not inherit chart labels when running helmify against the kustomize build example Jul 8, 2022
@arttor
Copy link
Owner

arttor commented Jul 8, 2022

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.

@arttor
Copy link
Owner

arttor commented Jul 10, 2022

fixed in v0.3.17

@arttor arttor closed this as completed Jul 10, 2022
@fire-ant
Copy link
Contributor Author

poor description that the 'lack of labels' caused the unrendered templating to be passed through, thanks for the fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants