Add guidance on infrastructure resource names to provider implementation guides
#7,030 opened on Aug 5, 2022
Repository metrics
- Stars
- (4,267 stars)
- PR merge metrics
- (PR metrics pending)
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 (https://github.com/kubernetes-sigs/cluster-api-provider-aws/pull/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:
- https://github.com/kubernetes-sigs/cluster-api/issues/2217
- https://github.com/kubernetes-sigs/cluster-api/issues/1554
- https://github.com/kubernetes-sigs/cluster-api-provider-aws/issues/2704
- https://github.com/kubernetes-sigs/cluster-api-provider-aws/issues/969
- https://github.com/kubernetes-sigs/cluster-api-provider-azure/issues/2330
[Miscellaneous information that will assist in solving the issue.]
/kind docs