Description
User Story
As a user, on some infrastructures when I go to deploy a cluster with names like the following, I experience some form of breakage:
Example names
- default/longnamemorethansixtythreecharacterslong
- default/names.using.dots.in.them
- same cluster name, but in a different namespace ( default/cluster1 businessunit1/cluster1)
Example forms of breakage
- The cluster infrastructure doesn't come up
- The VM doesn't come up
- The VM does come up but doesn't complete bootstrap, and there's complaints from cloud-init about the hostname.
Detailed Description
Provider contracts in https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/book/src/developer/providers/machine-infrastructure.md and https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/book/src/developer/providers/cluster-infrastructure.md should include guidance on how to implement the provider to accept all valid Kubernetes resource names, including techniques like conditional hashing (kubernetes-sigs/cluster-api-provider-aws#1290).
And then after we do that, we should probably circulate this amongst provider implementers so they can check they're not affected, and maybe add appropriate E2Es according to the constraints of their infrastructure provider.
Anything else you would like to add:
A bunch of related issues:
- Windows Support: NetBIOS and Active Directory LDAP SAMAccountName restrictions on Hostname #2217
- cluster with same name under different namespace is provisioned but no infra created #1554
- Nodegroup role name exceeds maximum length cluster-api-provider-aws#2704
- Cluster with reused name in different namespace fails to boot cluster-api-provider-aws#969
- Generate shorter Public IP Names cluster-api-provider-azure#2330
[Miscellaneous information that will assist in solving the issue.]
/kind docs