-
Notifications
You must be signed in to change notification settings - Fork 188
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
Run ENV Substitution if empty substituted #388
Comments
We can't enable var substitution by default, it needs to be opt-in (defined now as having at least one var). The reason for this is that envsub replaces all vars without a default with string empty and it has the potential to break scripts embedded in configmap and other objects. |
Yeah i get that point, but shouldn't such resources, which might have such expressions in them disabled substitution (aka
I guess that works for me, if there's no interest in this change. |
@oliverbaehler I would welcome a PR to the docs here that explains the current behaviour with your example on how to enable substitutions for default values. |
Hi
I was playing around with variable substitutions. I made heavy use of defaulting mechanisms. Till I noticed, that defaults are not evaluated, when the owning Kustomization does not have any variables substituted. In fact no expression is evaluated. Looking at the code, this condition causes this:
kustomize-controller/controllers/kustomization_varsub.go
Line 75 in 80ebb79
I am not quiet sure if this is on purpose but the expected behavior for me would be if i have a default expression, it should default if the variable isn't set. But before trying to change the code I wanted to check with you guys, what you think about it.
The text was updated successfully, but these errors were encountered: