Skip to content

SPLAT-2827: Added vSphere failure domain to vcenter check#2932

Open
vr4manta wants to merge 1 commit into
openshift:masterfrom
vr4manta:SPLAT-2827
Open

SPLAT-2827: Added vSphere failure domain to vcenter check#2932
vr4manta wants to merge 1 commit into
openshift:masterfrom
vr4manta:SPLAT-2827

Conversation

@vr4manta

@vr4manta vr4manta commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

SPLAT-2827

Changes

  • Added checks to vCenter infrastructure spec to make sure that all failure domains have a vCenter configured int he vCenters section

Notes

These changes are being gated behind the VSphereMultiVCenterDay2 feature gate

@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 Jul 14, 2026
@openshift-ci-robot

openshift-ci-robot commented Jul 14, 2026

Copy link
Copy Markdown

@vr4manta: This pull request references SPLAT-2827 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:

SPLAT-2827

Changes

  • Added checks to vCenter infrastructure spec to make sure that all failure domains have a vCenter configured int he vCenters section

Notes

These changes are being gated behind the VSphereMultiVCenterDay2 feature gate

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 Jul 14, 2026

Copy link
Copy Markdown
Contributor

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

@openshift-ci openshift-ci Bot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Jul 14, 2026
@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Added a feature-gated vSphere validation rule requiring every non-empty failure domain to reference a configured vCenter with the same server value. Propagated the rule to infrastructure and controller configuration CRD manifests. Added create and update test cases for matching, missing, removed, shared, and case-mismatched server references. Updated existing vSphere network fixtures and added an AGENTS.md reference to CLAUDE.md.

Suggested reviewers: sinnykumari, joelspeed

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately summarizes the main change: adding a vSphere failure domain to vCenter validation.
Description check ✅ Passed The description is clearly related to the change and correctly mentions the vCenter/failure domain validation and feature gate.
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 Added test titles are fixed, descriptive strings; no dynamic values, timestamps, UUIDs, IPs, or generated names appear in the titles.
Test Structure And Quality ✅ Passed Fixture-only YAML tests follow existing one-scenario-per-case style; no Ginkgo blocks, cluster ops, or timeout/cleanup concerns are introduced.
Microshift Test Compatibility ✅ Passed No new Ginkgo e2e tests were added; the PR only changes CRD schema/validation fixtures, so the MicroShift test check is not applicable.
Single Node Openshift (Sno) Test Compatibility ✅ Passed No new Ginkgo e2e tests were added; the PR only changes YAML schema fixtures and generated CRDs, so SNO-specific test compatibility is not applicable.
Topology-Aware Scheduling Compatibility ✅ Passed Only vSphere CRD/CEL validation changes were added; no pod scheduling, replica, affinity, or topology-aware controller code was modified.
Ote Binary Stdout Contract ✅ Passed No process-level stdout writes were added; the PR only changes validation annotations, CRD manifests, and YAML test fixtures.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed PR adds CRD validation and declarative YAML fixtures only; no new Ginkgo e2e tests, IPv4-only logic, or public internet connectivity were found.
No-Weak-Crypto ✅ Passed Scanned all touched files; no MD5/SHA1/DES/RC4/ECB, crypto imports, or secret-comparison code. Changes are validation annotations and YAML tests only.
Container-Privileges ✅ Passed Changed files are CRD/tests only; no privileged, hostPID/Network/IPC, SYS_ADMIN, allowPrivilegeEscalation, or runAsRoot fields were found.
No-Sensitive-Data-In-Logs ✅ Passed No added logging or print statements were found in the changed files; the PR only adds schema validation and test fixtures, not runtime logs.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@openshift-ci openshift-ci Bot requested review from JoelSpeed and sinnykumari July 14, 2026 12:22
@openshift-ci

openshift-ci Bot commented Jul 14, 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 everettraven 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

@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: 5

🤖 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
`@payload-manifests/crds/0000_10_config-operator_01_infrastructures-Hypershift-DevPreviewNoUpgrade.crd.yaml`:
- Around line 1096-1099: The validation rule near the failure-domain/vCenter
message currently permits configurations with failureDomains but no vcenters;
update it so vcenters is required whenever failureDomains is configured, while
preserving the check that every failure domain matches a vcenter.server entry.

In
`@payload-manifests/crds/0000_10_config-operator_01_infrastructures-Hypershift-TechPreviewNoUpgrade.crd.yaml`:
- Around line 1096-1099: Update the CEL validation rule for failureDomains in
both
payload-manifests/crds/0000_10_config-operator_01_infrastructures-Hypershift-TechPreviewNoUpgrade.crd.yaml:1096-1099
and
payload-manifests/crds/0000_10_config-operator_01_infrastructures-SelfManagedHA-CustomNoUpgrade.crd.yaml:1111-1114
so every configured failure domain requires vcenters to be present and include a
matching server; remove the !has(self.vcenters) short-circuit, then regenerate
the corresponding CRDs.

