Skip to content

OSASINFRA-4437: openstack: add additional fields to support multiple VIPs - #2976

Open
winiciusallan wants to merge 1 commit into
openshift:masterfrom
shiftstack:additional-vips
Open

OSASINFRA-4437: openstack: add additional fields to support multiple VIPs#2976
winiciusallan wants to merge 1 commit into
openshift:masterfrom
shiftstack:additional-vips

Conversation

@winiciusallan

Copy link
Copy Markdown
Member

In order to support multiple VIPs during an OpenShift installation on top of OpenStack, we need to propagate these VIPs in the Infrastructure CR, so API consumers can get these valeus to perform some operation.

To avoid removing the CEL validation on the existing fields (APIServerInternalIPs and IngressVIPs) and breaking compatibility, I decided to add two new fields to handle these "additional" VIPs.

In order to support multiple VIPs during an OpenShift installation on
top of OpenStack, we need to propagate these VIPs in the Infrastructure
CR, so API consumers can get these valeus to perform some operation.
@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 openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Aug 11, 2026
@openshift-ci-robot

openshift-ci-robot commented Aug 11, 2026

Copy link
Copy Markdown

@winiciusallan: This pull request references OSASINFRA-4437 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 task to target the "5.0.0" version, but no target version was set.

Details

In response to this:

In order to support multiple VIPs during an OpenShift installation on top of OpenStack, we need to propagate these VIPs in the Infrastructure CR, so API consumers can get these valeus to perform some operation.

To avoid removing the CEL validation on the existing fields (APIServerInternalIPs and IngressVIPs) and breaking compatibility, I decided to add two new fields to handle these "additional" VIPs.

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

openshift-ci Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Hello @winiciusallan! 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 openshift-ci Bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Aug 11, 2026
@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

OpenStack platform spec and status types now include additional API-server and ingress IP lists. The lists support up to 10 entries for user-managed load balancers across separate networks. Infrastructure and ControllerConfig CRD schemas expose these fields with atomic list semantics, IP validation for spec entries, and IP formatting for status entries.

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the addition of OpenStack fields that support multiple VIPs.
Description check ✅ Passed The description explains the need to propagate multiple VIPs and preserve compatibility with existing fields.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 The pull request changes API types and generated schemas only; it adds no *_test.go files or Ginkgo test titles, so no unstable test names are present.
Test Structure And Quality ✅ Passed The commit adds API declarations and generated schemas only; it changes no Ginkgo test files, test blocks, cluster operations, waits, or assertions.
Microshift Test Compatibility ✅ Passed The pull request changes API types, generated schemas, and OpenAPI files only; no Ginkgo tests or test paths were added.
Single Node Openshift (Sno) Test Compatibility ✅ Passed The pull request adds API types and generated schemas only; no new or modified Ginkgo e2e tests were found, so SNO compatibility checks do not apply.
Topology-Aware Scheduling Compatibility ✅ Passed The commit adds OpenStack VIP fields and generated schema artifacts only; added lines contain no affinity, topology spread, replica, selector, toleration, or PDB scheduling constraints.
Ote Binary Stdout Contract ✅ Passed The commit changes API declarations and generated schemas only; searches of all changed files found no main, suite setup, stdout, klog, or log output writes.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed The pull request changes only Go API declarations and generated CRD/OpenAPI/deep-copy manifests; no Ginkgo or e2e test files or test constructs were added.
No-Weak-Crypto ✅ Passed The patch adds IP fields, schemas, and slice deep-copy code only; added-line scans found no MD5, SHA1, DES, RC4, Blowfish, ECB, custom crypto, or secret comparisons.
Container-Privileges ✅ Passed The PR adds OpenStack IP fields and generated CRD schema metadata only; no added privileged, hostPID/hostNetwork/hostIPC, SYS_ADMIN, root, or allowPrivilegeEscalation settings appear in the diff.
No-Sensitive-Data-In-Logs ✅ Passed The commit adds IP fields and generated schemas only; scans found no added logging calls or existing log statements that reference these fields.
✨ 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.12.2)

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.

@openshift-ci

openshift-ci Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

