Skip to content

OCPEDGE-2408, OCPEDGE-2410: Add AdaptableTopology feature gate and enum to Infrastructure API#2820

Open
jeff-roche wants to merge 1 commit intoopenshift:masterfrom
jeff-roche:adaptable-topology
Open

OCPEDGE-2408, OCPEDGE-2410: Add AdaptableTopology feature gate and enum to Infrastructure API#2820
jeff-roche wants to merge 1 commit intoopenshift:masterfrom
jeff-roche:adaptable-topology

Conversation

@jeff-roche
Copy link
Copy Markdown

Summary

  • Add AdaptableTopology feature gate (DevPreviewNoUpgrade) and AdaptableTopologyMode enum constant to the Infrastructure API
  • Add FeatureGateAwareEnum markers on both controlPlaneTopology and infrastructureTopology to accept Adaptable when the feature gate is enabled
  • Fix a pre-existing non-transitive sort bug in the codegen manifest merge that caused compound featuregated CRD overlays to be applied in the wrong order

Details

Adaptable Topology enables clusters to dynamically adjust control-plane and infrastructure behavior based on current node count. This PR adds the foundational API types — the feature gate definition, the enum constant, and the validation markers that gate the new value behind DevPreviewNoUpgrade.

A compound AdaptableTopology+DualReplica marker is required for controlPlaneTopology because both feature gates are enabled in DevPreview and the CRD composition uses Server-Side Apply with Force=true (last overlay wins). The codegen sort fix (first commit) ensures compound overlays are always applied after all single-gate overlays.

Test plan

  • New AdaptableTopology.yaml integration tests pass (controlPlaneTopology and infrastructureTopology both accept Adaptable when gated)
  • Existing DualReplica.yaml and HighlyAvailableArbiter.yaml tests unaffected
  • DevPreview CRD includes Adaptable in both topology enums
  • Default/TechPreview/OKD CRDs do NOT include Adaptable
  • make verify passes

🤖 Generated with Claude Code

@openshift-merge-bot
Copy link
Copy Markdown
Contributor

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
Copy link
Copy Markdown

openshift-ci-robot commented Apr 22, 2026

@jeff-roche: This pull request references OCPEDGE-2408 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set.

This pull request references OCPEDGE-2410 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Summary

  • Add AdaptableTopology feature gate (DevPreviewNoUpgrade) and AdaptableTopologyMode enum constant to the Infrastructure API
  • Add FeatureGateAwareEnum markers on both controlPlaneTopology and infrastructureTopology to accept Adaptable when the feature gate is enabled
  • Fix a pre-existing non-transitive sort bug in the codegen manifest merge that caused compound featuregated CRD overlays to be applied in the wrong order

Details

Adaptable Topology enables clusters to dynamically adjust control-plane and infrastructure behavior based on current node count. This PR adds the foundational API types — the feature gate definition, the enum constant, and the validation markers that gate the new value behind DevPreviewNoUpgrade.

A compound AdaptableTopology+DualReplica marker is required for controlPlaneTopology because both feature gates are enabled in DevPreview and the CRD composition uses Server-Side Apply with Force=true (last overlay wins). The codegen sort fix (first commit) ensures compound overlays are always applied after all single-gate overlays.

Test plan

  • New AdaptableTopology.yaml integration tests pass (controlPlaneTopology and infrastructureTopology both accept Adaptable when gated)
  • Existing DualReplica.yaml and HighlyAvailableArbiter.yaml tests unaffected
  • DevPreview CRD includes Adaptable in both topology enums
  • Default/TechPreview/OKD CRDs do NOT include Adaptable
  • make verify passes

🤖 Generated with Claude Code

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 openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Apr 22, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 22, 2026

Hello @jeff-roche! 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.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 22, 2026

📝 Walkthrough

Walkthrough

This pull request introduces a new AdaptableTopology feature gate to OpenShift infrastructure configuration. Changes include: adding a new Adaptable topology mode constant to the Infrastructure types; creating CRD test configurations to verify the mode's behavior; documenting the feature gate with DevPreviewNoUpgrade status for SelfManagedHA clusters; defining the feature gate with Jira reporting and profile restrictions; and updating nine feature gate manifests across different deployment profiles and modes to reflect the new gate's enabled/disabled states appropriately.

🚥 Pre-merge checks | ✅ 12
✅ Passed checks (12 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically summarizes the main changes: adding an AdaptableTopology feature gate and enum to the Infrastructure API, directly matching the changeset.
Description check ✅ Passed The description is well-related to the changeset, covering the feature gate addition, enum constant, validation markers, and even a codegen bug fix present in the changes.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed All test names in the AdaptableTopology.yaml file are stable and deterministic with only static, descriptive strings containing no dynamic identifiers, timestamps, or generated suffixes.
Test Structure And Quality ✅ Passed The AdaptableTopology.yaml test specification follows established patterns, has single responsibility per test case, proper setup/cleanup via Ginkgo framework, framework-level timeout management, and is consistent with comparable test files.
Microshift Test Compatibility ✅ Passed The PR adds only a YAML-based CRD validation test, not a Ginkgo e2e test. The check specifically applies to Ginkgo tests (It, Describe, Context, When) and is not applicable to YAML test configuration files.
Single Node Openshift (Sno) Test Compatibility ✅ Passed The PR adds only a CRD test configuration file that validates the Infrastructure API schema, not Ginkgo e2e tests.
Topology-Aware Scheduling Compatibility ✅ Passed PR adds AdaptableTopologyMode enum for reporting infrastructure topology with no scheduling constraints, affinity rules, or operator code.
Ote Binary Stdout Contract ✅ Passed Pull request contains only API type definitions, feature gate configurations, documentation, and test data with no new OTE test binaries or process-level stdout-writing code.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed Pull request adds no Ginkgo e2e tests, only declarative CRD configuration with no network dependencies or external connectivity requirements.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.11.4)

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


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@openshift-ci openshift-ci Bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Apr 22, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 22, 2026