In
`@payload-manifests/crds/0000_10_config-operator_01_infrastructures-SelfManagedHA-DevPreviewNoUpgrade.crd.yaml`:
- Around line 1111-1114: Update the failure-domain validation rule in both
listed SelfManagedHA CRD files at the specified ranges so vcenters is required
whenever failureDomains is present before matching servers; regenerate the
generated CRDs to apply the corrected rule consistently.

In
`@payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-Hypershift-CustomNoUpgrade.crd.yaml`:
- Around line 1403-1407: Update the failure-domain validation rule to reject
configurations where failureDomains is present without vcenters. Remove the
!has(self.vcenters) bypass while preserving validation that every failure domain
has a matching vCenter server.

In
`@payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-Hypershift-DevPreviewNoUpgrade.crd.yaml`:
- Around line 1388-1392: Update the CEL rule for the failureDomains/vcenters
validation in all four listed
CRDs—payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-Hypershift-DevPreviewNoUpgrade.crd.yaml:1388-1392,
payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-Hypershift-TechPreviewNoUpgrade.crd.yaml:1388-1392,
payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-SelfManagedHA-CustomNoUpgrade.crd.yaml:1403-1407,
and
payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-SelfManagedHA-DevPreviewNoUpgrade.crd.yaml:1403-1407—so
failureDomains cannot bypass validation when vcenters is absent; remove the
!has(self.vcenters) short-circuit or explicitly require vcenters whenever
failureDomains is present, while preserving the matching-entry check.
🪄 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: ad3586cd-9c22-4c43-bedd-381ff9931a24

📥 Commits

Reviewing files that changed from the base of the PR and between 1e68ae5 and f9b8721.

⛔ Files ignored due to path filters (14)
  • 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-Hypershift-TechPreviewNoUpgrade.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-SelfManagedHA-TechPreviewNoUpgrade.crd.yaml is excluded by !**/zz_generated.crd-manifests/*
  • config/v1/zz_generated.featuregated-crd-manifests/infrastructures.config.openshift.io/VSphereMultiVCenterDay2.yaml is excluded by !**/zz_generated.featuregated-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-Hypershift-TechPreviewNoUpgrade.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-SelfManagedHA-TechPreviewNoUpgrade.crd.yaml is excluded by !**/zz_generated.crd-manifests/*
  • machineconfiguration/v1/zz_generated.featuregated-crd-manifests/controllerconfigs.machineconfiguration.openshift.io/VSphereMultiVCenterDay2.yaml is excluded by !**/zz_generated.featuregated-crd-manifests/**
📒 Files selected for processing (16)
  • CLAUDE.md
  • CLAUDE.md
  • config/v1/tests/infrastructures.config.openshift.io/VSphereMultiVCenterDay2.yaml
  • config/v1/types_infrastructure.go
  • 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-Hypershift-TechPreviewNoUpgrade.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-SelfManagedHA-TechPreviewNoUpgrade.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-Hypershift-TechPreviewNoUpgrade.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-SelfManagedHA-TechPreviewNoUpgrade.crd.yaml

@openshift-ci openshift-ci Bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jul 14, 2026
@openshift-ci openshift-ci Bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jul 14, 2026
@openshift-ci openshift-ci Bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jul 14, 2026
@openshift-ci openshift-ci Bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jul 14, 2026
@openshift-ci

openshift-ci Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

@vr4manta: all tests passed!

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.

@jcpowermac

Copy link
Copy Markdown
Contributor

/verified by @jcpowermac via e2e testing

CSI storage in new failure domain should confirm vCenter removal blocked by existing xValidation, PV presence irrelevant (N-CSI-09) [real-vcenter, mutating, storage, p1]
/home/jcallen/Development/testing-day2-vcenter/test/e2e/csi_storage_test.go:455
  probing removal of vCenter vcenter-120.ci.ibmc.devcluster.openshift.com (hosts FD with PVs) via dry-run
  vCenter removal denied as expected: Infrastructure.config.openshift.io "cluster" is invalid: spec.platformSpec.vsphere: Invalid value: all failure domains must have a corresponding vCenter entry
  PV presence irrelevant — denial is based on FD reference to vCenter, not PV protection
  ...

https://github.com/jcpowermac/testing-day2-vcenter/blob/main/docs/tests/N-CSI-09.md

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Jul 14, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@jcpowermac: This PR has been marked as verified by @jcpowermac via e2e testing.

Details

In response to this:

/verified by @jcpowermac via e2e testing

CSI storage in new failure domain should confirm vCenter removal blocked by existing xValidation, PV presence irrelevant (N-CSI-09) [real-vcenter, mutating, storage, p1]
/home/jcallen/Development/testing-day2-vcenter/test/e2e/csi_storage_test.go:455
 probing removal of vCenter vcenter-120.ci.ibmc.devcluster.openshift.com (hosts FD with PVs) via dry-run
 vCenter removal denied as expected: Infrastructure.config.openshift.io "cluster" is invalid: spec.platformSpec.vsphere: Invalid value: all failure domains must have a corresponding vCenter entry
 PV presence irrelevant — denial is based on FD reference to vCenter, not PV protection
 ...

https://github.com/jcpowermac/testing-day2-vcenter/blob/main/docs/tests/N-CSI-09.md

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.

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/XL Denotes a PR that changes 500-999 lines, ignoring generated files. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants