cluster-api
cluster-api copied to clipboard
Add guidance on infrastructure resource names to provider implementation guides
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
@randomvariable: The label(s) kind/docs
cannot be applied, because the repository doesn't have them.
In response to this:
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
- longnamemorethansixtythreecharacterslong
- names.using.dots.in.them
- same cluster name, but in a different namespace
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
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/test-infra repository.
Should add I'm happy to make the docs change.
Does anyone have any other examples of stuff that should be documented?
/assign
/kind documentation /triage accepted
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
- After 90d of inactivity,
lifecycle/stale
is applied - After 30d of inactivity since
lifecycle/stale
was applied,lifecycle/rotten
is applied - After 30d of inactivity since
lifecycle/rotten
was applied, the issue is closed
You can:
- Mark this issue or PR as fresh with
/remove-lifecycle stale
- Mark this issue or PR as rotten with
/lifecycle rotten
- Close this issue or PR with
/close
- Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
in CAPI we can give some general guidelines, but documentation for each infrastructure should be implemented in each provider.
if we want to fix this properly, one possible approach is to implement additional validation webhooks for CAPI resources in providers, but this seems out of scope of the current request so eventually this + follow up discussions should be moved to a separated issue
/lifecycle frozen /unassign @randomvariable /help
@fabriziopandini: 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:
in CAPI we can give some general guidelines, but documentation for each infrastructure should be implemented in each provider.
if we want to fix this properly, one possible approach is to implement additional validation webhooks for CAPI resources in providers, but this seems out of scope of the current request so eventually this + follow up discussions should be moved to a separated issue
/lifecycle frozen /unassign @randomvariable /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/test-infra repository.
This issue has not been updated in over 1 year, and should be re-triaged.
You can:
- Confirm that this issue is still relevant with
/triage accepted
(org members only) - Close this issue with
/close
For more details on the triage process, see https://www.kubernetes.dev/docs/guide/issue-triage/
/remove-triage accepted
/priority backlog
/triage accepted
Having guidelines like this will be super valuable for the entire Cluster API community.
We should also consider discussing a guideline about how which "root" use to compute infrastructure names (e.g machine or infrastructure machines, see e.g. the issue in https://github.com/kubernetes-sigs/cluster-api/issues/10463)