Skip to content

[RFE] Annotate the cluster.x-k8s.io with the mgmt cluster name #1807

@e-minguez

Description

@e-minguez

What would you like to be added (User Story)?

As a user I would like to have the CAPI cluster being annotated with the name of the management cluster being created when using the auto-import label.

Detailed Description

When labeling a clusters.cluster.x-k8s.io object with cluster-api.cattle.io/rancher-auto-import: "true" , a corresponding clusters.management.cattle.io/v3 is created. This mgmt cluster contains cluster-api.cattle.io/capi-cluster-owner and cluster-api.cattle.io/capi-cluster-owner-ns labels to refer back to the clusters.cluster.x-k8s.io object.
It would be nice if the clusters.cluster.x-k8s.io object is annotated with something like cluster-api.cattle.io/mgmt-cluster-name that points to the management cluster created because the mgmt cluster name is randomly generated an in order to see what cluster corresponds to the CAPI cluster you need to get all the clusters and filter them by the labels mentioned above.

Anything else you would like to add?

No response

Label(s) to be applied

/kind feature

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions