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

Handle nil input during transform #560

Closed
twz123 opened this issue Nov 20, 2018 · 2 comments
Closed

Handle nil input during transform #560

twz123 opened this issue Nov 20, 2018 · 2 comments
Assignees

Comments

@twz123
Copy link
Contributor

twz123 commented Nov 20, 2018

When kustomizing manifests that specify nil objects that are subject to transformers, kustomize errors out with Error: <nil> is not expected to be a primitive type.

This happens for me if I try to kustomize certain pre-rendered helm charts from charts/stable using helm template. It seems that there are a few charts that e.g. specify env or annotations and so on via values.yaml. If leaving those values empty in the values, those fields get rendered "empty" as env: or annotations:. While it's debatable if that's good practice (in contrast to just skip those fields completely in the chart if they're empty), it seems that those manifests are happily accepted by the API server. Hence I'd like to be able to kustomize them as is.

Workaround is to use some dummy values in the chart's values, so that they're not empty anymore.

@monopole
Copy link
Contributor

Which version of kustomize?

Or rather - can you repo this with head?

@monopole
Copy link
Contributor

Nvmd, see the problem.

@monopole monopole self-assigned this Nov 27, 2018
monopole added a commit to monopole/kustomize that referenced this issue Nov 28, 2018
monopole added a commit to monopole/kustomize that referenced this issue Nov 29, 2018
tomaszkiewicz pushed a commit to tomaszkiewicz/kustomize that referenced this issue Dec 4, 2018
tomaszkiewicz pushed a commit to tomaszkiewicz/kustomize that referenced this issue Dec 4, 2018
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