-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Document labels
field
#4147
Comments
/kind documentation |
labels
field
Actually this is a duplicate of #3756. The original issue lists the places to be updated. /kind duplicate |
@KnVerey: The label(s) 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. |
@KnVerey: 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. |
@terion-name: 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 The 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. |
UPD
After days of struggling I've found this merge: #3743
So it is posible with labels field, but this is not documented anywhere :(
Leaving the issue for others to find this
===========================
Orignal text:
Hello.
This is a discussion topic that I want to rise.
Despite being a feature,
commonLabels
s behaviour was reported as a bug numerous times for years already. This kinda should've tell that such behaviour is counter-intutivie and is not what community wait and want from it.As pointed here one should use LabelTransforners to set labels only for labels, but this is very bad approach, because requires a huge amount of configs written for every case (ruining the purpose of Kustomize to make small and convenient overlays) and those configs aren't reusable at all, because being used as a resource they can't inherit properties from kustomization.yaml
Very simple example:
The main app config is in ./base, this overlay alters image to new build and labels all resources to new version.
And this is impossible and will not work, because In API version apps/v1, a Deployment’s label selector is immutable after it gets created and commonLabels changes selector. And to overcome this one should create each time a new set of cumbersome huge configs in separate files just to make the thing
commonLabels
are supposed to do.commonLabels — even semantically is common LABELS, not selectors. Labels and selectors are not the same and not always match each other entirely. This behaviour makes commonLabels literally immutable and forces to dance around it.
It would be much better if there were separate props like
commonLabels
andcommonSelectors
orcommonMatchers
that each do what the name says they should.The text was updated successfully, but these errors were encountered: