applicationset
applicationset copied to clipboard
When a parameter is missing, the template is passed explicitly, and results in incomprehensible error
I have a set of parameters in a git repo that I care about, example:
a: "aaa"
b: "bbb"
c: "ccc"
My appset generator uses a helm chart to deploy the app:
...
source:
chart: mychart
path: ''
repoURL: >-
https://my.helm.repo
targetRevision: 0.0.13
helm:
releaseName: myapp
parameters:
- name: a
value: '{{a}}'
- name: b
value: '{{b}}'
- name: c
value: '{{c}}'
- name: d
value: '{{d}}'
As you can see, d
isn't in the config file. What happens is the appset creates the app manifest with --set d={{d}}
which fails with an error that's irrelevant to the issue:
status 1: Error: failed parsing --set data: key "}" has no value'
In my specific case, I would expect the argument to not be passed at all, resulting in a default being picked from the chart's default values.yaml, or for the application to spit out an error about a missing parameter.
Maybe even make it configurable, so that if I have a variable in git, it gets templated, if I don't, depending on the applicationSet settings, the entire setting gets skipped, or fails on missing variable.
Is there any way around this? I've got the same issue where some helm charts have value files and some do not.