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 namingStrategy for InfrastructureCluster #11671

Open
simonostendorf opened this issue Jan 11, 2025 · 10 comments
Open

Add namingStrategy for InfrastructureCluster #11671

simonostendorf opened this issue Jan 11, 2025 · 10 comments
Assignees
Labels
area/clusterclass Issues or PRs related to clusterclass help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature. priority/backlog Higher priority than priority/awaiting-more-evidence. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@simonostendorf
Copy link

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

As a cluster administrator I want to control how my InfrastructureClusters are named so that they match my other cluster-api components.

Detailed Description

When using cluster-classes the user can change the naming scheme of the resulting control-plane and the machine-deployment / machine-pool objects but not for the infrastructure cluster.

I think it would be nice to support a namingStrategy for infrastructure as well. This would allow me to remove the random id at the end because my cluster names are already random ids.

Anything else you would like to add?

No response

Label(s) to be applied

/kind feature

/area cluster-class

@k8s-ci-robot
Copy link
Contributor

@simonostendorf: The label(s) area/cluster-class cannot be applied, because the repository doesn't have them.

In response to this:

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

As a cluster administrator I want to control how my InfrastructureClusters are named so that they match my other cluster-api components.

Detailed Description

When using cluster-classes the user can change the naming scheme of the resulting control-plane and the machine-deployment / machine-pool objects but not for the infrastructure cluster.

I think it would be nice to support a namingStrategy for infrastructure as well. This would allow me to remove the random id at the end because my cluster names are already random ids.

Anything else you would like to add?

No response

Label(s) to be applied

/kind feature

/area cluster-class

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-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. needs-priority Indicates an issue lacks a `priority/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jan 11, 2025
@simonostendorf
Copy link
Author

/area clusterclass

@k8s-ci-robot k8s-ci-robot added the area/clusterclass Issues or PRs related to clusterclass label Jan 11, 2025
@chrischdi
Copy link
Member

/triage accepted
/priority backlog

Feel free to take a look, assign and open a PR for this :-)

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. priority/backlog Higher priority than priority/awaiting-more-evidence. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates an issue lacks a `priority/foo` label and requires one. labels Jan 22, 2025
@chrischdi
Copy link
Member

/help

@k8s-ci-robot
Copy link
Contributor

@chrischdi:
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:

/help

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-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. label Jan 22, 2025
@arshadd-b
Copy link

/assign

@arshadd-b
Copy link

Hi @simonostendorf I am interested to work on this. Could you please provide more information, it will be really helpful
Thanks

@simonostendorf
Copy link
Author

Hi @simonostendorf I am interested to work on this. Could you please provide more information, it will be really helpful
Thanks

Nice, thank you!

Currently it's only supported to define a naming scheme for the ControlPlane hosts. The Infra Cluster gets a name with cluster name and a random string. I think it is useful to allow a naming scheme for this, so that the cluster can be named like the cluster name without the random string or something like that.

Do you understand what I mean?

@arshadd-b
Copy link

Did you mean something similar like we already we have ?
https://github.com/kubernetes-sigs/cluster-api/blob/main/internal/topology/names/names.go#L70

@simonostendorf
Copy link
Author

I would like to see an option that the Infra Cluster gets the same name as the Cluster object when using Topology feature. I haven't thought about the implementation yet.

I was thinking about something like the namingStrategy that exists for machines, see https://doc.crds.dev/github.com/kubernetes-sigs/cluster-api/controlplane.cluster.x-k8s.io/KubeadmControlPlaneTemplate/v1beta1@v1.9.4#spec-template-spec-machineNamingStrategy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/clusterclass Issues or PRs related to clusterclass help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature. priority/backlog Higher priority than priority/awaiting-more-evidence. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

No branches or pull requests

4 participants