kubernetes-sigs / cluster-api

Home for Cluster API, a subproject of sig-cluster-lifecycle
https://cluster-api.sigs.k8s.io
Apache License 2.0
3.48k stars 1.29k forks source link

Add guidance on infrastructure resource names to provider implementation guides #7030

Open randomvariable opened 2 years ago

randomvariable commented 2 years ago

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

Example forms of breakage

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:

[Miscellaneous information that will assist in solving the issue.]

/kind docs

k8s-ci-robot commented 2 years ago

@randomvariable: The label(s) kind/docs cannot be applied, because the repository doesn't have them.

In response to [this](https://github.com/kubernetes-sigs/cluster-api/issues/7030): >**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](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
randomvariable commented 2 years ago

Should add I'm happy to make the docs change.

Does anyone have any other examples of stuff that should be documented?

randomvariable commented 2 years ago

/assign

fabriziopandini commented 2 years ago

/kind documentation /triage accepted

k8s-triage-robot commented 1 year ago

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:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

fabriziopandini commented 1 year ago

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

k8s-ci-robot commented 1 year ago

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

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](https://github.com/kubernetes-sigs/cluster-api/issues/7030): >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](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
k8s-triage-robot commented 7 months ago

This issue has not been updated in over 1 year, and should be re-triaged.

You can:

For more details on the triage process, see https://www.kubernetes.dev/docs/guide/issue-triage/

/remove-triage accepted

fabriziopandini commented 4 months ago

/priority backlog

fabriziopandini commented 4 months ago

/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)