[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 assign joelspeed for approval. For more information see the Code Review Process.

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

Details 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

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (4)
payload-manifests/crds/0000_10_config-operator_01_infrastructures-OKD.crd.yaml (1)

1055-1116: ⚠️ Potential issue | 🟡 Minor

Remove "Adaptable" mode descriptions from OKD, Default, and TechPreviewNoUpgrade variants' enums mismatch.

The OKD, Default, and TechPreviewNoUpgrade CRD variants describe both controlPlaneTopology and infrastructureTopology as supporting an 'Adaptable' mode, but do not include Adaptable in the actual enum values. This creates confusing documentation for users—they will read about a feature in the description that they cannot actually set in those variants.

The CustomNoUpgrade and DevPreviewNoUpgrade variants correctly include both the description and enum entry for Adaptable. Consider aligning the OKD/Default/TechPreviewNoUpgrade variants to remove the 'Adaptable' mode description blurbs to match their enums.

Minor issue — does not affect validation, only user-facing docs.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@payload-manifests/crds/0000_10_config-operator_01_infrastructures-OKD.crd.yaml`
around lines 1055 - 1116, The descriptions for controlPlaneTopology and
infrastructureTopology in the OKD/Default/TechPreviewNoUpgrade CRD variants
mention an 'Adaptable' mode that is not present in their enum lists; remove the
sentences referencing the 'Adaptable' behavior from the description blocks for
controlPlaneTopology and infrastructureTopology in those variants so the prose
matches the enum, leaving the enum entries unchanged; note that CustomNoUpgrade
and DevPreviewNoUpgrade already include both the description and enum for
Adaptable, so do not modify those variants.
payload-manifests/crds/0000_10_config-operator_01_infrastructures-TechPreviewNoUpgrade.crd.yaml (1)

1132-1139: ⚠️ Potential issue | 🟡 Minor

Keep TechPreview docs aligned with the rejected enum values.

This TechPreviewNoUpgrade CRD documents Adaptable, but both enums still reject it. Since the PR objective says TechPreview must not include Adaptable, these generated descriptions should not advertise it here; otherwise users see an option the API will reject.

📝 Proposed generated-output fix
-                  The 'Adaptable' mode indicates the cluster dynamically adjusts control-plane behavior based on
-                  current node count.
                 enum:
                 - HighlyAvailable
                 - HighlyAvailableArbiter
                 - SingleReplica
                 - DualReplica
                 - External
@@
-                  The 'Adaptable' mode indicates the cluster dynamically adjusts infrastructure behavior based on
-                  current node count.
                   NOTE: External topology mode is not applicable for this field.
                 enum:
                 - HighlyAvailable
                 - SingleReplica

Please apply this through the source markers/codegen path so regeneration does not reintroduce the mismatch.

Also applies to: 1176-1182

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@payload-manifests/crds/0000_10_config-operator_01_infrastructures-TechPreviewNoUpgrade.crd.yaml`
around lines 1132 - 1139, The CRD description for TechPreviewNoUpgrade
incorrectly mentions "Adaptable" even though the enum list (values:
HighlyAvailable, HighlyAvailableArbiter, SingleReplica, DualReplica, External)
rejects it; update the codegen/source marker that generates the description (the
TechPreviewNoUpgrade CRD docstring generator) to remove any reference to
"Adaptable" so the generated text matches the enum, and apply the same change
for the second occurrence corresponding to the block around lines 1176-1182;
regenerate the manifest to ensure the description and the enum values are
consistent.
payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-OKD.crd.yaml (1)

1346-1407: ⚠️ Potential issue | 🟡 Minor

Description mentions Adaptable but the OKD enum does not accept it.

The description text added at lines 1357-1358 (controlPlaneTopology) and 1401-1402 (infrastructureTopology) tells users that an Adaptable mode exists, but the enum lists for this OKD variant (lines 1360-1364 and 1405-1406) do not include Adaptable. That's consistent with AdaptableTopology being a DevPreviewNoUpgrade gate that OKD does not enable — but it means a user reading this CRD will see Adaptable documented and then get an enum-validation rejection when they try to set it.

Since descriptions on the embedded infra status field come straight from the Go doc comment in config/v1/types_infrastructure.go and are not feature-gate-filtered, the mismatch will also appear in the Default and TechPreviewNoUpgrade variants. Consider either:

  • scoping the Adaptable sentences in the Go doc comment to note they only apply when the AdaptableTopology feature gate is enabled, or
  • accepting this as a known quirk of non-gated description text and confirming docs consumers understand the enum is authoritative.

Worth confirming this is intentional for the OKD payload before merging.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-OKD.crd.yaml`
around lines 1346 - 1407, The description mentions an "Adaptable" topology mode
but the OKD CRD enums for controlPlaneTopology and infrastructureTopology
(symbols: controlPlaneTopology, infrastructureTopology, and the documented
Adaptable mode) don't include it, causing a mismatch; fix by either updating the
source Go doc comment that feeds these CRD descriptions (e.g., the comment near
the types that define controlPlaneTopology/infrastructureTopology) to explicitly
state that "Adaptable" is only valid when the AdaptableTopology feature gate is
enabled, or adjust the OKD CRD description to remove or qualify the Adaptable
sentences so they clearly indicate they are conditional on the AdaptableTopology
gate (ensure the change targets the doc comment that generates the CRD
description or the OKD-specific CRD templating path so the enum remains
authoritative).
payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-TechPreviewNoUpgrade.crd.yaml (1)

1425-1432: ⚠️ Potential issue | 🟡 Minor

Don’t document Adaptable in the TechPreview CRD unless the enum allows it.

This TechPreviewNoUpgrade manifest still rejects Adaptable because both enums omit it, but the descriptions now advertise it. That makes generated OpenAPI/kubectl explain docs misleading for a value that should be DevPreview-only per the PR objective.

Please remove these lines from non-DevPreview generated CRDs, or gate the generated description alongside the enum overlay.

Proposed generated-manifest shape
                           The 'HighlyAvailableArbiter' mode indicates that the control plane will consist of 2 control-plane nodes
                           that run conventional services and 1 smaller sized arbiter node that runs a bare minimum of services to maintain quorum.
-                          The 'Adaptable' mode indicates the cluster dynamically adjusts control-plane behavior based on
-                          current node count.
                         enum:
                         - HighlyAvailable
                         - HighlyAvailableArbiter
@@
                           The 'SingleReplica' mode will be used in single-node deployments
                           and the operators should not configure the operand for highly-available operation
-                          The 'Adaptable' mode indicates the cluster dynamically adjusts infrastructure behavior based on
-                          current node count.
                           NOTE: External topology mode is not applicable for this field.
                         enum:
                         - HighlyAvailable

Also applies to: 1469-1475

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-TechPreviewNoUpgrade.crd.yaml`
around lines 1425 - 1432, The TechPreviewNoUpgrade CRD still mentions the
'Adaptable' mode in its description while the enum arrays in this manifest (the
enum values under the control-plane replicaMode field in the
TechPreviewNoUpgrade CRD) do not include 'Adaptable'; update the manifest so
docs and schema match by either removing the descriptive lines that reference
'Adaptable' from the TechPreviewNoUpgrade CRD or gating that description behind
the DevPreview overlay, or alternatively add 'Adaptable' to the enum only in the
DevPreview/Dev-only CRD; make the change in the description block and the enum
values near the replicaMode field (the enum entries "- HighlyAvailable" ... "-
External") and apply the same fix to the other occurrence noted (around the
1469-1475 area).
🧹 Nitpick comments (1)
config/v1/tests/infrastructures.config.openshift.io/AdaptableTopology.yaml (1)

7-16: Consider adding negative test coverage for Adaptable.

The onCreate case only asserts that an empty spec is accepted, which doesn't exercise anything specific to the AdaptableTopology gate — it would pass regardless of this PR. Similarly, the onUpdate cases only cover the happy path. Consider adding:

  • An onUpdate case asserting that status.controlPlaneTopology: Adaptable is rejected without the feature gate (covered implicitly by other test files, but worth confirming).
  • An onUpdate case asserting that an invalid topology value (e.g., Bogus) is rejected under this gate, to guard against the enum being accidentally widened.

Not blocking — existing coverage via DualReplica.yaml / HighlyAvailableArbiter.yaml patterns likely exists; just flagging for parity.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@config/v1/tests/infrastructures.config.openshift.io/AdaptableTopology.yaml`
around lines 7 - 16, Add negative onUpdate test cases to AdaptableTopology.yaml
to exercise the AdaptableTopology gate: add one onUpdate case that sets
status.controlPlaneTopology: Adaptable and expects rejection when the feature
gate is not enabled (name it e.g. "Reject Adaptable without feature gate"), and
add another onUpdate case that sets status.controlPlaneTopology: Bogus (or other
invalid enum) and expects rejection even when the AdaptableTopology gate is
enabled (name it e.g. "Reject invalid topology value"), ensuring the test bodies
reference status.controlPlaneTopology and the gate toggle used elsewhere so they
fail when validation should block the change.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@config/v1/types_infrastructure.go`:
- Around line 110-113: The FeatureGateAwareEnum annotation with
featureGate=AdaptableTopology incorrectly includes "DualReplica"; update the
annotation on the types_infrastructure.go struct (the line starting with
+openshift:validation:FeatureGateAwareEnum:featureGate=AdaptableTopology,enum=...)
to remove "DualReplica" so that the AdaptableTopology-only overlay only adds
"Adaptable" (i.e., ensure the enum list mirrors the second field's pattern and
does not include DualReplica).

In `@features/features.go`:
- Line 752: The call to
enhancementPR("https://github.com/openshift/enhancements/pull/XXXX") contains a
placeholder URL that 404s; update that enhancementPR invocation to point to the
real enhancement PR (replace the URL with the actual pull request URL/number)
or, if there is no enhancement PR, remove the placeholder call and use
legacyFeatureGateWithoutEnhancement in its place so the feature entry is valid;
look for the enhancementPR(...) expression in the features.go entry and change
it accordingly.

In
`@payload-manifests/crds/0000_10_config-operator_01_infrastructures-Default.crd.yaml`:
- Around line 1066-1067: The CRD description strings that state "The 'Adaptable'
mode indicates the cluster dynamically adjusts control-plane behavior based on
current node count." (and the similar text at the second occurrence) advertise a
topology value that this Default CRD's enum validation does not accept; remove
these two description lines or modify them to explicitly state that "Adaptable"
is feature-gated/unavailable in this CRD, and ensure the CRD's enum (the
topology enum declared in this Default CRD) and its description are consistent
so the docs do not advertise an unsupported value.

In
`@payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-Default.crd.yaml`:
- Around line 1357-1358: The Default CRD currently mentions "Adaptable" in the
topology mode descriptions even though the Default CRD's topology enum does not
include "Adaptable"; update the Default CRD description text in
controllerconfigs-Default.crd.yaml to either remove the "Adaptable" wording or
wrap the sentence with the same enum-overlay gating used elsewhere so the
description only appears when the topology enum includes "Adaptable". Locate the
topology description blocks (the human-readable string mentioning "Adaptable"
under the topology/mode fields) and either delete the "Adaptable" sentence or
conditionally include it via the overlay mechanism so the Default CRD no longer
advertises a mode it rejects.

---

Outside diff comments:
In
`@payload-manifests/crds/0000_10_config-operator_01_infrastructures-OKD.crd.yaml`:
- Around line 1055-1116: The descriptions for controlPlaneTopology and
infrastructureTopology in the OKD/Default/TechPreviewNoUpgrade CRD variants
mention an 'Adaptable' mode that is not present in their enum lists; remove the
sentences referencing the 'Adaptable' behavior from the description blocks for
controlPlaneTopology and infrastructureTopology in those variants so the prose
matches the enum, leaving the enum entries unchanged; note that CustomNoUpgrade
and DevPreviewNoUpgrade already include both the description and enum for
Adaptable, so do not modify those variants.

In
`@payload-manifests/crds/0000_10_config-operator_01_infrastructures-TechPreviewNoUpgrade.crd.yaml`:
- Around line 1132-1139: The CRD description for TechPreviewNoUpgrade
incorrectly mentions "Adaptable" even though the enum list (values:
HighlyAvailable, HighlyAvailableArbiter, SingleReplica, DualReplica, External)
rejects it; update the codegen/source marker that generates the description (the
TechPreviewNoUpgrade CRD docstring generator) to remove any reference to
"Adaptable" so the generated text matches the enum, and apply the same change
for the second occurrence corresponding to the block around lines 1176-1182;
regenerate the manifest to ensure the description and the enum values are
consistent.

In
`@payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-OKD.crd.yaml`:
- Around line 1346-1407: The description mentions an "Adaptable" topology mode
but the OKD CRD enums for controlPlaneTopology and infrastructureTopology
(symbols: controlPlaneTopology, infrastructureTopology, and the documented
Adaptable mode) don't include it, causing a mismatch; fix by either updating the
source Go doc comment that feeds these CRD descriptions (e.g., the comment near
the types that define controlPlaneTopology/infrastructureTopology) to explicitly
state that "Adaptable" is only valid when the AdaptableTopology feature gate is
enabled, or adjust the OKD CRD description to remove or qualify the Adaptable
sentences so they clearly indicate they are conditional on the AdaptableTopology
gate (ensure the change targets the doc comment that generates the CRD
description or the OKD-specific CRD templating path so the enum remains
authoritative).

In
`@payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-TechPreviewNoUpgrade.crd.yaml`:
- Around line 1425-1432: The TechPreviewNoUpgrade CRD still mentions the
'Adaptable' mode in its description while the enum arrays in this manifest (the
enum values under the control-plane replicaMode field in the
TechPreviewNoUpgrade CRD) do not include 'Adaptable'; update the manifest so
docs and schema match by either removing the descriptive lines that reference
'Adaptable' from the TechPreviewNoUpgrade CRD or gating that description behind
the DevPreview overlay, or alternatively add 'Adaptable' to the enum only in the
DevPreview/Dev-only CRD; make the change in the description block and the enum
values near the replicaMode field (the enum entries "- HighlyAvailable" ... "-
External") and apply the same fix to the other occurrence noted (around the
1469-1475 area).

---

Nitpick comments:
In `@config/v1/tests/infrastructures.config.openshift.io/AdaptableTopology.yaml`:
- Around line 7-16: Add negative onUpdate test cases to AdaptableTopology.yaml
to exercise the AdaptableTopology gate: add one onUpdate case that sets
status.controlPlaneTopology: Adaptable and expects rejection when the feature
gate is not enabled (name it e.g. "Reject Adaptable without feature gate"), and
add another onUpdate case that sets status.controlPlaneTopology: Bogus (or other
invalid enum) and expects rejection even when the AdaptableTopology gate is
enabled (name it e.g. "Reject invalid topology value"), ensuring the test bodies
reference status.controlPlaneTopology and the gate toggle used elsewhere so they
fail when validation should block the change.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: c86170c6-c79d-4207-88be-d6bd0f27e642

📥 Commits

Reviewing files that changed from the base of the PR and between 34e6087 and 5556bd5.

⛔ Files ignored due to path filters (42)
  • config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-CustomNoUpgrade.crd.yaml is excluded by !**/zz_generated.crd-manifests/*
  • config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-Default.crd.yaml is excluded by !**/zz_generated.crd-manifests/*
  • config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-DevPreviewNoUpgrade.crd.yaml is excluded by !**/zz_generated.crd-manifests/*
  • config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-OKD.crd.yaml is excluded by !**/zz_generated.crd-manifests/*
  • config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-TechPreviewNoUpgrade.crd.yaml is excluded by !**/zz_generated.crd-manifests/*
  • config/v1/zz_generated.featuregated-crd-manifests.yaml is excluded by !**/zz_generated*
  • config/v1/zz_generated.featuregated-crd-manifests/infrastructures.config.openshift.io/AAA_ungated.yaml is excluded by !**/zz_generated.featuregated-crd-manifests/**
  • config/v1/zz_generated.featuregated-crd-manifests/infrastructures.config.openshift.io/AWSClusterHostedDNSInstall.yaml is excluded by !**/zz_generated.featuregated-crd-manifests/**
  • config/v1/zz_generated.featuregated-crd-manifests/infrastructures.config.openshift.io/AWSDualStackInstall.yaml is excluded by !**/zz_generated.featuregated-crd-manifests/**
  • config/v1/zz_generated.featuregated-crd-manifests/infrastructures.config.openshift.io/AdaptableTopology+DualReplica.yaml is excluded by !**/zz_generated.featuregated-crd-manifests/**
  • config/v1/zz_generated.featuregated-crd-manifests/infrastructures.config.openshift.io/AdaptableTopology.yaml is excluded by !**/zz_generated.featuregated-crd-manifests/**
  • config/v1/zz_generated.featuregated-crd-manifests/infrastructures.config.openshift.io/AzureClusterHostedDNSInstall.yaml is excluded by !**/zz_generated.featuregated-crd-manifests/**
  • config/v1/zz_generated.featuregated-crd-manifests/infrastructures.config.openshift.io/AzureDualStackInstall.yaml is excluded by !**/zz_generated.featuregated-crd-manifests/**
  • config/v1/zz_generated.featuregated-crd-manifests/infrastructures.config.openshift.io/DualReplica.yaml is excluded by !**/zz_generated.featuregated-crd-manifests/**
  • config/v1/zz_generated.featuregated-crd-manifests/infrastructures.config.openshift.io/DyanmicServiceEndpointIBMCloud.yaml is excluded by !**/zz_generated.featuregated-crd-manifests/**
  • config/v1/zz_generated.featuregated-crd-manifests/infrastructures.config.openshift.io/NutanixMultiSubnets.yaml is excluded by !**/zz_generated.featuregated-crd-manifests/**
  • config/v1/zz_generated.featuregated-crd-manifests/infrastructures.config.openshift.io/OnPremDNSRecords.yaml is excluded by !**/zz_generated.featuregated-crd-manifests/**
  • config/v1/zz_generated.featuregated-crd-manifests/infrastructures.config.openshift.io/VSphereHostVMGroupZonal.yaml is excluded by !**/zz_generated.featuregated-crd-manifests/**
  • config/v1/zz_generated.featuregated-crd-manifests/infrastructures.config.openshift.io/VSphereMultiNetworks.yaml is excluded by !**/zz_generated.featuregated-crd-manifests/**
  • config/v1/zz_generated.swagger_doc_generated.go is excluded by !**/zz_generated*
  • machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_controllerconfigs-CustomNoUpgrade.crd.yaml is excluded by !**/zz_generated.crd-manifests/*
  • machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_controllerconfigs-Default.crd.yaml is excluded by !**/zz_generated.crd-manifests/*
  • machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_controllerconfigs-DevPreviewNoUpgrade.crd.yaml is excluded by !**/zz_generated.crd-manifests/*
  • machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_controllerconfigs-OKD.crd.yaml is excluded by !**/zz_generated.crd-manifests/*
  • machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_controllerconfigs-TechPreviewNoUpgrade.crd.yaml is excluded by !**/zz_generated.crd-manifests/*
  • machineconfiguration/v1/zz_generated.featuregated-crd-manifests.yaml is excluded by !**/zz_generated*
  • machineconfiguration/v1/zz_generated.featuregated-crd-manifests/controllerconfigs.machineconfiguration.openshift.io/AAA_ungated.yaml is excluded by !**/zz_generated.featuregated-crd-manifests/**
  • machineconfiguration/v1/zz_generated.featuregated-crd-manifests/controllerconfigs.machineconfiguration.openshift.io/AWSClusterHostedDNSInstall.yaml is excluded by !**/zz_generated.featuregated-crd-manifests/**
  • machineconfiguration/v1/zz_generated.featuregated-crd-manifests/controllerconfigs.machineconfiguration.openshift.io/AWSDualStackInstall.yaml is excluded by !**/zz_generated.featuregated-crd-manifests/**
  • machineconfiguration/v1/zz_generated.featuregated-crd-manifests/controllerconfigs.machineconfiguration.openshift.io/AWSEuropeanSovereignCloudInstall.yaml is excluded by !**/zz_generated.featuregated-crd-manifests/**
  • machineconfiguration/v1/zz_generated.featuregated-crd-manifests/controllerconfigs.machineconfiguration.openshift.io/AdaptableTopology+DualReplica.yaml is excluded by !**/zz_generated.featuregated-crd-manifests/**
  • machineconfiguration/v1/zz_generated.featuregated-crd-manifests/controllerconfigs.machineconfiguration.openshift.io/AdaptableTopology.yaml is excluded by !**/zz_generated.featuregated-crd-manifests/**
  • machineconfiguration/v1/zz_generated.featuregated-crd-manifests/controllerconfigs.machineconfiguration.openshift.io/AzureClusterHostedDNSInstall.yaml is excluded by !**/zz_generated.featuregated-crd-manifests/**
  • machineconfiguration/v1/zz_generated.featuregated-crd-manifests/controllerconfigs.machineconfiguration.openshift.io/AzureDualStackInstall.yaml is excluded by !**/zz_generated.featuregated-crd-manifests/**
  • machineconfiguration/v1/zz_generated.featuregated-crd-manifests/controllerconfigs.machineconfiguration.openshift.io/DualReplica.yaml is excluded by !**/zz_generated.featuregated-crd-manifests/**
  • machineconfiguration/v1/zz_generated.featuregated-crd-manifests/controllerconfigs.machineconfiguration.openshift.io/DyanmicServiceEndpointIBMCloud.yaml is excluded by !**/zz_generated.featuregated-crd-manifests/**
  • machineconfiguration/v1/zz_generated.featuregated-crd-manifests/controllerconfigs.machineconfiguration.openshift.io/NutanixMultiSubnets.yaml is excluded by !**/zz_generated.featuregated-crd-manifests/**
  • machineconfiguration/v1/zz_generated.featuregated-crd-manifests/controllerconfigs.machineconfiguration.openshift.io/OnPremDNSRecords.yaml is excluded by !**/zz_generated.featuregated-crd-manifests/**
  • machineconfiguration/v1/zz_generated.featuregated-crd-manifests/controllerconfigs.machineconfiguration.openshift.io/VSphereHostVMGroupZonal.yaml is excluded by !**/zz_generated.featuregated-crd-manifests/**
  • machineconfiguration/v1/zz_generated.featuregated-crd-manifests/controllerconfigs.machineconfiguration.openshift.io/VSphereMultiNetworks.yaml is excluded by !**/zz_generated.featuregated-crd-manifests/**
  • openapi/generated_openapi/zz_generated.openapi.go is excluded by !openapi/**, !**/zz_generated*
  • openapi/openapi.json is excluded by !openapi/**
📒 Files selected for processing (23)
  • config/v1/tests/infrastructures.config.openshift.io/AdaptableTopology.yaml
  • config/v1/types_infrastructure.go
  • features.md
  • features/features.go
  • payload-manifests/crds/0000_10_config-operator_01_infrastructures-CustomNoUpgrade.crd.yaml
  • payload-manifests/crds/0000_10_config-operator_01_infrastructures-Default.crd.yaml
  • payload-manifests/crds/0000_10_config-operator_01_infrastructures-DevPreviewNoUpgrade.crd.yaml
  • payload-manifests/crds/0000_10_config-operator_01_infrastructures-OKD.crd.yaml
  • payload-manifests/crds/0000_10_config-operator_01_infrastructures-TechPreviewNoUpgrade.crd.yaml
  • payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-CustomNoUpgrade.crd.yaml
  • payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-Default.crd.yaml
  • payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-DevPreviewNoUpgrade.crd.yaml
  • payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-OKD.crd.yaml
  • payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-TechPreviewNoUpgrade.crd.yaml
  • payload-manifests/featuregates/featureGate-4-10-Hypershift-Default.yaml
  • payload-manifests/featuregates/featureGate-4-10-Hypershift-DevPreviewNoUpgrade.yaml
  • payload-manifests/featuregates/featureGate-4-10-Hypershift-OKD.yaml
  • payload-manifests/featuregates/featureGate-4-10-Hypershift-TechPreviewNoUpgrade.yaml
  • payload-manifests/featuregates/featureGate-4-10-SelfManagedHA-Default.yaml
  • payload-manifests/featuregates/featureGate-4-10-SelfManagedHA-DevPreviewNoUpgrade.yaml
  • payload-manifests/featuregates/featureGate-4-10-SelfManagedHA-OKD.yaml
  • payload-manifests/featuregates/featureGate-4-10-SelfManagedHA-TechPreviewNoUpgrade.yaml
  • tools/codegen/pkg/manifestmerge/generator.go

Comment thread config/v1/types_infrastructure.go Outdated
Comment thread features/features.go Outdated
@jeff-roche
Copy link
Copy Markdown
Author

/retest

Copy link
Copy Markdown
Contributor

@jaypoulz jaypoulz left a comment

Choose a reason for hiding this comment

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

Just a few notes of things I thought looked funny. Going to ping @eggfoobar for a second pair of eyes.

Comment thread config/v1/tests/infrastructures.config.openshift.io/AdaptableTopology.yaml Outdated
Comment thread features.md Outdated
Adds the AdaptableTopology feature gate scoped to SelfManaged clusters
at DevPreviewNoUpgrade. Introduces the Adaptable enum value for both
controlPlaneTopology and infrastructureTopology fields, gated behind
the AdaptableTopology feature gate.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@openshift-ci openshift-ci Bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Apr 24, 2026
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@config/v1/types_infrastructure.go`:
- Around line 108-112: Add the missing compound FeatureGateAwareEnum marker so
the ControlPlaneTopology enum preserves "Adaptable" when both gates are enabled:
update the feature-gate annotations on ControlPlaneTopology (TopologyMode) to
include a compound marker with featureGate=AdaptableTopology+DualReplica and
enum that includes
HighlyAvailable;HighlyAvailableArbiter;SingleReplica;DualReplica;Adaptable;External
(matching the AdaptableTopology overlay), ensuring the compound marker is
present alongside the existing single-gate markers so overlays applied in sort
order do not drop Adaptable under dual-gate profiles.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: a64e1e46-9094-4c6c-a8ce-81717a72d082

📥 Commits

Reviewing files that changed from the base of the PR and between 07a5f04 and ac64c29.

⛔ Files ignored due to path filters (2)
  • config/v1/zz_generated.featuregated-crd-manifests.yaml is excluded by !**/zz_generated*
  • machineconfiguration/v1/zz_generated.featuregated-crd-manifests.yaml is excluded by !**/zz_generated*
📒 Files selected for processing (12)
  • config/v1/tests/infrastructures.config.openshift.io/AdaptableTopology.yaml
  • config/v1/types_infrastructure.go
  • features.md
  • features/features.go
  • payload-manifests/featuregates/featureGate-4-10-Hypershift-Default.yaml
  • payload-manifests/featuregates/featureGate-4-10-Hypershift-DevPreviewNoUpgrade.yaml
  • payload-manifests/featuregates/featureGate-4-10-Hypershift-OKD.yaml
  • payload-manifests/featuregates/featureGate-4-10-Hypershift-TechPreviewNoUpgrade.yaml
  • payload-manifests/featuregates/featureGate-4-10-SelfManagedHA-Default.yaml
  • payload-manifests/featuregates/featureGate-4-10-SelfManagedHA-DevPreviewNoUpgrade.yaml
  • payload-manifests/featuregates/featureGate-4-10-SelfManagedHA-OKD.yaml
  • payload-manifests/featuregates/featureGate-4-10-SelfManagedHA-TechPreviewNoUpgrade.yaml
✅ Files skipped from review due to trivial changes (9)
  • payload-manifests/featuregates/featureGate-4-10-SelfManagedHA-OKD.yaml
  • payload-manifests/featuregates/featureGate-4-10-SelfManagedHA-Default.yaml
  • payload-manifests/featuregates/featureGate-4-10-SelfManagedHA-TechPreviewNoUpgrade.yaml
  • payload-manifests/featuregates/featureGate-4-10-Hypershift-TechPreviewNoUpgrade.yaml
  • features.md
  • features/features.go
  • config/v1/tests/infrastructures.config.openshift.io/AdaptableTopology.yaml
  • payload-manifests/featuregates/featureGate-4-10-SelfManagedHA-DevPreviewNoUpgrade.yaml
  • payload-manifests/featuregates/featureGate-4-10-Hypershift-DevPreviewNoUpgrade.yaml
🚧 Files skipped from review as they are similar to previous changes (2)
  • payload-manifests/featuregates/featureGate-4-10-Hypershift-OKD.yaml
  • payload-manifests/featuregates/featureGate-4-10-Hypershift-Default.yaml

Comment on lines 108 to 112
// +openshift:validation:FeatureGateAwareEnum:featureGate="",enum=HighlyAvailable;HighlyAvailableArbiter;SingleReplica;External
// +openshift:validation:FeatureGateAwareEnum:featureGate=DualReplica,enum=HighlyAvailable;HighlyAvailableArbiter;SingleReplica;DualReplica;External
// +openshift:validation:FeatureGateAwareEnum:featureGate=AdaptableTopology,enum=HighlyAvailable;HighlyAvailableArbiter;SingleReplica;DualReplica;Adaptable;External
// +optional
ControlPlaneTopology TopologyMode `json:"controlPlaneTopology"`
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot Apr 24, 2026

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check whether a compound AdaptableTopology+DualReplica marker exists anywhere
# in the repo, and inspect all FeatureGateAwareEnum markers on controlPlaneTopology.
echo "=== Compound marker search (any compound) ==="
rg -nP 'FeatureGateAwareEnum:featureGate=[A-Za-z0-9]+\+[A-Za-z0-9]+'

echo
echo "=== All FeatureGateAwareEnum markers in types_infrastructure.go ==="
rg -nP 'FeatureGateAwareEnum' config/v1/types_infrastructure.go

echo
echo "=== Generated CRDs: check Adaptable presence under DevPreview / CustomNoUpgrade ==="
fd -t f 'infrastructures.*DevPreview.*\.yaml|infrastructures.*CustomNoUpgrade.*\.yaml' \
  | xargs -I{} sh -c 'echo "--- {} ---"; rg -n "Adaptable|DualReplica" "{}" | head -40'

echo
echo "=== Integration test profiles exercised by AdaptableTopology.yaml ==="
fd -t f 'AdaptableTopology.yaml' | xargs -I{} sh -c 'echo "--- {} ---"; cat "{}"'

Repository: openshift/api

Length of output: 3994


Missing compound AdaptableTopology+DualReplica marker for controlPlaneTopology causes Adaptable to be absent from generated CRD under dual-gate profiles.

The PR description states a compound FeatureGateAwareEnum:featureGate=AdaptableTopology+DualReplica marker should be added for controlPlaneTopology. However, the code at lines 108–110 shows only three markers (baseline, DualReplica, AdaptableTopology), with no compound marker present anywhere in the repository.

This is a functional bug: under Server-Side Apply with Force=true, single-gate overlays apply in sort order and each fully replaces the previous enum. Because the DualReplica overlay (line 109) does not include Adaptable, it overwrites the AdaptableTopology overlay's enum when both DevPreview gates are enabled (e.g., in CustomNoUpgrade or DevPreviewNoUpgrade profiles). Generated CRDs for these profiles confirm that Adaptable is missing from controlPlaneTopology's enum. The integration test only exercises the AdaptableTopology gate alone, not the "both gates enabled" case, so this regression is not caught.

Add the compound marker:

Diff
 	// +openshift:validation:FeatureGateAwareEnum:featureGate=DualReplica,enum=HighlyAvailable;HighlyAvailableArbiter;SingleReplica;DualReplica;External
 	// +openshift:validation:FeatureGateAwareEnum:featureGate=AdaptableTopology,enum=HighlyAvailable;HighlyAvailableArbiter;SingleReplica;DualReplica;Adaptable;External
+	// +openshift:validation:FeatureGateAwareEnum:featureGate=AdaptableTopology+DualReplica,enum=HighlyAvailable;HighlyAvailableArbiter;SingleReplica;DualReplica;Adaptable;External
 	// +optional
 	ControlPlaneTopology TopologyMode `json:"controlPlaneTopology"`
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// +openshift:validation:FeatureGateAwareEnum:featureGate="",enum=HighlyAvailable;HighlyAvailableArbiter;SingleReplica;External
// +openshift:validation:FeatureGateAwareEnum:featureGate=DualReplica,enum=HighlyAvailable;HighlyAvailableArbiter;SingleReplica;DualReplica;External
// +openshift:validation:FeatureGateAwareEnum:featureGate=AdaptableTopology,enum=HighlyAvailable;HighlyAvailableArbiter;SingleReplica;DualReplica;Adaptable;External
// +optional
ControlPlaneTopology TopologyMode `json:"controlPlaneTopology"`
// +openshift:validation:FeatureGateAwareEnum:featureGate="",enum=HighlyAvailable;HighlyAvailableArbiter;SingleReplica;External
// +openshift:validation:FeatureGateAwareEnum:featureGate=DualReplica,enum=HighlyAvailable;HighlyAvailableArbiter;SingleReplica;DualReplica;External
// +openshift:validation:FeatureGateAwareEnum:featureGate=AdaptableTopology,enum=HighlyAvailable;HighlyAvailableArbiter;SingleReplica;DualReplica;Adaptable;External
// +openshift:validation:FeatureGateAwareEnum:featureGate=AdaptableTopology+DualReplica,enum=HighlyAvailable;HighlyAvailableArbiter;SingleReplica;DualReplica;Adaptable;External
// +optional
ControlPlaneTopology TopologyMode `json:"controlPlaneTopology"`
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@config/v1/types_infrastructure.go` around lines 108 - 112, Add the missing
compound FeatureGateAwareEnum marker so the ControlPlaneTopology enum preserves
"Adaptable" when both gates are enabled: update the feature-gate annotations on
ControlPlaneTopology (TopologyMode) to include a compound marker with
featureGate=AdaptableTopology+DualReplica and enum that includes
HighlyAvailable;HighlyAvailableArbiter;SingleReplica;DualReplica;Adaptable;External
(matching the AdaptableTopology overlay), ensuring the compound marker is
present alongside the existing single-gate markers so overlays applied in sort
order do not drop Adaptable under dual-gate profiles.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@jeff-roche There is a consequence of how things get generated which means we need to add an extra annotation for situations like this where two FeatureGates exist for the same value.

This is what's missing, but the suggestion is wrong, you'll want to add this annotation under adaptable you added, this will generate a DualReplica+AdaptableTopology DevPreview file, which you'll want to add the tests for both DualReplica and AdaptableTopology.

+openshift:validation:FeatureGateAwareEnum:featureGate=AdaptableTopology,enum=HighlyAvailable;HighlyAvailableArbiter;SingleReplica;DualReplica;Adaptable;External
+openshift:validation:FeatureGateAwareEnum:requiredFeatureGate=DualReplica;AdaptableTopology,enum=HighlyAvailable;SingleReplica;DualReplica;Adaptable;External

Feel free to peruse this PR where we originally added Arbiter and DualReplica.

Locally you can run make integration to validate the unit tests won't fail.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 24, 2026

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

Test name Commit Details Required Rerun command
ci/prow/verify ac64c29 link true /test verify
ci/prow/integration ac64c29 link true /test integration

Full PR test history. Your PR dashboard.

Details

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.

Copy link
Copy Markdown
Contributor

@eggfoobar eggfoobar left a comment

Choose a reason for hiding this comment

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

Looking good @jeff-roche we're just missing some small additions and tests, you'll need to add some extra files to resolve the verify, I think those are manually added if I remember right.

This is the location of the machine config tests, feel free to copy and modify the DualReplica one.

Some of the other stuff should have been generated as well, after you add the machine config stuff, try running the generate again PROTO_OPTIONAL=1 make update, we're missing some CustomNoUPgrade CRDs changes.

Comment on lines 108 to 112
// +openshift:validation:FeatureGateAwareEnum:featureGate="",enum=HighlyAvailable;HighlyAvailableArbiter;SingleReplica;External
// +openshift:validation:FeatureGateAwareEnum:featureGate=DualReplica,enum=HighlyAvailable;HighlyAvailableArbiter;SingleReplica;DualReplica;External
// +openshift:validation:FeatureGateAwareEnum:featureGate=AdaptableTopology,enum=HighlyAvailable;HighlyAvailableArbiter;SingleReplica;DualReplica;Adaptable;External
// +optional
ControlPlaneTopology TopologyMode `json:"controlPlaneTopology"`
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@jeff-roche There is a consequence of how things get generated which means we need to add an extra annotation for situations like this where two FeatureGates exist for the same value.

This is what's missing, but the suggestion is wrong, you'll want to add this annotation under adaptable you added, this will generate a DualReplica+AdaptableTopology DevPreview file, which you'll want to add the tests for both DualReplica and AdaptableTopology.

+openshift:validation:FeatureGateAwareEnum:featureGate=AdaptableTopology,enum=HighlyAvailable;HighlyAvailableArbiter;SingleReplica;DualReplica;Adaptable;External
+openshift:validation:FeatureGateAwareEnum:requiredFeatureGate=DualReplica;AdaptableTopology,enum=HighlyAvailable;SingleReplica;DualReplica;Adaptable;External

Feel free to peruse this PR where we originally added Arbiter and DualReplica.

Locally you can run make integration to validate the unit tests won't fail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. 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.

4 participants