Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flux envsubst --strict ignores kustomize.toolkit.fluxcd.io/substitute: disabled label #5108

Open
1 task done
monotek opened this issue Dec 10, 2024 · 1 comment
Open
1 task done

Comments

@monotek
Copy link

monotek commented Dec 10, 2024

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

  • I agree to follow this project's Code of Conduct
@monotek monotek changed the title flux envsubst --strict ignores kustomize.toolkit.fluxcd.io/substitute: disabled flux envsubst --strict ignores kustomize.toolkit.fluxcd.io/substitute: disabled label Dec 10, 2024
@stefanprodan
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants