-
Notifications
You must be signed in to change notification settings - Fork 828
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 labels on the namespace created by karmada #2862
Comments
I wonder if you want a label for ns which stored the secret of the cluster or all the ns that karmada created, such as |
/remove-kind bug |
I've tested it on my side: # kubectl get ns karmada-cluster -o yaml
apiVersion: v1
kind: Namespace
metadata:
creationTimestamp: "2022-11-15T07:16:00Z"
labels:
kubernetes.io/metadata.name: karmada-cluster
name: karmada-cluster
resourceVersion: "966"
uid: 95bf6df1-a5c3-481a-a0b8-71ff1b20d3dc
spec:
finalizers:
- kubernetes
status:
phase: Active
I wonder who and where added this label |
I get it. The label is added by Kubernetes.
That makes sense, but if we don't use it for searching, we can introduce an annotation. Can you propose one? |
For example, karmada.io/metadata.name: karmada-cluster ? |
@RainbowMango Can I add karmada.io/metadata.name: karmada-cluster to namespace? |
Thanks for your contribution. I see the #2888. |
Okk. |
@RainbowMango hi,Big Brother, what is the final decision? |
I don't have enough time on this issue recently, you know, we are in the planning phase, so proposing features is my highest priority right now. |
Thank you, I'll keep track of this issue and work on a solution for milestone 1.5. |
@Rains6 I have a question for your use case, If you just want to indicate the namespace is created by Karmada, then the name If you want to avoid accidental deletion, adding a label or annotation can't help. So, could you please give more details about |
When deploying karmada, we do not use karmada-cluster as the namespace to be deployed. Adding a label or annotation enables the frontend to identify that the namespace is created by karmada, preventing users from deleting the namespace on the frontend page. |
I'm still feeling a little bit confused as you mentioned
It makes sense to me that you probably do not use the default namespace name and want a label on the customized namespace. For this case, we can add an We can do it after #3262, does this makes sense to you? @Rains6 |
Yes, I think it'll solve this question. |
Hi, everyone, as #3262 has been merged, I think we can continue to complete this issue. We introduced the label Hi @Zhuzhenghao, would you like to go ahead and finish it? |
/help |
@XiShanYongYe-Chang: Please ensure the request meets the requirements listed here. If this request no longer meets these requirements, the label can be removed 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. |
Hi @zhy76, would you like to have a try with this issue? |
Sure! |
/assign |
I see there is already a label
So is it still need to do this issue? |
Hi @zhy76 The namespace mentioned in the issue refers to the namespace created by Karmada after a cluster joins. This namespace is used to store related authentication credentials, etc., and is specified by the parameter |
What happened:
When I add a cluster to karmada, karmada will create a namespace on my cluster. I hope there will be a label indicating that the namespace was created by karmada to avoid accidental deletion.
What you expected to happen:
There will be a label indicating that the namespace was created by karmada to avoid accidental deletion.
How to reproduce it (as minimally and precisely as possible):
Add a cluster to karmada
Anything else we need to know?:
none
Environment:
The text was updated successfully, but these errors were encountered: