-
Notifications
You must be signed in to change notification settings - Fork 14.5k
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
Kustomize bug was documented as a feature #35669
Comments
/language en |
/priority important-longterm We need to decide on exactly what the fix will look like. |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-priority important-longterm after discussion with SIG CLI |
/remove-lifecycle stale |
It seems the issue has been addressed and can be closed, correct? I.e. the documentation change is reverted and a warning is added to Kustomize. Is there anything else that needs to be done? (Came across this by browsing priority/important-soon) |
How do I add calculated env vars to my deployment without this For context, I need the Git SHA hash in a ConfigMap. My CI/CD provider makes the SHA available as an env var in the process where I run my Kustomize build. I was using the passthrough vars. # kustomization.yaml file
kind: Kustomization
apiVersion: kustomize.config.k8s.io/v1beta1
configMapGenerator:
- envs:
- .env
name: some-configmap
bases:
- ../../base # .env file
ELASTIC_APM_SERVER_URL=https://some-apm-instance.elastic-cloud.com
ELASTIC_APM_SERVICE_VERSION Here, ELASTIC_APM_SERVICE_VERSION is a system environment variable that contains the Git SHA. |
Hi @sliekens GitHub is not the right place for support requests. If you're mainly looking for advice, you could ask on Server Fault. You can also post your question on the Kubernetes Slack or the Discuss Kubernetes forum. |
/close This issue is addressed. |
@sftim: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@sftim fair, but you could still make a general recommendation for users who were relying on removed functionality. |
Variables without an assignment were valid syntax before. Such variable values would be derived from the environment. However, this behavior was actually a bug documented as a features, see kubernetes/website#35669.
This is a Bug Report
Problem:
Commit b9da040 / PR #30348. That PR documented a bug in Kustomize as though it were a feature, and unfortunately nobody from the Kustomize team saw the PR.
The behaviour in question is considered very problematic and clearly undesirable, as it violates two Kustomize's core principles/guarantees: being a template-free solution and having no build-time side-effects. In fact, in Kustomize's own docs, this behaviour is explicitly documented as something Kustomize will never support: Eschewed Features list.
Both Kustomize maintainers agree on this point, and we were also able to confirm with the person who originally copied the offending code from kubectl that this behaviour came along with that code entirely by accident.
Proposed Solution:
Page to Update:
https://kubernetes.io/docs/tasks/manage-kubernetes-objects/kustomization/
The text was updated successfully, but these errors were encountered: