ValuesFrom optional field not working for a particular key
While using ValuesFrom from configmap and keeping optional: true as config, it is showing the following error:
missing key '' in ConfigMap ''
Is this expected behaviour, I am using same configmap for multiple keys. I think the optional field is working only when the configmap is not present altogether. Instead if configmap is present and the key is also not present, the optional field should be respected.
I am talking about the following piece of code
https://github.com/fluxcd/helm-controller/blob/6f0b7cdc76923e79f9472dc49c13842ef3c2c109/controllers/helmrelease_controller.go#L544-L548
Why is the optional not handled in this case?
@hiddeco @stefanprodan can you help out here? I would be happy to raise the PR, if this is how it should be. Thanks
#589
This is by design, as described in the commit which introduced this (and in the documentation of the field itself): https://github.com/fluxcd/helm-controller/commit/1a88b409360b79c198e8109632582ac7a9c46ce6. In my opinion, this results in a better feedback loop in case a field is accidentally deleted which could otherwise go unnoticed.
Hey @hiddeco my usecase is that, I would want to render this in GitOps rep but if this field is not present it will take the default value, but this error fails it.