flux2
flux2 copied to clipboard
flux envsubst --strict ignores kustomize.toolkit.fluxcd.io/substitute: disabled label
Describe the bug
flux envsubst --strict ignores kustomize.toolkit.fluxcd.io/substitute: disabled label
Steps to reproduce
run "flux envsubst --strict" on a kustomization directory with a grafana dashboard which contains a "${Datasource}" var but also has the "kustomize.toolkit.fluxcd.io/substitute: disabled" label.
flux will complain:
✗ variable not set (strict mode): "Datasource"
Expected behavior
flux envsubst thros no error
Screenshots and recordings
No response
OS / Distro
github action
Flux version
2.4.0
Flux check
N/A
Git provider
No response
Container Registry provider
No response
Additional context
No response
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
Currently the flux envsubst command behaves like the GNU envsubst with --strict being the only addition. The command is not aware of YAML nor Kubernetes types, it works by streaming the content of whatever is passed in stdin.
I don't think we should be changing the current behaviour, this would mean a major breaking change, for example I use this command in various scripts that have nothing to do with YAML content.
I'm for implementing the Kubernetes-aware envsubst under some opt-in flag.