allenporter/flux-local

Required fields in Helm templates causes templating of helm charts to not work

onedr0p opened this issue · 4 comments

Some Helm charts have required options in the templates which can cause the templating to fail if using Flux valuesFrom in Helm Releases. See this link for an example. I am able to install these because I use Flux's valuesFrom like in this HelmRelease, however helm template fails:

Error: execution error at (gha-runner-scale-set/templates/githubsecret.yaml:34:8): A valid .Values.githubConfigSecret is required for setting auth with GitHub server, provide .Values.githubConfigSecret.github_token or .Values.githubConfigSecret.github_app_id.

I am not sure if there is a way around this, because Helm doesn't provide an option to ignore these errors when using helm template. 😢 I guess we can leave this issue open for awareness if anything?

Emulating valuesFrom seems reasonable. Perhaps when there is a flux build hr it'll take care of this....

Emulating might be a stop-gap. Unfortunately this is blocking my use for #434 since I get the same error as it tries to extract all the images.

I can see in your cluster that the referenced secret actions-runner-controller-auth-secret doesn't exist, but is created by ExternalSecret so it can't really be discovered.

Perhaps just always dumping a synthetic value into targetPath would be the way to go, without doing any verification that it can be found in the cluster.

Another option is to require explicit configuration, similar to sources

Perhaps it would need an option (later at least) to be explicit given the contents of the values may matter for the helm validation if they are more complex.