cluster-api icon indicating copy to clipboard operation
cluster-api copied to clipboard

Add guidance on infrastructure resource names to provider implementation guides

Open randomvariable opened this issue 1 year ago • 4 comments

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 avatar Aug 05 '22 17:08 randomvariable

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

k8s-ci-robot avatar Aug 05 '22 17:08 k8s-ci-robot

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

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

randomvariable avatar Aug 05 '22 17:08 randomvariable

/assign

randomvariable avatar Aug 05 '22 17:08 randomvariable

/kind documentation /triage accepted

fabriziopandini avatar Aug 05 '22 18:08 fabriziopandini

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

k8s-triage-robot avatar Nov 03 '22 19:11 k8s-triage-robot

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 avatar Nov 03 '22 19:11 fabriziopandini

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

k8s-ci-robot avatar Nov 03 '22 19:11 k8s-ci-robot

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

k8s-triage-robot avatar Jan 19 '24 04:01 k8s-triage-robot

/priority backlog

fabriziopandini avatar Apr 12 '24 13:04 fabriziopandini

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

fabriziopandini avatar Apr 24 '24 13:04 fabriziopandini