Skip to content

Conversation

rvanderp3
Copy link
Contributor

@rvanderp3 rvanderp3 commented Jun 12, 2025

/kind feature

What this PR does / why we need it:

Enable machines to be provisioned on to dedicated hosts.

Special notes for your reviewer:
Resumes work started in cluster-api-provider-aws#5504.

Checklist:

  • squashed commits
  • includes emoji in title
  • adds unit tests
  • adds or updates e2e tests

Release note:

Adds the capability of provisioning machines on to dedicated hosts.

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-priority labels Jun 12, 2025
@k8s-ci-robot k8s-ci-robot requested review from AndiDog and cnmcavoy June 12, 2025 12:18
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jun 12, 2025
Copy link
Contributor

@mtulio mtulio left a comment

Choose a reason for hiding this comment

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

Looks good, a few questions related to the API validation.

Copy link
Contributor

@mtulio mtulio left a comment

Choose a reason for hiding this comment

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

/lgtm

cc @nrb @richardcase

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 16, 2025
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: eeb699a9acb60c59cfb1b6da396ab9b431428e5d

@mtulio
Copy link
Contributor

mtulio commented Jun 16, 2025

/test ?

@k8s-ci-robot
Copy link
Contributor

@mtulio: The following commands are available to trigger required jobs:

/test pull-cluster-api-provider-aws-build
/test pull-cluster-api-provider-aws-build-docker
/test pull-cluster-api-provider-aws-e2e-blocking
/test pull-cluster-api-provider-aws-test
/test pull-cluster-api-provider-aws-verify

The following commands are available to trigger optional jobs:

/test pull-cluster-api-provider-aws-apidiff-main
/test pull-cluster-api-provider-aws-e2e
/test pull-cluster-api-provider-aws-e2e-clusterclass
/test pull-cluster-api-provider-aws-e2e-conformance
/test pull-cluster-api-provider-aws-e2e-conformance-with-ci-artifacts
/test pull-cluster-api-provider-aws-e2e-eks
/test pull-cluster-api-provider-aws-e2e-eks-gc
/test pull-cluster-api-provider-aws-e2e-eks-testing

Use /test all to run the following jobs that were automatically triggered:

pull-cluster-api-provider-aws-apidiff-main
pull-cluster-api-provider-aws-build
pull-cluster-api-provider-aws-build-docker
pull-cluster-api-provider-aws-e2e-blocking
pull-cluster-api-provider-aws-test
pull-cluster-api-provider-aws-verify

In response to this:

/test ?

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-sigs/prow repository.

@mtulio
Copy link
Contributor

mtulio commented Jun 16, 2025

/test pull-cluster-api-provider-aws-e2e

@mtulio
Copy link
Contributor

mtulio commented Jun 16, 2025

/test pull-cluster-api-provider-aws-e2e-eks

@mtulio
Copy link
Contributor

mtulio commented Jun 16, 2025

I manually canceled the e2e I triggered as e2e is still under investigation!

@rvanderp3
Copy link
Contributor Author

/hold

@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 Jun 16, 2025
@rvanderp3 rvanderp3 force-pushed the dedicated-host-rv branch from cdafa87 to c2cee83 Compare June 17, 2025 19:12
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 17, 2025
@k8s-ci-robot k8s-ci-robot requested a review from mtulio June 17, 2025 19:12
@rvanderp3
Copy link
Contributor Author

/hold cancel

@rvanderp3 rvanderp3 force-pushed the dedicated-host-rv branch from 4c1c1b5 to 1bcfdf7 Compare July 28, 2025 19:47
@rvanderp3 rvanderp3 force-pushed the dedicated-host-rv branch from 1bcfdf7 to 2ea5ce8 Compare July 28, 2025 20:23
@rvanderp3
Copy link
Contributor Author

changes implemented due to underlying function signature changes. placing hold while testing.

Copy link
Contributor

@punkwalker punkwalker left a comment

Choose a reason for hiding this comment

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

LGTM 🚀 (Once e2e are passing)

@richardcase
Copy link
Member

/test ?

@k8s-ci-robot
Copy link
Contributor

@richardcase: The following commands are available to trigger required jobs:

/test pull-cluster-api-provider-aws-build
/test pull-cluster-api-provider-aws-build-docker
/test pull-cluster-api-provider-aws-e2e-blocking
/test pull-cluster-api-provider-aws-test
/test pull-cluster-api-provider-aws-verify

The following commands are available to trigger optional jobs:

/test pull-cluster-api-provider-aws-apidiff-main
/test pull-cluster-api-provider-aws-e2e
/test pull-cluster-api-provider-aws-e2e-clusterclass
/test pull-cluster-api-provider-aws-e2e-conformance
/test pull-cluster-api-provider-aws-e2e-conformance-with-ci-artifacts
/test pull-cluster-api-provider-aws-e2e-eks
/test pull-cluster-api-provider-aws-e2e-eks-gc
/test pull-cluster-api-provider-aws-e2e-eks-testing

Use /test all to run the following jobs that were automatically triggered:

pull-cluster-api-provider-aws-apidiff-main
pull-cluster-api-provider-aws-build
pull-cluster-api-provider-aws-build-docker
pull-cluster-api-provider-aws-e2e-blocking
pull-cluster-api-provider-aws-test
pull-cluster-api-provider-aws-verify

In response to this:

/test ?

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-sigs/prow repository.

@richardcase
Copy link
Member

/test pull-cluster-api-provider-aws-e2e-eks
/test pull-cluster-api-provider-aws-e2e

@richardcase
Copy link
Member

Looks good from my side, however, until the aws-janitor change merges lets hold this:

/hold

Also lets check a larger set of e2e's

@richardcase
Copy link
Member

@rvanderp3 - looks like we will need to initially have the e2e test for the dedicated hosts disabled. I'll message you to discuss.

@rvanderp3
Copy link
Contributor Author

/hold cancel

testing looks good on my side

@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 Jul 29, 2025
@rvanderp3 rvanderp3 force-pushed the dedicated-host-rv branch from ad156e5 to d9d72f7 Compare July 29, 2025 16:51
@k8s-ci-robot
Copy link
Contributor

k8s-ci-robot commented Jul 29, 2025

@rvanderp3: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-cluster-api-provider-aws-e2e c2cee83 link false /test pull-cluster-api-provider-aws-e2e

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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-sigs/prow repository. I understand the commands that are listed here.

@rvanderp3
Copy link
Contributor Author

/retest-required

Copy link
Contributor

@mtulio mtulio left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 31, 2025
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 4a9d5bce713bd76208f054efb69d01026b413323

@rvanderp3
Copy link
Contributor Author

/assign @richardcase

@richardcase
Copy link
Member

Thanks for this @rvanderp3 .

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: richardcase

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 Aug 8, 2025
@k8s-ci-robot k8s-ci-robot merged commit 5f62ff6 into kubernetes-sigs:main Aug 8, 2025
18 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v2.8 milestone Aug 8, 2025
// When hostAffinity is set to default, and you stop and restart the instance, it can be restarted on any available host.
// When HostAffinity is defined, HostID is required.
// +optional
// +kubebuilder:validation:Enum:=default;host

Choose a reason for hiding this comment

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

NIt, these should be PascalCase to be consistent with K8s conventions

// When HostAffinity is defined, HostID is required.
// +optional
// +kubebuilder:validation:Enum:=default;host
HostAffinity *string `json:"hostAffinity,omitempty"`

Choose a reason for hiding this comment

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

No need for this to be a pointer as the zero value is not a valid choice


// HostID specifies the Dedicated Host on which the instance must be started.
// +optional
HostID *string `json:"hostID,omitempty"`

Choose a reason for hiding this comment

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

Ideally this would set both minimum and maximum length constraints, also, is there a pattern that is valid for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good callouts @JoelSpeed , will follow up with another PR. there is a pattern we could check for validation

jimzim added a commit to jimzim/cluster-api-provider-aws that referenced this pull request Aug 9, 2025
This commit implements dynamic dedicated host allocation capability to support
bare metal workloads like OpenShift Virtualization with HyperShift on ROSA HCP,
particularly for BYOL Microsoft Windows workloads.

Key changes:
- Add DynamicHostAllocationSpec API with instance family, type, quantity, AZ, and tagging support
- Implement dedicated host service with allocation, release, and validation operations
- Integrate dynamic allocation into machine lifecycle with automatic cleanup
- Add comprehensive webhook validation for configuration consistency
- Include unit tests and usage examples
- Generate updated CRDs with new API fields

The implementation follows existing CAPA patterns from PR kubernetes-sigs#5548 and provides
automatic provisioning and management of AWS dedicated hosts based on
instance requirements.

Related: kubernetes-sigs#5548
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants