Skip to content

Allow Exclude of some paths from the Labels and Selectors Kustomize Feature #5913

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

Open
1 of 2 tasks
avo-sepp opened this issue May 19, 2025 · 1 comment
Open
1 of 2 tasks
Labels
kind/feature Categorizes issue or PR as related to a new feature. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.

Comments

@avo-sepp
Copy link

Eschewed features

  • This issue is not requesting templating, unstuctured edits, build-time side-effects from args or env vars, or any other eschewed feature.

What would you like to have added?

When using the labels feature to apply labels to selectors and labels, I need to exclude some specific sections, like inter-pod affinity or Argo Rollouts CRDs. But I have no way to tell Kustomize to Ignore these fields.

Basically I want an 'exclude' section where I can specify api, kind, and path of a section I want not modified by the labels feature.

Why is this needed?

There are times when specific fields, such as the Argo Rollouts Template section need to remain untouched. Or if I need something like pod-affinity to keep their base values.

Can you accomplish the motivating task without this feature, and if so, how?

The work around is to patch ontop of a patch. Which helps me extract out what was wrong in the first patch. But really this is excessive and hard to follow.

What other solutions have you considered?

See previous answer.

Anything else we should know?

This is a major issue for Argo Rollouts. If you are using a WorkloadSpec instead of a template, the template gets created by the label feature, which breaks Rollouts.

Feature ownership

  • I am interested in contributing this feature myself! 🎉
@avo-sepp avo-sepp added the kind/feature Categorizes issue or PR as related to a new feature. label May 19, 2025
@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label May 19, 2025
@k8s-ci-robot
Copy link
Contributor

This issue is currently awaiting triage.

SIG CLI takes a lead on issue triage for this repo, but any Kubernetes member can accept issues by applying the triage/accepted label.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

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-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.
Projects
None yet
Development

No branches or pull requests

2 participants