-
Notifications
You must be signed in to change notification settings - Fork 273
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
Helm module not apply custom values files over chart defaults. #1642
Comments
Thanks for the detailed report @davidjeddy! Love the screen grab :) We'll take a look. |
This is actually how it's meant to work already... I wonder what's failing here. How are you specifying the |
In this use case we are not using |
Hey @davidjeddy. So, I was trying to reproduce this, and then it occurred to me to check whether the intended/designed behavior matches your expectations. The precedence order is as follows (in increasing order of precedence, i.e. last is preferred):
As far as I can tell, that's working as expected. If that's not what you're finding, it'd be useful to see the |
Perhaps the confusion relates to using the filename |
The order of operation makes sense, exactly the same order as CSS or any other inheritance system. As per the screen capture I have attached the Helm modules garden.yaml for your inspection. # The schema version of this module's config (currently not used).
apiVersion: garden.io/v0
# What kind of Garden module
kind: Module
# The type of this module.
type: helm
# The name of this module.
name: mariadb-galera-module
# A description of the module.
description: Created 2 Galera clusters w/ 3 compute instances each. Federate the contents of the clusters to provide a single SQL storage solution.
# Specify a list of POSIX-style paths or globs that should be regarded as the source files for this module. Files that
# do *not* match these paths or globs are excluded when computing the version of the module, when responding to
# filesystem watch events, and when staging builds.
include: ["reference_values.yaml"]
# A valid Helm chart name or URI (same as you'd input to `helm install`). Required if the module doesn't contain the
# Helm chart itself.
chart: mariadb-galera
# The path, relative to the module path, to the chart sources (i.e. where the Chart.yaml file is, if any). Not used
# when `base` is specified.
chartPath: .
# List of names of services that should be deployed before this chart.
# dependencies: []
# Deploy to a different namespace than the default one configured in the provider.
namespace: mariadb-galera
# Optionally override the release name used when installing (defaults to the module name).
releaseName: mariadb-galera-release
# The repository URL to fetch the chart from.
repo: https://charts.bitnami.com/bitnami
# Time in seconds to wait for Helm to complete any individual Kubernetes operation (like Jobs for hooks).
timeout: 300
# The chart version to deploy.
version: 0.8.1
# Specify value files to use when rendering the Helm chart. These will take precedence over the `values.yaml` file
# bundled in the Helm chart, and should be specified in ascending order of precedence. Meaning, the last file in
# this list will have the highest precedence.
#
# If you _also_ specify keys under the `values` field, those will effectively be added as another file at the end
# of this list, so they will take precedence over other files listed here.
#
# Note that the paths here should be relative to the _module_ root, and the files should be contained in
# your module directory.
# valueFiles: [
# ./reference_values.yaml
# ] We also tried the following but it has a known issue that should be fixed as part of the next Garden release. I wanted to provide it here for reference. # The schema version of this module's config (currently not used).
apiVersion: garden.io/v0
# What kind of Garden module
kind: Module
# The type of this module.
type: helm
# The name of this module.
name: mariadb-galera-module
# A description of the module.
description: Created 2 Galera clusters w/ 3 compute instances each. Federate the contents of the clusters to provide a single SQL storage solution.
# Specify a list of POSIX-style paths or globs that should be regarded as the source files for this module. Files that
# do *not* match these paths or globs are excluded when computing the version of the module, when responding to
# filesystem watch events, and when staging builds.
# include: []
# A valid Helm chart name or URI (same as you'd input to `helm install`). Required if the module doesn't contain the
# Helm chart itself.
chart: mariadb-galera
# The path, relative to the module path, to the chart sources (i.e. where the Chart.yaml file is, if any). Not used
# when `base` is specified.
chartPath: .
# List of names of services that should be deployed before this chart.
# dependencies: []
# Deploy to a different namespace than the default one configured in the provider.
namespace: mariadb-galera
# Optionally override the release name used when installing (defaults to the module name).
releaseName: mariadb-galera-release
# The repository URL to fetch the chart from.
repo: https://charts.bitnami.com/bitnami
# Time in seconds to wait for Helm to complete any individual Kubernetes operation (like Jobs for hooks).
timeout: 300
# The chart version to deploy.
version: 0.8.1
# Specify value files to use when rendering the Helm chart. These will take precedence over the `values.yaml` file
# bundled in the Helm chart, and should be specified in ascending order of precedence. Meaning, the last file in
# this list will have the highest precedence.
#
# If you _also_ specify keys under the `values` field, those will effectively be added as another file at the end
# of this list, so they will take precedence over other files listed here.
#
# Note that the paths here should be relative to the _module_ root, and the files should be contained in
# your module directory.
valueFiles: [
./reference_values.yaml
] |
Ah now I see. So, the issue that we fixed (#1637) was that when you specified |
If I understand correctly both |
Ok, got it to work. For anyone who finds this later: # for any and all files that should be considered part of the module
include: [
reference_values.yaml
]
...
# HELM value overrides
valueFiles: [
reference_values.yaml
] So the Helm value over ride must first be part of the module ( This now makes sense to me. 💡 |
Glad it worked out! As of next release the additional |
Bug
Per #1638 the Helm module now includes custom_values.yaml into the ./.garden/build/{module name}/ directory. After deploying the module values from said custom_values.yaml are not applied over the Helm charts default values.
Current Behavior
Custom Helm chart values not applied over default values.
Expected behavior
Overwrite Helm chart default values w/ specified custom values
Reproducible example
Workaround
none known
Suggested solution(s)
Apply custom values.yaml to .rendered.yaml AFTER the default chart values have been rendered
Additional context
n/a
Your environment
Thank you for the time and effort, much appreciated.
The text was updated successfully, but these errors were encountered: