-
Notifications
You must be signed in to change notification settings - Fork 695
Description
Describe the bug
I'm currently trying to convert some helmfiles into flux manifests.
We currently use environment values to allow us to configure an entire application stack, and allow users to install everything according to our configuration but with setting their own required inputs. As helmfile uses gotemplates for generating the final manifests we can do logic such as requiring environment values be set (with {{ required "You must provide a value for someValue!" .Values.someValue }}).
It looks like flux post build variable substitution will do the trick for us, and the bash string replacement functions are useful, but I'm quite surprised that by default an unset variable will just evaluate to an empty string. I want to set up flux manifests that require these values to be set and returns an error if you do not.
The kubernetes cluster-api project have an open issue discussing switching to an alternative implementation of envsubst, but there is not feature parity between the two projects.
Would it be possible to add an option to flux to error if any of the variables are not set? (Or evaluate to an empty string)
Steps to reproduce
N/A
Expected behavior
Able to enforce users to provide values for postBuild.substitute
Screenshots and recordings
No response
OS / Distro
N/A
Flux version
N/A
Flux check
N/A
Git provider
No response
Container Registry provider
No response
Additional context
No response
Code of Conduct
- I agree to follow this project's Code of Conduct