Incorrect docs for label kubernetes.io/metadata.name
This is a Bug Report
Problem:
The docs for kubernetes.io/metadata.name say that this label is set on namespaces when you enable a feature gate, NamespaceDefaultLabelName. However that's no longer true. In current Kubernetes the control plane always sets that label on namespaces.
Proposed Solution: Reword that section to make it clear that the control plane always sets that label
Page to Update: https://kubernetes.io/docs/reference/labels-annotations-taints/#kubernetes-io-metadata-name
Kubernetes Version: v1.22
Additional Information: /language en /kind bug /help /priority backlog
@sftim: This request has been marked as needing help from a contributor.
Guidelines
Please ensure that the issue body includes answers to the following questions:
- Why are we solving this issue?
- To address this issue, are there any code changes? If there are code changes, what needs to be done in the code and what places can the assignee treat as reference points?
- Does this issue have zero to low barrier of entry?
- How can the assignee reach out to you for help?
For more details on the requirements of such an issue, please see here and ensure that they are met.
If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-help command.
In response to this:
This is a Bug Report
Problem: The docs for
kubernetes.io/metadata.namesay that this label is set on namespaces when you enable a feature gate,NamespaceDefaultLabelName. However that's no longer true. In current Kubernetes the control plane always sets that label on namespaces.Proposed Solution: Reword that section to make it clear that the control plane always sets that label
Page to Update: https://kubernetes.io/docs/reference/labels-annotations-taints/#kubernetes-io-metadata-name
Kubernetes Version: v1.22
Additional Information: /language en /kind bug /help /priority backlog
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.
/triage accepted
Hi, I would like to work on this issue. /assign
Any questions about how to fix it?
I have a few technical questions:
- Since the
Control Planesets the label on the namespaces instead of enabling thefeature gate, so there would be no role of K8s API server in this process? - How will the
Control Planeset label on the namespaces? I mean will it do it automatically or we need to do something to set the labels like enabling something?
The API server is part of the control plane - see https://kubernetes.io/docs/concepts/overview/components/ The component within the control plane that sets the label isn't a detail we need to specify here. All we need to mention is that it happens, and phrase it to make it clear it's not optional.
Just to be clear that the Control plane will set the labels of the namespace and this setting of the labels is compulsorily (i.e. it is not optional).?
(also, we'll get the API Machinery folks to check technical accuracy anyway - it's not on the docs contributors to thoroughly verify this kind of detail).
Okay thanks . I now have an idea on how to fix the issue, I will file the PR soon :)
I have a doubt: The phrase which tells that It is compulsory to set a label to namespace ,would it be better to included it as a Note shortcode or it should be kept as a normal text.?
@babapool the best way for folks to review your proposed changes is to open a pull request. (Also: anyone else who wants to work on this is welcome to - please liaise with @Babapool if that's feasible).
I have filed a PR but if anyone wants to work on this they are welcome to share their suggestions in the PR Conversation. Thanks.