Closed CecileRobertMichon closed 3 years ago
/milestone v0.4.0
Hi @CecileRobertMichon , Are you planning to work on this feature? If not, can I work on this as a good first issue?
I'm wondering if the cluster name is enough to identify the Cluster API abstraction controlling this node. Is cluster-name enough or do we need namespace, and potentially a management Cluster-ID? Is it useful to track also the name of the machine managing this node? Is it useful to track higher-level abstraction managing the node (MachineDeployment, MachinePool, control plane object)?
@fmuyassarov I already have the change done locally, I open a PR today. I can help you find another good first issue though if you're interested.
@fabriziopandini the cluster name wouldn't give info about the machine controlling it, just the cluster it belongs to. I can add one for the machine / machine pool abstraction though, that should be pretty easy.
Is cluster-name enough or do we need namespace, and potentially a management Cluster-ID?
We should probably add both namespace + name
@CecileRobertMichon Please take a look at this proposal as well https://github.com/kubernetes/enhancements/pull/2150 — It's a bit fuzzy on details and seems to be solving a different set of problems, but we should provide feedback there to align with the broader community.
I do like the idea that for now we can just annotate/label nodes instead of relying on future resources.
I'll add both namespace and name. But even that might not be enough as two different management clusters might have two target clusters with the same name in the same namespace.
User Story
As a user, I would like to know which CAPI cluster a node is part of by doing a quick inspection of its metadata (eg.
kubectl describe node
).As a user, I would like to know if a k8s cluster was built using Cluster API.
Detailed Description
Add a
"cluster.x-k8s.io/cluster-name"
annotation on every node part of the cluster. This can be done in the machine and machine pool controllers.Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]
/kind feature /assign