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

Kustomize bug was documented as a feature #35669

Closed
KnVerey opened this issue Aug 3, 2022 · 11 comments
Closed

Kustomize bug was documented as a feature #35669

KnVerey opened this issue Aug 3, 2022 · 11 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. language/en Issues or PRs related to English language priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. sig/cli Categorizes an issue or PR as relevant to SIG CLI. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@KnVerey
Copy link
Contributor

KnVerey commented Aug 3, 2022

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/

@KnVerey KnVerey added the kind/bug Categorizes issue or PR as related to a bug. label Aug 3, 2022
@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Aug 3, 2022
@sftim
Copy link
Contributor

sftim commented Aug 3, 2022

/language en
/triage accepted

@k8s-ci-robot k8s-ci-robot added language/en Issues or PRs related to English language triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Aug 3, 2022
@sftim
Copy link
Contributor

sftim commented Aug 3, 2022

/priority important-longterm

We need to decide on exactly what the fix will look like.
/sig cli

@k8s-ci-robot k8s-ci-robot added priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. sig/cli Categorizes an issue or PR as relevant to SIG CLI. labels Aug 3, 2022
@k8s-triage-robot
Copy link

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:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Nov 1, 2022
@sftim
Copy link
Contributor

sftim commented Nov 8, 2022

/remove-priority important-longterm
/priority important-soon

after discussion with SIG CLI

@k8s-ci-robot k8s-ci-robot added priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. and removed priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. labels Nov 8, 2022
@sftim
Copy link
Contributor

sftim commented Nov 8, 2022

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Nov 8, 2022
@nikitar
Copy link
Contributor

nikitar commented Dec 7, 2022

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)

@sliekens
Copy link

sliekens commented Jan 16, 2023

How do I add calculated env vars to my deployment without this feature bug? Does Kustomize provide an alternate solution for the removed functionality or is it entirely my responsibility to append a line to the .env file?

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.

@sftim
Copy link
Contributor

sftim commented Jan 16, 2023

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.

@sftim
Copy link
Contributor

sftim commented Jan 16, 2023

/close

This issue is addressed.

@k8s-ci-robot
Copy link
Contributor

@sftim: Closing this issue.

In response to this:

/close

This issue is addressed.

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.

@sliekens
Copy link

@sftim fair, but you could still make a general recommendation for users who were relying on removed functionality.

gsov added a commit to overleaf/vim-env-syntax that referenced this issue Aug 24, 2023
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. language/en Issues or PRs related to English language priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. sig/cli Categorizes an issue or PR as relevant to SIG CLI. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

No branches or pull requests

6 participants