-
Notifications
You must be signed in to change notification settings - Fork 7k
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
Deep merge of values files #1620
Comments
Side note: I know that this would make the ordering of the files passed with the |
I am not sure Cobra will allow us to repeat flags. But if we can figure out a way around that, I think we could just pass files through the existing We might be able to change |
@technosophos: Thanks for the quick response. It looks like it does (from the godoc example):
|
You can now specify the `-f` flag multiple times to include multiple values files. The priority will be from left to right in the order specified. Closes helm#1620
You can now specify the `-f` flag multiple times to include multiple values files. The priority will be from left to right in the order specified. Closes helm#1620
You can now specify the `-f` flag multiple times to include multiple values files. The priority will be from left to right in the order specified. Closes helm#1620
You can now specify the `-f` flag multiple times to include multiple values files. The priority will be given to the last (right-most) file specified. Closes helm#1620
You can now specify the `-f` flag multiple times to include multiple values files. The priority will be given to the last (right-most) file specified. Closes helm#1620
Stop relying on `yaml.Unmarshal` to merge `ValuesYaml` as it cannot do a deep merge. Instead we Unmarshal the values in a temporary map and use the `mergeMap` function that already exists to merge. With this the behavior of the provider is aligned with the deep merge made by Helm helm/helm#1620 Fixes #2958 . --------- Co-authored-by: Bryce Lampe <bryce@pulumi.com>
Helm should be able to deep merge multiple values files. This is helpful when you want to pass different variables for different environments (like whether or not to use a PVC) As it stands right now, it just overwrites the previous variable.
Example
Given these two values files for an example postgresql subchart
secrets.yaml
dev_environment.yaml
Current Behavior
When using
-f secrets.yaml -f dev_environment.yaml
withhelm install
, the variables available would look like this:If we swap the flags:
-f dev_environment.yaml -f secrets.yaml
, the variables look like:Desired Behavior
When using
-f secrets.yaml -f dev_environment.yaml
withhelm install
, the variables available would look like this:Is there another way to get this behavior or would this need to be added?
The text was updated successfully, but these errors were encountered: