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 edit add label generates deprecated config #5726

Open
mhutter opened this issue Jun 27, 2024 · 2 comments
Open

kustomize edit add label generates deprecated config #5726

mhutter opened this issue Jun 27, 2024 · 2 comments
Labels
kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. kind/deprecation Categorizes issue or PR as related to a feature/enhancement marked for deprecation. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@mhutter
Copy link

mhutter commented Jun 27, 2024

What happened?

How to reproduce:

kustomize edit add label environment:dev

This will set commonLabels.env in the kustomization file, triggering a deprecation warning.

What did you expect to happen?

Kustomize commands to not generate deprecated configs.

How can we reproduce it (as minimally and precisely as possible)?

# kustomization.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

Expected output

# kustomization.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
labels:
- includeSelectors: true
  pairs:
    environment: dev

Actual output

# kustomization.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
commonLabels:
  environment: dev

Kustomize version

5.4.2

Operating system

Linux

@mhutter mhutter added the kind/bug Categorizes issue or PR as related to a bug. label Jun 27, 2024
@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Jun 27, 2024
@stormqueen1990
Copy link
Member

This is not exactly a bug, but I agree that since Kustomize is deprecating commonLabels, it should either provide a new command that creates configuration in the new, non-deprecated format, or update the existing command to do so. In the meantime, kustomize edit fix can be used to transform the previous format of label configuration into the new format.

/triage accepted
/remove-kind bug
/kind deprecation
/kind cleanup

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. kind/deprecation Categorizes issue or PR as related to a feature/enhancement marked for deprecation. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. kind/bug Categorizes issue or PR as related to a bug. labels Jul 9, 2024
@stormqueen1990
Copy link
Member

/lifecycle frozen

@k8s-ci-robot k8s-ci-robot added the lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. label Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. kind/deprecation Categorizes issue or PR as related to a feature/enhancement marked for deprecation. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

No branches or pull requests

3 participants