[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 deads2k 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

@qodo-for-rh-openshift

Copy link
Copy Markdown

PR Summary by Qodo

OpenStack: add additional API/Ingress VIP fields to Infrastructure CR

✨ Enhancement ⚙️ Configuration changes 🕐 20-40 Minutes

Grey Divider

AI Description

• Add new OpenStack platform fields for additional API and ingress VIPs.
• Preserve existing VIP validation/compatibility by introducing additive fields.
• Regenerate CRD/OpenAPI artifacts so consumers can discover the new VIPs.
Diagram

graph TD
  A["Installers / consumers"] --> B[("Infrastructure CR")]
  B --> C["OpenStack spec/status"] --> D["Additional*IPs"]
  D --> E["Go types (config/v1)"] --> F["CRD manifests"]
  E --> G["OpenAPI/Swagger"]
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Relax existing VIP field validation to allow more entries
  • ➕ No new API fields to document/support
  • ➕ Single place for VIPs
  • ➖ Breaks compatibility expectations around current list shape/constraints
  • ➖ Requires weakening/removing existing CEL validation
2. Introduce a structured VIPs object (primary + additional)
  • ➕ Clearer semantics than parallel lists
  • ➕ Easier future extension (per-network metadata, roles)
  • ➖ More invasive API change than additive fields
  • ➖ Requires a compatibility/migration story for existing fields
3. Expose additional VIPs only in status (computed/observed)
  • ➕ Keeps spec smaller and reduces risk of misconfiguration
  • ➕ Operators publish resolved values
  • ➖ Doesn't help cases needing spec-time intent/inputs
  • ➖ Still forces consumers to learn new fields

Recommendation: The additive-field approach in this PR is the best fit for API stability: it preserves existing field semantics and validation while enabling multi-network VIP propagation for user-managed load balancers. The alternatives either risk compatibility (relaxing existing validation) or require a larger API redesign.

Files changed (60) +3720 / -14

Enhancement (1) +46 / -0
types_infrastructure.goAdd additional OpenStack VIP fields to spec/status +46/-0

Add additional OpenStack VIP fields to spec/status

• Adds AdditionalAPIServerIPs and AdditionalIngressIPs to OpenStackPlatformSpec and OpenStackPlatformStatus. Includes max-items/list-type validation and documents that they are only valid for UserManaged load balancers.

config/v1/types_infrastructure.go

Documentation (3) +134 / -14
zz_generated.swagger_doc_generated.goDocument additional VIP fields in Swagger docs +18/-14

Document additional VIP fields in Swagger docs

• Updates SwaggerDoc for OpenStackPlatformSpec and OpenStackPlatformStatus to include descriptions for additionalAPIServerIPs and additionalIngressIPs.

config/v1/zz_generated.swagger_doc_generated.go

zz_generated.openapi.goRegenerate generated OpenAPI Go schema for additional VIP fields +80/-0

Regenerate generated OpenAPI Go schema for additional VIP fields

• Adds schema entries for additionalAPIServerIPs and additionalIngressIPs to OpenStackPlatformSpec and OpenStackPlatformStatus definitions in the generated Go OpenAPI output.

openapi/generated_openapi/zz_generated.openapi.go

openapi.jsonPublish OpenAPI JSON updates for additional VIP fields +36/-0

Publish OpenAPI JSON updates for additional VIP fields

• Updates OpenStackPlatformSpec and OpenStackPlatformStatus schemas to include additionalAPIServerIPs and additionalIngressIPs arrays in the published OpenAPI document.

openapi/openapi.json

Other (56) +3540 / -0
0000_10_config-operator_01_infrastructures-Default.crd.yamlRegenerate Infrastructure CRD (Default) to include additional VIP fields +64/-0

Regenerate Infrastructure CRD (Default) to include additional VIP fields

• Extends the OpenStack schema with additionalAPIServerIPs and additionalIngressIPs arrays, including IP validation/format and atomic list semantics.

config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-Default.crd.yaml

0000_10_config-operator_01_infrastructures-Hypershift-CustomNoUpgrade.crd.yamlRegenerate Infrastructure CRD (Hypershift CustomNoUpgrade) +64/-0

Regenerate Infrastructure CRD (Hypershift CustomNoUpgrade)

• Propagates the new additional VIP schema fields into the Hypershift CustomNoUpgrade Infrastructure CRD variant.

config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-Hypershift-CustomNoUpgrade.crd.yaml

0000_10_config-operator_01_infrastructures-Hypershift-DevPreviewNoUpgrade.crd.yamlRegenerate Infrastructure CRD (Hypershift DevPreviewNoUpgrade) +64/-0

Regenerate Infrastructure CRD (Hypershift DevPreviewNoUpgrade)

• Adds additionalAPIServerIPs and additionalIngressIPs to the OpenStack schema for this CRD variant.

config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-Hypershift-DevPreviewNoUpgrade.crd.yaml

0000_10_config-operator_01_infrastructures-OKD.crd.yamlRegenerate Infrastructure CRD (OKD) +64/-0

Regenerate Infrastructure CRD (OKD)

• Includes the new OpenStack additional VIP list fields and validations in the OKD Infrastructure CRD variant.

config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-OKD.crd.yaml

0000_10_config-operator_01_infrastructures-SelfManagedHA-CustomNoUpgrade.crd.yamlRegenerate Infrastructure CRD (SelfManagedHA CustomNoUpgrade) +64/-0

Regenerate Infrastructure CRD (SelfManagedHA CustomNoUpgrade)

• Adds the new OpenStack additional VIP list fields to the SelfManagedHA CustomNoUpgrade CRD schema.

config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-SelfManagedHA-CustomNoUpgrade.crd.yaml

0000_10_config-operator_01_infrastructures-SelfManagedHA-DevPreviewNoUpgrade.crd.yamlRegenerate Infrastructure CRD (SelfManagedHA DevPreviewNoUpgrade) +64/-0

Regenerate Infrastructure CRD (SelfManagedHA DevPreviewNoUpgrade)

• Propagates additionalAPIServerIPs/additionalIngressIPs into this Infrastructure CRD variant’s OpenStack schema.

config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-SelfManagedHA-DevPreviewNoUpgrade.crd.yaml

0000_10_config-operator_01_infrastructures-TechPreviewNoUpgrade.crd.yamlRegenerate Infrastructure CRD (TechPreviewNoUpgrade) +64/-0

Regenerate Infrastructure CRD (TechPreviewNoUpgrade)

• Adds the additional VIP list fields to the OpenStack section of the TechPreviewNoUpgrade CRD variant.

config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-TechPreviewNoUpgrade.crd.yaml

zz_generated.deepcopy.goUpdate deepcopy logic for new OpenStack VIP slices +20/-0

Update deepcopy logic for new OpenStack VIP slices

• Regenerates DeepCopyInto for OpenStackPlatformSpec and OpenStackPlatformStatus to correctly copy AdditionalAPIServerIPs and AdditionalIngressIPs slices.

config/v1/zz_generated.deepcopy.go

AAA_ungated.yamlRegenerate featuregated Infrastructure CRD (AAA_ungated) +64/-0

Regenerate featuregated Infrastructure CRD (AAA_ungated)

• Adds additionalAPIServerIPs and additionalIngressIPs to the OpenStack schema in the ungated Infrastructure CRD output.

config/v1/zz_generated.featuregated-crd-manifests/infrastructures.config.openshift.io/AAA_ungated.yaml

AWSClusterHostedDNSInstall.yamlRegenerate featuregated Infrastructure CRD (AWSClusterHostedDNSInstall) +64/-0

Regenerate featuregated Infrastructure CRD (AWSClusterHostedDNSInstall)

• Propagates the new OpenStack additional VIP fields into this featuregated Infrastructure CRD manifest.

config/v1/zz_generated.featuregated-crd-manifests/infrastructures.config.openshift.io/AWSClusterHostedDNSInstall.yaml

AWSDualStackInstall.yamlRegenerate featuregated Infrastructure CRD (AWSDualStackInstall) +64/-0

Regenerate featuregated Infrastructure CRD (AWSDualStackInstall)

• Includes the additional VIP list fields in the OpenStack schema of this gated Infrastructure CRD output.

config/v1/zz_generated.featuregated-crd-manifests/infrastructures.config.openshift.io/AWSDualStackInstall.yaml

AzureDualStackInstall.yamlRegenerate featuregated Infrastructure CRD (AzureDualStackInstall) +64/-0

Regenerate featuregated Infrastructure CRD (AzureDualStackInstall)

• Adds OpenStack additional VIP schema fields to this featuregated Infrastructure CRD artifact.

config/v1/zz_generated.featuregated-crd-manifests/infrastructures.config.openshift.io/AzureDualStackInstall.yaml

BGPBasedVIPManagement.yamlRegenerate featuregated Infrastructure CRD (BGPBasedVIPManagement) +64/-0

Regenerate featuregated Infrastructure CRD (BGPBasedVIPManagement)

• Propagates additionalAPIServerIPs/additionalIngressIPs into this featuregated Infrastructure CRD schema output.

config/v1/zz_generated.featuregated-crd-manifests/infrastructures.config.openshift.io/BGPBasedVIPManagement.yaml

DualReplica.yamlRegenerate featuregated Infrastructure CRD (DualReplica) +64/-0

Regenerate featuregated Infrastructure CRD (DualReplica)

• Includes the new OpenStack additional VIP list fields in this featuregated Infrastructure CRD manifest.

config/v1/zz_generated.featuregated-crd-manifests/infrastructures.config.openshift.io/DualReplica.yaml

DyanmicServiceEndpointIBMCloud.yamlRegenerate featuregated Infrastructure CRD (DyanmicServiceEndpointIBMCloud) +64/-0

Regenerate featuregated Infrastructure CRD (DyanmicServiceEndpointIBMCloud)

• Adds additional OpenStack VIP list fields to this featuregated Infrastructure CRD schema output.

config/v1/zz_generated.featuregated-crd-manifests/infrastructures.config.openshift.io/DyanmicServiceEndpointIBMCloud.yaml

MutableTopology.yamlRegenerate featuregated Infrastructure CRD (MutableTopology) +64/-0

Regenerate featuregated Infrastructure CRD (MutableTopology)

• Propagates the additional VIP list fields into the OpenStack schema of this featuregated Infrastructure CRD.

config/v1/zz_generated.featuregated-crd-manifests/infrastructures.config.openshift.io/MutableTopology.yaml

NutanixMultiSubnets.yamlRegenerate featuregated Infrastructure CRD (NutanixMultiSubnets) +64/-0

Regenerate featuregated Infrastructure CRD (NutanixMultiSubnets)

• Adds additionalAPIServerIPs/additionalIngressIPs to the OpenStack schema in this gated Infrastructure CRD output.

config/v1/zz_generated.featuregated-crd-manifests/infrastructures.config.openshift.io/NutanixMultiSubnets.yaml

OnPremDNSRecords.yamlRegenerate featuregated Infrastructure CRD (OnPremDNSRecords) +64/-0

Regenerate featuregated Infrastructure CRD (OnPremDNSRecords)

• Includes new OpenStack additional VIP fields in this featuregated Infrastructure CRD manifest.

config/v1/zz_generated.featuregated-crd-manifests/infrastructures.config.openshift.io/OnPremDNSRecords.yaml

VSphereHostVMGroupZonal.yamlRegenerate featuregated Infrastructure CRD (VSphereHostVMGroupZonal) +64/-0

Regenerate featuregated Infrastructure CRD (VSphereHostVMGroupZonal)

• Propagates the OpenStack additional VIP schema fields into this featuregated Infrastructure CRD artifact.

config/v1/zz_generated.featuregated-crd-manifests/infrastructures.config.openshift.io/VSphereHostVMGroupZonal.yaml

VSphereMultiNetworks.yamlRegenerate featuregated Infrastructure CRD (VSphereMultiNetworks) +64/-0

Regenerate featuregated Infrastructure CRD (VSphereMultiNetworks)

• Adds additionalAPIServerIPs/additionalIngressIPs to the OpenStack schema in this gated Infrastructure CRD output.

config/v1/zz_generated.featuregated-crd-manifests/infrastructures.config.openshift.io/VSphereMultiNetworks.yaml

VSphereMultiVCenterDay2.yamlRegenerate featuregated Infrastructure CRD (VSphereMultiVCenterDay2) +64/-0

Regenerate featuregated Infrastructure CRD (VSphereMultiVCenterDay2)

• Includes the new additional VIP list fields in this featuregated Infrastructure CRD manifest.

config/v1/zz_generated.featuregated-crd-manifests/infrastructures.config.openshift.io/VSphereMultiVCenterDay2.yaml

0000_80_machine-config_01_controllerconfigs-Default.crd.yamlRegenerate ControllerConfig CRD (Default) for OpenStack additional VIP fields +64/-0

Regenerate ControllerConfig CRD (Default) for OpenStack additional VIP fields

• Propagates the OpenStack schema additions (additionalAPIServerIPs/additionalIngressIPs) into ControllerConfig CRD validation schemas.

machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_controllerconfigs-Default.crd.yaml

0000_80_machine-config_01_controllerconfigs-Hypershift-CustomNoUpgrade.crd.yamlRegenerate ControllerConfig CRD (Hypershift CustomNoUpgrade) +64/-0

Regenerate ControllerConfig CRD (Hypershift CustomNoUpgrade)

• Includes additional OpenStack VIP list fields in this ControllerConfig CRD variant’s schema outputs.

machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_controllerconfigs-Hypershift-CustomNoUpgrade.crd.yaml

0000_80_machine-config_01_controllerconfigs-Hypershift-DevPreviewNoUpgrade.crd.yamlRegenerate ControllerConfig CRD (Hypershift DevPreviewNoUpgrade) +64/-0

Regenerate ControllerConfig CRD (Hypershift DevPreviewNoUpgrade)

• Adds additionalAPIServerIPs/additionalIngressIPs to the OpenStack schema in this ControllerConfig CRD variant.

machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_controllerconfigs-Hypershift-DevPreviewNoUpgrade.crd.yaml

0000_80_machine-config_01_controllerconfigs-OKD.crd.yamlRegenerate ControllerConfig CRD (OKD) +64/-0

Regenerate ControllerConfig CRD (OKD)

• Propagates the OpenStack additional VIP fields into the OKD ControllerConfig CRD schema output.

machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_controllerconfigs-OKD.crd.yaml

0000_80_machine-config_01_controllerconfigs-SelfManagedHA-CustomNoUpgrade.crd.yamlRegenerate ControllerConfig CRD (SelfManagedHA CustomNoUpgrade) +64/-0

Regenerate ControllerConfig CRD (SelfManagedHA CustomNoUpgrade)

• Includes OpenStack additional VIP schema fields in this ControllerConfig CRD variant.

machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_controllerconfigs-SelfManagedHA-CustomNoUpgrade.crd.yaml

0000_80_machine-config_01_controllerconfigs-SelfManagedHA-DevPreviewNoUpgrade.crd.yamlRegenerate ControllerConfig CRD (SelfManagedHA DevPreviewNoUpgrade) +64/-0

Regenerate ControllerConfig CRD (SelfManagedHA DevPreviewNoUpgrade)

• Propagates the OpenStack additional VIP list fields into this ControllerConfig CRD variant.

machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_controllerconfigs-SelfManagedHA-DevPreviewNoUpgrade.crd.yaml

0000_80_machine-config_01_controllerconfigs-TechPreviewNoUpgrade.crd.yamlRegenerate ControllerConfig CRD (TechPreviewNoUpgrade) +64/-0

Regenerate ControllerConfig CRD (TechPreviewNoUpgrade)

• Adds the new OpenStack additional VIP fields to this ControllerConfig CRD variant’s schema output.

machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_controllerconfigs-TechPreviewNoUpgrade.crd.yaml

AAA_ungated.yamlRegenerate featuregated ControllerConfig CRD (AAA_ungated) +64/-0

Regenerate featuregated ControllerConfig CRD (AAA_ungated)

• Includes the OpenStack additional VIP list fields in the ungated ControllerConfig CRD schema output.

machineconfiguration/v1/zz_generated.featuregated-crd-manifests/controllerconfigs.machineconfiguration.openshift.io/AAA_ungated.yaml

AWSClusterHostedDNSInstall.yamlRegenerate featuregated ControllerConfig CRD (AWSClusterHostedDNSInstall) +64/-0

Regenerate featuregated ControllerConfig CRD (AWSClusterHostedDNSInstall)

• Propagates additionalAPIServerIPs/additionalIngressIPs into this featuregated ControllerConfig CRD schema output.

machineconfiguration/v1/zz_generated.featuregated-crd-manifests/controllerconfigs.machineconfiguration.openshift.io/AWSClusterHostedDNSInstall.yaml

AWSDualStackInstall.yamlRegenerate featuregated ControllerConfig CRD (AWSDualStackInstall) +64/-0

Regenerate featuregated ControllerConfig CRD (AWSDualStackInstall)

• Adds the OpenStack additional VIP list fields to this featuregated ControllerConfig CRD manifest.

machineconfiguration/v1/zz_generated.featuregated-crd-manifests/controllerconfigs.machineconfiguration.openshift.io/AWSDualStackInstall.yaml

AWSEuropeanSovereignCloudInstall.yamlRegenerate featuregated ControllerConfig CRD (AWSEuropeanSovereignCloudInstall) +64/-0

Regenerate featuregated ControllerConfig CRD (AWSEuropeanSovereignCloudInstall)

• Includes additional OpenStack VIP list fields in this gated ControllerConfig CRD schema output.

machineconfiguration/v1/zz_generated.featuregated-crd-manifests/controllerconfigs.machineconfiguration.openshift.io/AWSEuropeanSovereignCloudInstall.yaml

AzureDualStackInstall.yamlRegenerate featuregated ControllerConfig CRD (AzureDualStackInstall) +64/-0

Regenerate featuregated ControllerConfig CRD (AzureDualStackInstall)

• Propagates additionalAPIServerIPs/additionalIngressIPs into this featuregated ControllerConfig CRD artifact.

machineconfiguration/v1/zz_generated.featuregated-crd-manifests/controllerconfigs.machineconfiguration.openshift.io/AzureDualStackInstall.yaml

BGPBasedVIPManagement.yamlRegenerate featuregated ControllerConfig CRD (BGPBasedVIPManagement) +64/-0

Regenerate featuregated ControllerConfig CRD (BGPBasedVIPManagement)

• Adds the additional VIP list fields to the OpenStack schema in this featuregated ControllerConfig CRD output.

machineconfiguration/v1/zz_generated.featuregated-crd-manifests/controllerconfigs.machineconfiguration.openshift.io/BGPBasedVIPManagement.yaml

DualReplica.yamlRegenerate featuregated ControllerConfig CRD (DualReplica) +64/-0

Regenerate featuregated ControllerConfig CRD (DualReplica)

• Propagates the OpenStack additional VIP schema fields into this featuregated ControllerConfig CRD manifest.

machineconfiguration/v1/zz_generated.featuregated-crd-manifests/controllerconfigs.machineconfiguration.openshift.io/DualReplica.yaml

DyanmicServiceEndpointIBMCloud.yamlRegenerate featuregated ControllerConfig CRD (DyanmicServiceEndpointIBMCloud) +64/-0

Regenerate featuregated ControllerConfig CRD (DyanmicServiceEndpointIBMCloud)

• Includes additionalAPIServerIPs/additionalIngressIPs in this gated ControllerConfig CRD schema output.

machineconfiguration/v1/zz_generated.featuregated-crd-manifests/controllerconfigs.machineconfiguration.openshift.io/DyanmicServiceEndpointIBMCloud.yaml

MutableTopology.yamlRegenerate featuregated ControllerConfig CRD (MutableTopology) +64/-0

Regenerate featuregated ControllerConfig CRD (MutableTopology)

• Adds the OpenStack additional VIP list fields to this featuregated ControllerConfig CRD artifact.

machineconfiguration/v1/zz_generated.featuregated-crd-manifests/controllerconfigs.machineconfiguration.openshift.io/MutableTopology.yaml

NutanixMultiSubnets.yamlRegenerate featuregated ControllerConfig CRD (NutanixMultiSubnets) +64/-0

Regenerate featuregated ControllerConfig CRD (NutanixMultiSubnets)

• Propagates additional OpenStack VIP fields into this featuregated ControllerConfig CRD schema output.

machineconfiguration/v1/zz_generated.featuregated-crd-manifests/controllerconfigs.machineconfiguration.openshift.io/NutanixMultiSubnets.yaml

OnPremDNSRecords.yamlRegenerate featuregated ControllerConfig CRD (OnPremDNSRecords) +64/-0

Regenerate featuregated ControllerConfig CRD (OnPremDNSRecords)

• Includes the OpenStack additional VIP list fields in this featuregated ControllerConfig CRD output.

machineconfiguration/v1/zz_generated.featuregated-crd-manifests/controllerconfigs.machineconfiguration.openshift.io/OnPremDNSRecords.yaml

VSphereHostVMGroupZonal.yamlRegenerate featuregated ControllerConfig CRD (VSphereHostVMGroupZonal) +64/-0

Regenerate featuregated ControllerConfig CRD (VSphereHostVMGroupZonal)

• Adds additionalAPIServerIPs/additionalIngressIPs to this featuregated ControllerConfig CRD artifact’s schema.

machineconfiguration/v1/zz_generated.featuregated-crd-manifests/controllerconfigs.machineconfiguration.openshift.io/VSphereHostVMGroupZonal.yaml

VSphereMultiNetworks.yamlRegenerate featuregated ControllerConfig CRD (VSphereMultiNetworks) +64/-0

Regenerate featuregated ControllerConfig CRD (VSphereMultiNetworks)

• Propagates the new OpenStack additional VIP list fields into this gated ControllerConfig CRD schema output.

machineconfiguration/v1/zz_generated.featuregated-crd-manifests/controllerconfigs.machineconfiguration.openshift.io/VSphereMultiNetworks.yaml

VSphereMultiVCenterDay2.yamlRegenerate featuregated ControllerConfig CRD (VSphereMultiVCenterDay2) +64/-0

Regenerate featuregated ControllerConfig CRD (VSphereMultiVCenterDay2)

• Includes additionalAPIServerIPs/additionalIngressIPs in the OpenStack schema of this featuregated ControllerConfig CRD output.

machineconfiguration/v1/zz_generated.featuregated-crd-manifests/controllerconfigs.machineconfiguration.openshift.io/VSphereMultiVCenterDay2.yaml

0000_10_config-operator_01_infrastructures-Default.crd.yamlUpdate payload Infrastructure CRD (Default) for additional VIP fields +64/-0

Update payload Infrastructure CRD (Default) for additional VIP fields

• Carries the Infrastructure CRD schema additions for OpenStack additional VIP list fields into the release payload manifests.

payload-manifests/crds/0000_10_config-operator_01_infrastructures-Default.crd.yaml

0000_10_config-operator_01_infrastructures-Hypershift-CustomNoUpgrade.crd.yamlUpdate payload Infrastructure CRD (Hypershift CustomNoUpgrade) +64/-0

Update payload Infrastructure CRD (Hypershift CustomNoUpgrade)

• Propagates the additional OpenStack VIP fields into this payload Infrastructure CRD variant.

payload-manifests/crds/0000_10_config-operator_01_infrastructures-Hypershift-CustomNoUpgrade.crd.yaml

0000_10_config-operator_01_infrastructures-Hypershift-DevPreviewNoUpgrade.crd.yamlUpdate payload Infrastructure CRD (Hypershift DevPreviewNoUpgrade) +64/-0

Update payload Infrastructure CRD (Hypershift DevPreviewNoUpgrade)

• Adds additionalAPIServerIPs/additionalIngressIPs to the OpenStack schema for this payload CRD variant.

payload-manifests/crds/0000_10_config-operator_01_infrastructures-Hypershift-DevPreviewNoUpgrade.crd.yaml

0000_10_config-operator_01_infrastructures-OKD.crd.yamlUpdate payload Infrastructure CRD (OKD) for additional VIP fields +64/-0

Update payload Infrastructure CRD (OKD) for additional VIP fields

• Updates the OKD payload Infrastructure CRD variant to include the additional VIP list fields and their validations.

payload-manifests/crds/0000_10_config-operator_01_infrastructures-OKD.crd.yaml

0000_10_config-operator_01_infrastructures-SelfManagedHA-CustomNoUpgrade.crd.yamlUpdate payload Infrastructure CRD (SelfManagedHA CustomNoUpgrade) +64/-0

Update payload Infrastructure CRD (SelfManagedHA CustomNoUpgrade)

• Propagates the OpenStack additional VIP list fields into this payload Infrastructure CRD variant.

payload-manifests/crds/0000_10_config-operator_01_infrastructures-SelfManagedHA-CustomNoUpgrade.crd.yaml

0000_10_config-operator_01_infrastructures-SelfManagedHA-DevPreviewNoUpgrade.crd.yamlUpdate payload Infrastructure CRD (SelfManagedHA DevPreviewNoUpgrade) +64/-0

Update payload Infrastructure CRD (SelfManagedHA DevPreviewNoUpgrade)

• Includes additionalAPIServerIPs/additionalIngressIPs in the OpenStack schema of this payload Infrastructure CRD variant.

payload-manifests/crds/0000_10_config-operator_01_infrastructures-SelfManagedHA-DevPreviewNoUpgrade.crd.yaml

0000_10_config-operator_01_infrastructures-TechPreviewNoUpgrade.crd.yamlUpdate payload Infrastructure CRD (TechPreviewNoUpgrade) +64/-0

Update payload Infrastructure CRD (TechPreviewNoUpgrade)

• Adds the new OpenStack additional VIP list fields to the payload CRD variant for TechPreviewNoUpgrade.

payload-manifests/crds/0000_10_config-operator_01_infrastructures-TechPreviewNoUpgrade.crd.yaml

0000_80_machine-config_01_controllerconfigs-Default.crd.yamlUpdate payload ControllerConfig CRD (Default) for additional VIP fields +64/-0

Update payload ControllerConfig CRD (Default) for additional VIP fields

• Carries the ControllerConfig CRD schema updates that include the OpenStack additional VIP list fields into the release payload.

payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-Default.crd.yaml

0000_80_machine-config_01_controllerconfigs-Hypershift-CustomNoUpgrade.crd.yamlUpdate payload ControllerConfig CRD (Hypershift CustomNoUpgrade) +64/-0

Update payload ControllerConfig CRD (Hypershift CustomNoUpgrade)

• Propagates the OpenStack additional VIP list fields into this payload ControllerConfig CRD variant.

payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-Hypershift-CustomNoUpgrade.crd.yaml

0000_80_machine-config_01_controllerconfigs-Hypershift-DevPreviewNoUpgrade.crd.yamlUpdate payload ControllerConfig CRD (Hypershift DevPreviewNoUpgrade) +64/-0

Update payload ControllerConfig CRD (Hypershift DevPreviewNoUpgrade)

• Adds additionalAPIServerIPs/additionalIngressIPs to the OpenStack schema in this payload ControllerConfig CRD variant.

payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-Hypershift-DevPreviewNoUpgrade.crd.yaml

0000_80_machine-config_01_controllerconfigs-OKD.crd.yamlUpdate payload ControllerConfig CRD (OKD) for additional VIP fields +64/-0

Update payload ControllerConfig CRD (OKD) for additional VIP fields

• Includes the OpenStack additional VIP fields in the OKD payload ControllerConfig CRD schema output.

payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-OKD.crd.yaml

0000_80_machine-config_01_controllerconfigs-SelfManagedHA-CustomNoUpgrade.crd.yamlUpdate payload ControllerConfig CRD (SelfManagedHA CustomNoUpgrade) +64/-0

Update payload ControllerConfig CRD (SelfManagedHA CustomNoUpgrade)

• Propagates OpenStack additionalAPIServerIPs/additionalIngressIPs into this payload ControllerConfig CRD variant.

payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-SelfManagedHA-CustomNoUpgrade.crd.yaml

0000_80_machine-config_01_controllerconfigs-SelfManagedHA-DevPreviewNoUpgrade.crd.yamlUpdate payload ControllerConfig CRD (SelfManagedHA DevPreviewNoUpgrade) +64/-0

Update payload ControllerConfig CRD (SelfManagedHA DevPreviewNoUpgrade)

• Includes the additional OpenStack VIP list fields in this payload ControllerConfig CRD variant’s schema.

payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-SelfManagedHA-DevPreviewNoUpgrade.crd.yaml

0000_80_machine-config_01_controllerconfigs-TechPreviewNoUpgrade.crd.yamlUpdate payload ControllerConfig CRD (TechPreviewNoUpgrade) +64/-0

Update payload ControllerConfig CRD (TechPreviewNoUpgrade)

• Adds additionalAPIServerIPs/additionalIngressIPs to the payload ControllerConfig CRD schema for TechPreviewNoUpgrade.

payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-TechPreviewNoUpgrade.crd.yaml

@qodo-for-rh-openshift

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (1) 📜 Skill insights (3)

Grey Divider


Action required

1. Additional*IPs omit behavior undocumented 📜 Skill insight ✧ Quality
Description
The new optional fields AdditionalAPIServerIPs and AdditionalIngressIPs do not document what
happens when they are omitted. This makes API behavior unclear for clients and violates the required
omission-behavior documentation rule.
Code

config/v1/types_infrastructure.go[R1205-1206]

+	// +optional
+	AdditionalAPIServerIPs []IP `json:"additionalAPIServerIPs,omitempty"`
Relevance

●●● Strong

Omission/default behavior is routinely documented (“When omitted…”), and reviewers ask for this
style consistently.

PR-#2460

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
PR Compliance ID 1507 requires new optional fields to document behavior when omitted. The added
fields are marked +optional and use omitempty, but their comments describe purpose/usage only
and do not state what occurs if the fields are not specified.

config/v1/types_infrastructure.go[1197-1206]
config/v1/types_infrastructure.go[1208-1217]
config/v1/types_infrastructure.go[1273-1283]
config/v1/types_infrastructure.go[1285-1295]
Skill: api-review

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
New optional API fields were added but their doc comments do not explain behavior when the fields are omitted.

## Issue Context
For optional fields (`+optional` and/or pointer/omitempty), documentation must explicitly state what happens when the field is not provided (e.g., "When omitted...").

## Fix Focus Areas
- config/v1/types_infrastructure.go[1197-1217]
- config/v1/types_infrastructure.go[1273-1295]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. Missing XValidation for loadBalancer.type 📜 Skill insight ≡ Correctness
Description
The new OpenStack additional IP fields are documented as "only valid when loadBalancer.type is set
to UserManaged" but there is no corresponding CEL/XValidation rule enforcing that cross-field
relationship. This allows invalid combinations into the API and can expose inconsistent objects to
consumers, contradicting the documented contract.
Code

config/v1/types_infrastructure.go[R1200-1202]

+	// simultaneously. Each entry must be a valid IP address. This field is
+	// only valid when loadBalancer.type is set to UserManaged.
+	//
Relevance

●●● Strong

Repo regularly enforces API invariants via XValidation; loadBalancer.type-dependent constraints are
an established pattern.

PR-#2460
PR-#2784

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
PR Compliance ID 1511 requires documented cross-field relationships to be enforced with XValidation,
and the new field comments explicitly add a UserManaged precondition tied to loadBalancer.type.
However, the existing OpenStackPlatformSpec/related XValidations only address
presence/immutability for existing lists and do not encode this new invariant; the fields themselves
only have basic size/list annotations, and the generated CRD schema similarly contains no
x-kubernetes-validations binding these fields to loadBalancer.type. The API already uses
CEL/*********on to enforce another loadBalancer.type-dependent constraint for dnsRecordsType,
demonstrating that this style of invariant enforcement is expected here and highlighting the absence
for the new fields.

config/v1/types_infrastructure.go[1161-1165]
config/v1/types_infrastructure.go[1197-1206]
config/v1/types_infrastructure.go[1273-1295]
config/v1/types_infrastructure.go[1161-1217]
config/v1/types_infrastructure.go[1229-1231]
config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-Default.crd.yaml[2186-2211]
Skill: api-review

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Field documentation introduces a cross-field constraint: `AdditionalAPIServerIPs` / `AdditionalIngressIPs` are only valid when `loadBalancer.type` is `UserManaged`, but there is no `+kubebuilder:validation:XValidation` / CEL rule enforcing this relationship in the API schema.

## Issue Context
- PR Compliance ID 1511 requires that documented cross-field relationships be enforced with XValidation.
- The new fields currently have only size/list annotations, and the generated CRD schema has no `x-kubernetes-validations` that ties them to `loadBalancer.type`.
- A similar `loadBalancer.type`-dependent invariant is already enforced for `dnsRecordsType` via CEL/XValidation, so there is precedent for codifying these invariants.
- XValidation must be attached at a struct scope that can “see” all referenced fields (potentially the root `Infrastructure` type and/or `OpenStackPlatformStatus` for status-only enforcement).
- After adding validations, regenerate CRDs/openapi artifacts so the rules appear in the generated manifests.

## Fix Focus Areas
- config/v1/types_infrastructure.go[1161-1217]
- config/v1/types_infrastructure.go[1229-1333]
- config/v1/types_infrastructure.go[1273-1310]
- config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-Default.crd.yaml[2186-2234]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


3. MaxItems=10 not documented 📜 Skill insight ✧ Quality
Description
The new list fields include +kubebuilder:validation:MaxItems=10 but the field comments do not
mention this item-count constraint. This violates the requirement to document kubebuilder constraint
markers in field comments.
Code

config/v1/types_infrastructure.go[R1203-1206]

+	// +kubebuilder:validation:MaxItems=10
+	// +listType=atomic
+	// +optional
+	AdditionalAPIServerIPs []IP `json:"additionalAPIServerIPs,omitempty"`
Relevance

●●● Strong

They commonly document list bounds in GoDoc when using MaxItems/MinItems kubebuilder markers.

PR-#2481

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
PR Compliance ID 1512 requires that kubebuilder constraint markers (including MaxItems) be
reflected in the field's documentation comment. The added fields have MaxItems=10 markers, but the
descriptive comment text does not mention the maximum allowed list length.

config/v1/types_infrastructure.go[1197-1206]
config/v1/types_infrastructure.go[1208-1217]
config/v1/types_infrastructure.go[1273-1283]
config/v1/types_infrastructure.go[1285-1295]
Skill: api-review

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Fields with kubebuilder constraint markers must document those constraints in the human-readable comment text.

## Issue Context
`AdditionalAPIServerIPs` and `AdditionalIngressIPs` have `+kubebuilder:validation:MaxItems=10`, but their doc comments do not state the maximum number of items.

## Fix Focus Areas
- config/v1/types_infrastructure.go[1197-1217]
- config/v1/types_infrastructure.go[1273-1295]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

4. Additional*IPs missing FeatureGate marker 📘 Rule violation § Compliance
Description
New stable config/v1 API fields were added without a +openshift:enable:FeatureGate=<Name> marker
immediately above them. This violates the requirement to gate new fields in stable APIs to preserve
API compatibility expectations.
Code

config/v1/types_infrastructure.go[R1203-1206]

+	// +kubebuilder:validation:MaxItems=10
+	// +listType=atomic
+	// +optional
+	AdditionalAPIServerIPs []IP `json:"additionalAPIServerIPs,omitempty"`
Relevance

●●● Strong

Stable config/v1 additions are typically feature-gated; repo consistently uses +openshift:enable
markers on optional fields.

PR-#2460
PR-#2680

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
PR Compliance ID 185 requires every newly added field in a stable API struct to have a
+openshift:enable:FeatureGate=<FeatureGateName> marker directly preceding it. The newly added
AdditionalAPIServerIPs/AdditionalIngressIPs fields in both OpenStackPlatformSpec and
OpenStackPlatformStatus do not have any such marker in their comment blocks.

Rule 185: Gate new fields in stable APIs with +openshift:enable:FeatureGate marker
config/v1/types_infrastructure.go[1197-1217]
config/v1/types_infrastructure.go[1273-1295]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
New stable v1 API fields were added without a `+openshift:enable:FeatureGate=<FeatureGateName>` marker directly above the field declarations.

## Issue Context
These fields are in `config/v1` (stable) API structs and must be gated per policy.

## Fix Focus Areas
- config/v1/types_infrastructure.go[1197-1217]
- config/v1/types_infrastructure.go[1273-1295]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Context used
✅ Compliance rules (platform): 29 rules
✅ Skills: api-review

Grey Divider

Tip of the day
💡 Did you know, you can group findings by type and pick your Finding display, from Minimal to Full

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment on lines +1203 to +1206
// +kubebuilder:validation:MaxItems=10
// +listType=atomic
// +optional
AdditionalAPIServerIPs []IP `json:"additionalAPIServerIPs,omitempty"`

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Remediation recommended

1. Additional*ips missing featuregate marker 📘 Rule violation § Compliance

New stable config/v1 API fields were added without a +openshift:enable:FeatureGate=<Name> marker
immediately above them. This violates the requirement to gate new fields in stable APIs to preserve
API compatibility expectations.
Agent Prompt
## Issue description
New stable v1 API fields were added without a `+openshift:enable:FeatureGate=<FeatureGateName>` marker directly above the field declarations.

## Issue Context
These fields are in `config/v1` (stable) API structs and must be gated per policy.

## Fix Focus Areas
- config/v1/types_infrastructure.go[1197-1217]
- config/v1/types_infrastructure.go[1273-1295]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment on lines +1205 to +1206
// +optional
AdditionalAPIServerIPs []IP `json:"additionalAPIServerIPs,omitempty"`

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

2. Additional*ips omit behavior undocumented 📜 Skill insight ✧ Quality

The new optional fields AdditionalAPIServerIPs and AdditionalIngressIPs do not document what
happens when they are omitted. This makes API behavior unclear for clients and violates the required
omission-behavior documentation rule.
Agent Prompt
## Issue description
New optional API fields were added but their doc comments do not explain behavior when the fields are omitted.

## Issue Context
For optional fields (`+optional` and/or pointer/omitempty), documentation must explicitly state what happens when the field is not provided (e.g., "When omitted...").

## Fix Focus Areas
- config/v1/types_infrastructure.go[1197-1217]
- config/v1/types_infrastructure.go[1273-1295]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment on lines +1200 to +1202
// simultaneously. Each entry must be a valid IP address. This field is
// only valid when loadBalancer.type is set to UserManaged.
//

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

3. Missing xvalidation for loadbalancer.type 📜 Skill insight ≡ Correctness

The new OpenStack additional IP fields are documented as "only valid when loadBalancer.type is set
to UserManaged" but there is no corresponding CEL/XValidation rule enforcing that cross-field
relationship. This allows invalid combinations into the API and can expose inconsistent objects to
consumers, contradicting the documented contract.
Agent Prompt
## Issue description
Field documentation introduces a cross-field constraint: `AdditionalAPIServerIPs` / `AdditionalIngressIPs` are only valid when `loadBalancer.type` is `UserManaged`, but there is no `+kubebuilder:validation:XValidation` / CEL rule enforcing this relationship in the API schema.

## Issue Context
- PR Compliance ID 1511 requires that documented cross-field relationships be enforced with XValidation.
- The new fields currently have only size/list annotations, and the generated CRD schema has no `x-kubernetes-validations` that ties them to `loadBalancer.type`.
- A similar `loadBalancer.type`-dependent invariant is already enforced for `dnsRecordsType` via CEL/XValidation, so there is precedent for codifying these invariants.
- XValidation must be attached at a struct scope that can “see” all referenced fields (potentially the root `Infrastructure` type and/or `OpenStackPlatformStatus` for status-only enforcement).
- After adding validations, regenerate CRDs/openapi artifacts so the rules appear in the generated manifests.

## Fix Focus Areas
- config/v1/types_infrastructure.go[1161-1217]
- config/v1/types_infrastructure.go[1229-1333]
- config/v1/types_infrastructure.go[1273-1310]
- config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-Default.crd.yaml[2186-2234]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment on lines +1203 to +1206
// +kubebuilder:validation:MaxItems=10
// +listType=atomic
// +optional
AdditionalAPIServerIPs []IP `json:"additionalAPIServerIPs,omitempty"`

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

4. maxitems=10 not documented 📜 Skill insight ✧ Quality

The new list fields include +kubebuilder:validation:MaxItems=10 but the field comments do not
mention this item-count constraint. This violates the requirement to document kubebuilder constraint
markers in field comments.
Agent Prompt
## Issue description
Fields with kubebuilder constraint markers must document those constraints in the human-readable comment text.

## Issue Context
`AdditionalAPIServerIPs` and `AdditionalIngressIPs` have `+kubebuilder:validation:MaxItems=10`, but their doc comments do not state the maximum number of items.

## Fix Focus Areas
- config/v1/types_infrastructure.go[1197-1217]
- config/v1/types_infrastructure.go[1273-1295]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@config/v1/types_infrastructure.go`:
- Around line 1273-1296: Add CEL validation for OpenStackPlatformStatus so
AdditionalAPIServerIPs and AdditionalIngressIPs are accepted only when the
sibling loadBalancer.type is UserManaged, following the existing DNSRecordsType
XValidation pattern. Apply the rule to both status fields or their containing
struct while preserving current IP and item-count validations.
- Around line 1197-1218: Add an Infrastructure-level CEL validation rule
covering AdditionalAPIServerIPs and AdditionalIngressIPs that requires
status.platformStatus.openstack.loadBalancer.type to be UserManaged, while
permitting objects whose status or OpenStack load balancer status is not yet
present. Ensure the generated CRD enforces this prerequisite for both fields
rather than validating only IP format and list size.

In
`@payload-manifests/crds/0000_10_config-operator_01_infrastructures-SelfManagedHA-DevPreviewNoUpgrade.crd.yaml`:
- Around line 501-538: Enforce the loadBalancer.type UserManaged precondition
for additionalAPIServerIPs and additionalIngressIPs by adding the corresponding
CEL validation to both fields in every listed schema location:
payload-manifests/crds/0000_10_config-operator_01_infrastructures-SelfManagedHA-DevPreviewNoUpgrade.crd.yaml
ranges 501-538 and 2358-2383;
payload-manifests/crds/0000_10_config-operator_01_infrastructures-TechPreviewNoUpgrade.crd.yaml
ranges 487-524 and 2325-2350; and
payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-TechPreviewNoUpgrade.crd.yaml
ranges 780-817 and 2631-2656. Reject either list when loadBalancer.type is not
UserManaged, while preserving the existing IP validations.
🪄 Autofix

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: 0119c317-ff74-4eda-b18c-26bb81df1781

📥 Commits

Reviewing files that changed from the base of the PR and between 8f52beb and 90a58a9.

⛔ Files ignored due to path filters (45)
  • 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-Hypershift-CustomNoUpgrade.crd.yaml is excluded by !**/zz_generated.crd-manifests/*
  • config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-Hypershift-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-SelfManagedHA-CustomNoUpgrade.crd.yaml is excluded by !**/zz_generated.crd-manifests/*
  • config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-SelfManagedHA-DevPreviewNoUpgrade.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.deepcopy.go 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/AzureDualStackInstall.yaml is excluded by !**/zz_generated.featuregated-crd-manifests/**
  • config/v1/zz_generated.featuregated-crd-manifests/infrastructures.config.openshift.io/BGPBasedVIPManagement.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/MutableTopology.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.featuregated-crd-manifests/infrastructures.config.openshift.io/VSphereMultiVCenterDay2.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-Default.crd.yaml is excluded by !**/zz_generated.crd-manifests/*
  • machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_controllerconfigs-Hypershift-CustomNoUpgrade.crd.yaml is excluded by !**/zz_generated.crd-manifests/*
  • machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_controllerconfigs-Hypershift-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-SelfManagedHA-CustomNoUpgrade.crd.yaml is excluded by !**/zz_generated.crd-manifests/*
  • machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_controllerconfigs-SelfManagedHA-DevPreviewNoUpgrade.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/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/AzureDualStackInstall.yaml is excluded by !**/zz_generated.featuregated-crd-manifests/**
  • machineconfiguration/v1/zz_generated.featuregated-crd-manifests/controllerconfigs.machineconfiguration.openshift.io/BGPBasedVIPManagement.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/MutableTopology.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/**
  • machineconfiguration/v1/zz_generated.featuregated-crd-manifests/controllerconfigs.machineconfiguration.openshift.io/VSphereMultiVCenterDay2.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 (15)
  • config/v1/types_infrastructure.go
  • payload-manifests/crds/0000_10_config-operator_01_infrastructures-Default.crd.yaml
  • payload-manifests/crds/0000_10_config-operator_01_infrastructures-Hypershift-CustomNoUpgrade.crd.yaml
  • payload-manifests/crds/0000_10_config-operator_01_infrastructures-Hypershift-DevPreviewNoUpgrade.crd.yaml
  • payload-manifests/crds/0000_10_config-operator_01_infrastructures-OKD.crd.yaml
  • payload-manifests/crds/0000_10_config-operator_01_infrastructures-SelfManagedHA-CustomNoUpgrade.crd.yaml
  • payload-manifests/crds/0000_10_config-operator_01_infrastructures-SelfManagedHA-DevPreviewNoUpgrade.crd.yaml
  • payload-manifests/crds/0000_10_config-operator_01_infrastructures-TechPreviewNoUpgrade.crd.yaml
  • payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-Default.crd.yaml
  • payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-Hypershift-CustomNoUpgrade.crd.yaml
  • payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-Hypershift-DevPreviewNoUpgrade.crd.yaml
  • payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-OKD.crd.yaml
  • payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-SelfManagedHA-CustomNoUpgrade.crd.yaml
  • payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-SelfManagedHA-DevPreviewNoUpgrade.crd.yaml
  • payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-TechPreviewNoUpgrade.crd.yaml

Comment on lines +1197 to +1218
// additionalAPIServerIPs is a list of additional IP addresses to contact
// the Kubernetes API server on separate networks. These are used when a
// user-managed load balancer exposes the API server on multiple networks
// simultaneously. Each entry must be a valid IP address. This field is
// only valid when loadBalancer.type is set to UserManaged.
//
// +kubebuilder:validation:MaxItems=10
// +listType=atomic
// +optional
AdditionalAPIServerIPs []IP `json:"additionalAPIServerIPs,omitempty"`

// additionalIngressIPs is a list of additional IP addresses that route to
// the default ingress controller on separate networks. These are used when
// a user-managed load balancer exposes the ingress controller on multiple
// networks simultaneously. Each entry must be a valid IP address. This
// field is only valid when loadBalancer.type is set to UserManaged.
//
// +kubebuilder:validation:MaxItems=10
// +listType=atomic
// +optional
AdditionalIngressIPs []IP `json:"additionalIngressIPs,omitempty"`

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -eu

printf '%s\n' '--- target type and nearby declarations ---'
rg -n -C 8 'AdditionalAPIServerIPs|AdditionalIngressIPs|type OpenStackPlatformSpec|type OpenStackPlatformStatus|LoadBalancer|DNSRecordsType' config/v1/types_infrastructure.go

printf '%s\n' '--- all related validation rules and field references ---'
rg -n -C 5 'additionalAPIServerIPs|additionalIngressIPs|loadBalancer\.type|platformSpec\.openstack|platformStatus\.openstack|controlPlaneTopology must match' .

printf '%s\n' '--- Infrastructure and ControllerConfig declarations ---'
rg -n -C 12 'type Infrastructure struct|type ControllerConfig struct|x-kubernetes-validations' config/v1

Repository: openshift/api

Length of output: 50370


🏁 Script executed:

#!/bin/bash
set -eu

printf '%s\n' '--- target source matches only ---'
rg -n -C 12 'AdditionalAPIServerIPs|AdditionalIngressIPs|type OpenStackPlatformSpec|type OpenStackPlatformStatus|LoadBalancer|DNSRecordsType' config/v1/types_infrastructure.go

printf '%s\n' '--- Infrastructure and ControllerConfig source declarations ---'
rg -n -C 15 'type Infrastructure struct|type ControllerConfig struct|platformSpec|platformStatus|controlPlaneTopology must match' config/v1 --glob '*.go'

printf '%s\n' '--- current change summary ---'
git diff --stat -- config/v1/types_infrastructure.go
git diff -- config/v1/types_infrastructure.go | sed -n '1,220p'

Repository: openshift/api

Length of output: 50369


🏁 Script executed:

#!/bin/bash
set -eu

printf '%s\n' '--- exact change ---'
git diff --unified=8 -- config/v1/types_infrastructure.go

printf '%s\n' '--- non-generated consumers and validators ---'
rg -n -C 6 'AdditionalAPIServerIPs|AdditionalIngressIPs|additionalAPIServerIPs|additionalIngressIPs' \
  --glob '!config/v1/zz_generated.crd-manifests/**' \
  --glob '!**/vendor/**' .

printf '%s\n' '--- relevant generated schema fragments ---'
python3 - <<'PY'
from pathlib import Path

for p in Path("config/v1/zz_generated.crd-manifests").glob("*.yaml"):
    text = p.read_text(errors="replace")
    hits = []
    for needle in ("additionalAPIServerIPs:", "additionalIngressIPs:"):
        start = 0
        while True:
            i = text.find(needle, start)
            if i < 0:
                break
            line = text.count("\n", 0, i) + 1
            block = text[i:i+900].splitlines()[:18]
            hits.append((line, needle, block))
            start = i + len(needle)
    if hits:
        print(f"FILE {p}")
        for line, needle, block in hits:
            print(f"LINE {line} {needle}")
            print("\n".join(block))
PY

Repository: openshift/api

Length of output: 50370


🏁 Script executed:

#!/bin/bash
set -eu

printf '%s\n' '--- target diff additions and removals ---'
git diff --unified=0 -- config/v1/types_infrastructure.go \
  | rg '^(diff|@@|[+-][^+-])' | sed -n '1,180p'

printf '%s\n' '--- consumers in Go and validation markers ---'
rg -n -C 5 'AdditionalAPIServerIPs|AdditionalIngressIPs|additionalAPIServerIPs|additionalIngressIPs' \
  config machineconfiguration --glob '*.go' --glob '!zz_generated/**' --glob '!vendor/**'

printf '%s\n' '--- ControllerConfig source shape ---'
rg -n -C 14 'type ControllerConfig struct|Infrastructure|platformSpec|platformStatus|controlPlaneTopology' \
  machineconfiguration --glob '*.go' --glob '!zz_generated/**'

printf '%s\n' '--- Infrastructure CRD files ---'
find config/v1/zz_generated.crd-manifests config/v1/zz_generated.featuregated-crd-manifests \
  -type f -iname '*infrastructures*' -print | head -20

Repository: openshift/api

Length of output: 23321


🏁 Script executed:

#!/bin/bash
set -eu

python3 - <<'PY'
from pathlib import Path
import re

source = Path("config/v1/types_infrastructure.go").read_text()

def type_body(name):
    m = re.search(r"(?m)^type " + re.escape(name) + r"\s+struct\s*\{", source)
    if not m:
        raise SystemExit(f"missing {name}")
    start = m.end()
    depth = 1
    i = start
    while depth and i < len(source):
        if source[i] == "{":
            depth += 1
        elif source[i] == "}":
            depth -= 1
        i += 1
    return source[start:i-1]

for name in ("OpenStackPlatformSpec", "OpenStackPlatformStatus"):
    body = type_body(name)
    print(f"{name}:")
    for field in ("LoadBalancer", "AdditionalAPIServerIPs", "AdditionalIngressIPs"):
        print(f"  {field}: {'yes' if re.search(r'(?m)^\\s*' + field + r'\\b', body) else 'no'}")
    print("  loadBalancer.type validation markers:",
          "yes" if "loadBalancer.type" in body else "no")

print("Infrastructure root spec/status validation markers:")
infra_head = source[source.index("type Infrastructure struct")-1000:source.index("type Infrastructure struct")]
for needle in ("self.spec.controlPlaneTopology", "self.status.controlPlaneTopology"):
    print(f"  {needle}: {'yes' if needle in infra_head else 'no'}")

print("Source validation markers mentioning additional fields:")
for line_no, line in enumerate(source.splitlines(), 1):
    if ("additionalAPIServerIPs" in line or "additionalIngressIPs" in line) and "XValidation" in line:
        print(f"  {line_no}: {line.strip()}")
PY

printf '%s\n' '--- generated validation expressions in the default Infrastructure CRD ---'
rg -n -C 3 \
  'additionalAPIServerIPs|additionalIngressIPs|spec\.controlPlaneTopology must match|self\.spec\.controlPlaneTopology|self\.status\.controlPlaneTopology' \
  config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-Default.crd.yaml

Repository: openshift/api

Length of output: 428


🏁 Script executed:

#!/bin/bash
set -eu

python3 - <<'PY'
from pathlib import Path
import re

source = Path("config/v1/types_infrastructure.go").read_text()

def type_body(name):
    m = re.search(r"(?m)^type " + re.escape(name) + r"\s+struct\s*\{", source)
    if not m:
        raise SystemExit(f"missing {name}")
    start = m.end()
    depth = 1
    i = start
    while depth and i < len(source):
        if source[i] == "{":
            depth += 1
        elif source[i] == "}":
            depth -= 1
        i += 1
    return source[start:i-1]

for name in ("OpenStackPlatformSpec", "OpenStackPlatformStatus"):
    body = type_body(name)
    print(f"{name}:")
    for field in ("LoadBalancer", "AdditionalAPIServerIPs", "AdditionalIngressIPs"):
        present = bool(re.search(r"(?m)^\s*" + field + r"\b", body))
        print(f"  {field}: {'yes' if present else 'no'}")
    print("  loadBalancer.type validation markers:",
          "yes" if "loadBalancer.type" in body else "no")

print("Infrastructure root spec/status validation markers:")
infra_pos = source.index("type Infrastructure struct")
infra_head = source[max(0, infra_pos - 1200):infra_pos]
for needle in ("self.spec.controlPlaneTopology", "self.status.controlPlaneTopology"):
    print(f"  {needle}: {'yes' if needle in infra_head else 'no'}")

print("Source validation markers mentioning additional fields:")
for line_no, line in enumerate(source.splitlines(), 1):
    if ("additionalAPIServerIPs" in line or "additionalIngressIPs" in line) and "XValidation" in line:
        print(f"  {line_no}: {line.strip()}")
PY

printf '%s\n' '--- generated validation expressions in the default Infrastructure CRD ---'
rg -n -C 3 \
  'additionalAPIServerIPs|additionalIngressIPs|spec\.controlPlaneTopology must match|self\.spec\.controlPlaneTopology|self\.status\.controlPlaneTopology' \
  config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-Default.crd.yaml

Repository: openshift/api

Length of output: 3352


Enforce the loadBalancer.type prerequisite for the additional OpenStack IP fields.

OpenStackPlatformSpec has no LoadBalancer; it exists only in OpenStackPlatformStatus. The generated CRD validates only IP format and list size. It accepts these fields when loadBalancer.type is not UserManaged.

Add an Infrastructure-level CEL rule that checks both fields against status.platformStatus.openstack.loadBalancer.type, while allowing the initial object before status exists. Otherwise, document the component that enforces this prerequisite.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@config/v1/types_infrastructure.go` around lines 1197 - 1218, Add an
Infrastructure-level CEL validation rule covering AdditionalAPIServerIPs and
AdditionalIngressIPs that requires
status.platformStatus.openstack.loadBalancer.type to be UserManaged, while
permitting objects whose status or OpenStack load balancer status is not yet
present. Ensure the generated CRD enforces this prerequisite for both fields
rather than validating only IP format and list size.

Comment on lines +1273 to +1296
// additionalAPIServerIPs is a list of additional IP addresses to contact
// the Kubernetes API server on separate networks. These are used when a
// user-managed load balancer exposes the API server on multiple networks
// simultaneously. Each entry must be a valid IP address. This field is
// only valid when loadBalancer.type is set to UserManaged.
//
// +kubebuilder:validation:Format=ip
// +kubebuilder:validation:MaxItems=10
// +listType=atomic
// +optional
AdditionalAPIServerIPs []string `json:"additionalAPIServerIPs,omitempty"`

// additionalIngressIPs is a list of additional IP addresses that route to
// the default ingress controller on separate networks. These are used when
// a user-managed load balancer exposes the ingress controller on multiple
// networks simultaneously. Each entry must be a valid IP address. This
// field is only valid when loadBalancer.type is set to UserManaged.
//
// +kubebuilder:validation:Format=ip
// +kubebuilder:validation:MaxItems=10
// +listType=atomic
// +optional
AdditionalIngressIPs []string `json:"additionalIngressIPs,omitempty"`

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Add CEL enforcement for the "loadBalancer.type" constraint on the status fields.

Unlike the spec fields, loadBalancer is a real sibling field on OpenStackPlatformStatus (line 1309). The doc comments for AdditionalAPIServerIPs and AdditionalIngressIPs here state the field "is only valid when loadBalancer.type is set to UserManaged," but no x-kubernetes-validations rule enforces it, even though the same-struct pattern is already used for DNSRecordsType (dnsRecordsType may only be set to External when loadBalancer.type is UserManaged).

Add a similar +kubebuilder:validation:XValidation rule on AdditionalAPIServerIPs/AdditionalIngressIPs (or on the struct) to prevent silently-ignored values when loadBalancer.type is not UserManaged.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@config/v1/types_infrastructure.go` around lines 1273 - 1296, Add CEL
validation for OpenStackPlatformStatus so AdditionalAPIServerIPs and
AdditionalIngressIPs are accepted only when the sibling loadBalancer.type is
UserManaged, following the existing DNSRecordsType XValidation pattern. Apply
the rule to both status fields or their containing struct while preserving
current IP and item-count validations.

Comment on lines +501 to +538
additionalAPIServerIPs:
description: |-
additionalAPIServerIPs is a list of additional IP addresses to contact
the Kubernetes API server on separate networks. These are used when a
user-managed load balancer exposes the API server on multiple networks
simultaneously. Each entry must be a valid IP address. This field is
only valid when loadBalancer.type is set to UserManaged.
items:
description: IP is an IP address (for example, "10.0.0.0"
or "fd00::").
maxLength: 39
minLength: 1
type: string
x-kubernetes-validations:
- message: value must be a valid IP address
rule: isIP(self)
maxItems: 10
type: array
x-kubernetes-list-type: atomic
additionalIngressIPs:
description: |-
additionalIngressIPs is a list of additional IP addresses that route to
the default ingress controller on separate networks. These are used when
a user-managed load balancer exposes the ingress controller on multiple
networks simultaneously. Each entry must be a valid IP address. This
field is only valid when loadBalancer.type is set to UserManaged.
items:
description: IP is an IP address (for example, "10.0.0.0"
or "fd00::").
maxLength: 39
minLength: 1
type: string
x-kubernetes-validations:
- message: value must be a valid IP address
rule: isIP(self)
maxItems: 10
type: array
x-kubernetes-list-type: atomic

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Enforce the UserManaged precondition in CEL.

The field descriptions require loadBalancer.type to be UserManaged. No OpenStack CEL rule enforces this requirement. The API server can accept additional endpoint IPs with OpenShiftManagedDefault. This differs from the existing dnsRecordsType constraint.

Add a validation rule that rejects either additional list unless loadBalancer.type is UserManaged. Apply it to both the OpenStack spec and status schemas.

  • payload-manifests/crds/0000_10_config-operator_01_infrastructures-SelfManagedHA-DevPreviewNoUpgrade.crd.yaml#L501-L538: add the OpenStack spec CEL condition.
  • payload-manifests/crds/0000_10_config-operator_01_infrastructures-SelfManagedHA-DevPreviewNoUpgrade.crd.yaml#L2358-L2383: add the OpenStack status CEL condition.
  • payload-manifests/crds/0000_10_config-operator_01_infrastructures-TechPreviewNoUpgrade.crd.yaml#L487-L524: add the OpenStack spec CEL condition.
  • payload-manifests/crds/0000_10_config-operator_01_infrastructures-TechPreviewNoUpgrade.crd.yaml#L2325-L2350: add the OpenStack status CEL condition.
  • payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-TechPreviewNoUpgrade.crd.yaml#L780-L817: add the embedded Infrastructure spec CEL condition.
  • payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-TechPreviewNoUpgrade.crd.yaml#L2631-L2656: add the embedded Infrastructure status CEL condition.
📍 Affects 3 files
  • payload-manifests/crds/0000_10_config-operator_01_infrastructures-SelfManagedHA-DevPreviewNoUpgrade.crd.yaml#L501-L538 (this comment)
  • payload-manifests/crds/0000_10_config-operator_01_infrastructures-SelfManagedHA-DevPreviewNoUpgrade.crd.yaml#L2358-L2383
  • payload-manifests/crds/0000_10_config-operator_01_infrastructures-TechPreviewNoUpgrade.crd.yaml#L487-L524
  • payload-manifests/crds/0000_10_config-operator_01_infrastructures-TechPreviewNoUpgrade.crd.yaml#L2325-L2350
  • payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-TechPreviewNoUpgrade.crd.yaml#L780-L817
  • payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-TechPreviewNoUpgrade.crd.yaml#L2631-L2656
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@payload-manifests/crds/0000_10_config-operator_01_infrastructures-SelfManagedHA-DevPreviewNoUpgrade.crd.yaml`
around lines 501 - 538, Enforce the loadBalancer.type UserManaged precondition
for additionalAPIServerIPs and additionalIngressIPs by adding the corresponding
CEL validation to both fields in every listed schema location:
payload-manifests/crds/0000_10_config-operator_01_infrastructures-SelfManagedHA-DevPreviewNoUpgrade.crd.yaml
ranges 501-538 and 2358-2383;
payload-manifests/crds/0000_10_config-operator_01_infrastructures-TechPreviewNoUpgrade.crd.yaml
ranges 487-524 and 2325-2350; and
payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-TechPreviewNoUpgrade.crd.yaml
ranges 780-817 and 2631-2656. Reject either list when loadBalancer.type is not
UserManaged, while preserving the existing IP validations.

@openshift-ci

openshift-ci Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

@winiciusallan: 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 90a58a9 link true /test verify
ci/prow/lint 90a58a9 link true /test lint
ci/prow/verify-hypershift-integration 90a58a9 link true /test verify-hypershift-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.

@everettraven

everettraven commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

@winiciusallan Is there an enhancement proposal associated with this work? Adding new fields to an API requires a feature gate. In this particular scenario, I'd also push for the validation change approach to be feature gated to ensure that this change goes through the standard feature promotion process.

Without more background knowledge here, this seems like a change we would want to make sure doesn't have a negative impact, or require changes, to core platform components.

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/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants