Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

📖 Refactor InfraMachine contract #11223

Conversation

fabriziopandini
Copy link
Member

What this PR does / why we need it:
This PR refactor the InfraMachine contract. Most notably

  • Everything related to the InfraMachine contract is now in one page, or at least in section of the book (before it was spread all around)
  • There is a table that gives an overview of all the contract rules that applies to the InfraMachine
  • Duplicated informations about the InfraMachine contract have been removed from other pages

/area documentation

@k8s-ci-robot k8s-ci-robot added area/documentation Issues or PRs related to documentation cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Sep 25, 2024
@k8s-ci-robot k8s-ci-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Sep 25, 2024
docs/book/src/developer/core/controllers/machine.md Outdated Show resolved Hide resolved
docs/book/src/developer/core/controllers/machine.md Outdated Show resolved Hide resolved

Among those rules:
- InfraMachine MUST report a [provider ID](../../providers/contracts/infra-machine.md#inframachine-provider-id) for the Machine
- InfraMachine SHOULD define a [failure domain](../../providers/contracts/infra-machine.md#inframachine-failure-domain) where machines should be placed in
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- InfraMachine SHOULD define a [failure domain](../../providers/contracts/infra-machine.md#inframachine-failure-domain) where machines should be placed in
- InfraMachine SHOULD define a [failure domain](../../providers/contracts/infra-machine.md#inframachine-failure-domain) field that decides where machines are placed in

Maybe. Sould define a failureDomain sounds a bit unclear

Otherwise it sounds like the InfraMachine comes up with the failureDomain, but I think it's the other way around

Copy link
Member Author

@fabriziopandini fabriziopandini Sep 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went through the rabbit hole about failure domains management, and discovered that since 1.3.0 we are supporting a two ways contract for compatibility reason/for allowing a transparent transition from when there was no failure domain support in Cluster API and InfraMachine was authoritative WRT to failure domain placement

I updated the doc to reflect current state, and also added a proposal for cleaning up tech debt with v1beta2

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If what I'm proposing is ok, I'm going to open an issue to track this + brings this up in the office hours

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general sounds good to me.

I assume we still have use cases going forward where no failureDomain is specified in Machine, then the infra provider just picks one and we want to surface that back?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docs/book/src/developer/core/controllers/machine.md Outdated Show resolved Hide resolved
docs/book/src/developer/core/controllers/machine.md Outdated Show resolved Hide resolved
@sbueringer
Copy link
Member

/lgtm
/approve

/hold
up to you

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 27, 2024
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 27, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: bcb0b8a6c19ad5699c20de58165a29079018c4f9

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sbueringer

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 27, 2024
@fabriziopandini
Copy link
Member Author

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 27, 2024
@k8s-ci-robot k8s-ci-robot merged commit 187f385 into kubernetes-sigs:main Sep 27, 2024
17 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.9 milestone Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/documentation Issues or PRs related to documentation cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants