api icon indicating copy to clipboard operation
api copied to clipboard

SPLAT-2615: Added support for legacy AWS dedicated hosts

Open vr4manta opened this issue 1 month ago • 9 comments

SPLAT-2615

Changes

  • Added new dynamic dedicated host support

Notes

For dynamic hosts, we are currently allowing admins to provide a set of tags to apply to the new host. Other future enhancements for it can be contained in the new DynamicHostAllocation struct. This PR is implementing the OCP equivalent to the changes in https://github.com/kubernetes-sigs/cluster-api-provider-aws/pull/5631.

vr4manta avatar Jan 15 '26 19:01 vr4manta

Pipeline controller notification This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: LGTM mode

openshift-ci-robot avatar Jan 15 '26 19:01 openshift-ci-robot

@vr4manta: This pull request references SPLAT-2615 which is a valid jira issue.

In response to this:

SPLAT-2615

Changes

  • Added new dynamic dedicated host support

Notes

For dynamic hosts, we are currently allowing admins to provide a set of tags to apply to the new host. Other future enhancements for it can be contained in the new DynamicHostAllocation struct.

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 openshift-eng/jira-lifecycle-plugin repository.

openshift-ci-robot avatar Jan 15 '26 19:01 openshift-ci-robot

Hello @vr4manta! Some important instructions when contributing to openshift/api: API design plays an important part in the user experience of OpenShift and as such API PRs are subject to a high level of scrutiny to ensure they follow our best practices. If you haven't already done so, please review the OpenShift API Conventions and ensure that your proposed changes are compliant. Following these conventions will help expedite the api review process for your PR.

openshift-ci[bot] avatar Jan 15 '26 19:01 openshift-ci[bot]

[!NOTE]

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

📝 Walkthrough

Walkthrough

Adds a new DedicatedHostStatus field to AWSMachineProviderStatus and introduces AllocationStrategy (constants UserProvided, Dynamic). Extends DedicatedHost with optional allocationStrategy and dynamicHostAllocation, makes id an optional union member, and adds DynamicHostAllocationSpec (Tags map). Adds kubebuilder XValidation and union annotations enforcing mutual exclusivity and usage rules. Regenerates deepcopy logic and updates Swagger/OpenAPI and openapi.json to expose the new types and schema changes.

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly indicates the PR adds support for dynamic AWS dedicated hosts, which is the primary change reflected across all modified files.
Description check ✅ Passed The description adequately explains the changes: adding dynamic dedicated host support with tag configuration capability, references the Jira issue, and links to the upstream CAPA equivalent PR.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • [ ] 📝 Generate docstrings

[!WARNING] There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 golangci-lint (2.5.0)

Error: build linters: unable to load custom analyzer "kubeapilinter": tools/_output/bin/kube-api-linter.so, plugin: not implemented The command is terminated due to an error: build linters: unable to load custom analyzer "kubeapilinter": tools/_output/bin/kube-api-linter.so, plugin: not implemented


Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot] avatar Jan 15 '26 19:01 coderabbitai[bot]

@vr4manta: This pull request references SPLAT-2615 which is a valid jira issue.

In response to this:

SPLAT-2615

Changes

  • Added new dynamic dedicated host support

Notes

For dynamic hosts, we are currently allowing admins to provide a set of tags to apply to the new host. Other future enhancements for it can be contained in the new DynamicHostAllocation struct. This PR is implementing the OCP equivalent to the changes in https://github.com/kubernetes-sigs/cluster-api-provider-aws/pull/5631.

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 openshift-eng/jira-lifecycle-plugin repository.

openshift-ci-robot avatar Jan 15 '26 19:01 openshift-ci-robot

/assign @everettraven

vr4manta avatar Jan 16 '26 13:01 vr4manta

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Once this PR has been reviewed and has the lgtm label, please ask for approval from everettraven. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

openshift-ci[bot] avatar Jan 16 '26 14:01 openshift-ci[bot]

After some reviews, gonna make some small changes to not add a new affinity to keep in line with AWS.

vr4manta avatar Jan 16 '26 18:01 vr4manta

No integration tests exist for DedicatedHost union validation, can we add them in a location like machine/v1beta1/tests/awsmachineproviderconfig.machine.openshift.io/DedicatedHost.testsuite.yaml?

I can try. In past experiences since the machine spec sections are not CRD validated, we've done these over in the MAO project via unit tests where the webhook does the actual validation.

vr4manta avatar Jan 21 '26 12:01 vr4manta

@vr4manta: all tests passed!

Full PR test history. Your PR dashboard.

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.

openshift-ci[bot] avatar Jan 21 '26 20:01 openshift-ci[bot]