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

Add extra labels section for per-node options #2877

Merged
merged 1 commit into from
Aug 18, 2022

Conversation

Benny-Git
Copy link
Contributor

Ref. #1926 #1574
Add extra labels section for per-node options

This feature was introduced with #1926
I needed something like this, and did not find it in the docs.
After searching some more I found the PR that introduced this, and decided to add it to the docs.

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Aug 13, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: Benny-Git / name: Benny (ad7f1ce)

@k8s-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Aug 13, 2022
@k8s-ci-robot
Copy link
Contributor

Welcome @Benny-Git!

It looks like this is your first PR to kubernetes-sigs/kind 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/kind has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot
Copy link
Contributor

Hi @Benny-Git. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Aug 13, 2022
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Aug 13, 2022
@BenTheElder
Copy link
Member

Thank you!!

rendered: https://deploy-preview-2877--k8s-kind.netlify.app/docs/user/configuration/#extra-labels

given the huge delay I want to just go ahead and proactively merge this, but we should consider mentioning Kubernetes's restrictions on these in a follow-up: https://kubernetes.io/docs/reference/labels-annotations-taints/

Kubernetes reserves all labels and annotations in the kubernetes.io namespace.

which, is actually missing something, it's k8s.io too. will need to go PR the main docs as well https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.16.md#deprecations-and-removals:~:text=removed%20the%20ability%20to%20set%20kubernetes.io%2D%20or%20k8s.io%2Dprefixed%20labels%20via%20%2D%2Dnode%2Dlabels%2C%20other%20than%20the%20specifically%20allowed%20labels/prefixes.%20(%2379305%2C%20%40paivagustavo)

@BenTheElder
Copy link
Member

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 17, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Benny-Git, BenTheElder

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 17, 2022
@Benny-Git
Copy link
Contributor Author

Benny-Git commented Aug 18, 2022

which, is actually missing something, it's k8s.io too. will need to go PR the main docs as well

I think the main doc's intention is to document the existing well-known labels and what they should be used for. It does not serve the purpose to inform which prefixes not to use?

The only thing hinting at that limitation is the sentence "Kubernetes reserves all labels and annotations in the kubernetes.io namespace." However I would not interpret the changelog's entry to mean k8s.io is genereally reserved - it looks like this only applies to Node labels?

Edit: Just did a quick test, and deployed a pod with lables k8s.io/benny: test and kubernetes.io/benny: test -- both worked fine.

@BenTheElder
Copy link
Member

I think the main doc's intention is to document the existing well-known labels and what they should be used for. It does not serve the purpose to inform which prefixes not to use?

Perhaps, but the first sentence of the page notes that kubernetes.io is reserved.

However I would not interpret the changelog's entry to mean k8s.io is genereally reserved - it looks like this only applies to Node labels?

It's only enforced on node labels, it makes sense there because nodes are owned wholly by kubelet.

The namespaces are still broadly considered reserved for labels, apis, etc. AFAIK.

Unlike kubelet / Node, it makes sense to let third party controllers set labels like app.kubernetes.io/created-by on objects like pod, however it's not intended to invent your own k8s.io labels AFAIK.

There was also a cleanup to move people's CRDs out of k8s.io if they were not approved APIs reviewed by the upstream API review team. kubernetes/enhancements#1111


In any case, I'm sure users are going to run into issues with failures trying to set k8s.io and kubernetes.io node labels which will not work since 1.16, we should make sure that's noted somewhere.

/override pull-kind-e2e-kubernetes-1-24

@k8s-ci-robot
Copy link
Contributor

@BenTheElder: Overrode contexts on behalf of BenTheElder: pull-kind-e2e-kubernetes-1-24

In response to this:

I think the main doc's intention is to document the existing well-known labels and what they should be used for. It does not serve the purpose to inform which prefixes not to use?

Perhaps, but the first sentence of the page notes that kubernetes.io is reserved.

However I would not interpret the changelog's entry to mean k8s.io is genereally reserved - it looks like this only applies to Node labels?

It's only enforced on node labels, it makes sense there because nodes are owned wholly by kubelet.

The namespaces are still broadly considered reserved for labels, apis, etc. AFAIK.

Unlike kubelet / Node, it makes sense to let third party controllers set labels like app.kubernetes.io/created-by on objects like pod, however it's not intended to invent your own k8s.io labels AFAIK.

There was also a cleanup to move people's CRDs out of k8s.io if they were not approved APIs reviewed by the upstream API review team. kubernetes/enhancements#1111


In any case, I'm sure users are going to run into issues with failures trying to set k8s.io and kubernetes.io node labels which will not work since 1.16, we should make sure that's noted somewhere.

/override pull-kind-e2e-kubernetes-1-24

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants