You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 22, 2022. It is now read-only.
Repository navigation
This repository was archived by the owner on Feb 22, 2022. It is now read-only.
Proposal: Enable testing and linting charts with test values. #3943
Currently, we can only test charts with their default values. There are certain cases when this is not ideal:
Charts cannot use the required function without providing a default value.
Some charts need key files (e. g. [stable/ethereum] Add Chart for Deploying Private Ethereum Network #3220). Adding keys to the chart is a security risk, even if we document that the user is supposed to provide their own keys. In such a case we could create keys for the tests only. for a real installation the user would be required to specify their own.
I propose that a chart can have a ci folder. Any file in this folder that ends with -values.yaml is considered a values file for testing. Linting and tests are run with each of these files. If no test values are found, the chart is installed with defaults.
Here's some bash code that illustrates this.
#!/usr/bin/env bashshopt -s nullglob
has_test_values=
forvalues_filein ./ci/*-values.yaml;doecho"Testing chart with values file: $values_file..."
helm lint stable/mychart --values "$values_file"
helm install stable/mychart --values "$values_file"
has_test_values=true
doneif [[ -z"$has_test_values" ]];thenecho"Chart does not provide test values. Testing installation with defaults..."
helm lint stable/mychart
helm install stable/mychart
fi
Having this ability would be awesome. I've been hesitant/lazy to update #3220 to pass the tests as it would mean updating all the start-up scripts to include "if no keys included, NOP" which is such an ugly hack to get around requiring keys.
Activity
unguiculus commentedon Mar 1, 2018
/cc @kubernetes/charts-maintainers
mattfarina commentedon Mar 6, 2018
/cc @kubernetes/helm-maintainers what do y'all think ... the idea is to help with CI.
/cc @viglesiasce since this impacts CI
prydonius commentedon Mar 6, 2018
+1 from me
sameersbn commentedon Mar 7, 2018
sgtm!
jpoon commentedon Mar 13, 2018
Having this ability would be awesome. I've been hesitant/lazy to update #3220 to pass the tests as it would mean updating all the start-up scripts to include "if no keys included, NOP" which is such an ugly hack to get around requiring keys.
viglesiasce commentedon Mar 14, 2018
This is awesome! +1 from me.