Skip to content

Treat x-validations as a map when merging for manifest merge#2896

Open
JoelSpeed wants to merge 2 commits into
openshift:masterfrom
JoelSpeed:fix-x-validation-manifest-merge
Open

Treat x-validations as a map when merging for manifest merge#2896
JoelSpeed wants to merge 2 commits into
openshift:masterfrom
JoelSpeed:fix-x-validation-manifest-merge

Conversation

@JoelSpeed

Copy link
Copy Markdown
Contributor

When gated manifests contain different XValidations, because the list is currently treated as atomic, last write wins. This means we lose some XValidations during the merge. The first commit here switches the manifest merge to treat x-kubernetes-validations as a map so that we can merge multiple different opinions together.

CC @miyadav This should fix your issue with capabilities

@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

@coderabbitai

coderabbitai Bot commented Jun 19, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

The pull request updates x-kubernetes-validations CEL rules across multiple CRD variant files (Custom, Default, DevPreview, TechPreview, OKD). Two functional changes are made: (1) ARN regex patterns for privateZoneIAMRole (DNS and ControllerConfig CRDs) and kmsKeyARN (ClusterCSIDriver CRDs) are narrowed to exclude the aws-eusc partition; (2) new immutability rules are added to vcenters list fields in Infrastructure and ControllerConfig CRDs, blocking list size changes after initial population and capping post-install vSphere vcenters configuration at one entry. Additionally, crd-schema.json changes the x-kubernetes-validations list topology from atomic to map keyed by rule.

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: updating the manifest merge logic to treat x-kubernetes-validations as a map instead of atomic.
Description check ✅ Passed The description is directly related to the changeset, explaining the motivation (loss of XValidations during merge), the solution (treat as map), and the expected benefit (preserve multiple opinions).
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 No Ginkgo test files in this PR contain unstable test names. Tests use static, filesystem-based directory names (e.g., "contradicting-validation", "missing-optional-doc") with no dynamic values.
Test Structure And Quality ✅ Passed This PR contains only YAML CRD manifest files and a JSON schema configuration file. No Ginkgo test files are added or modified, making this quality check not applicable to the PR.
Microshift Test Compatibility ✅ Passed No Ginkgo e2e tests are added in this PR. Changes are only to CRD YAML manifests and JSON schema configuration files, making this check not applicable.
Single Node Openshift (Sno) Test Compatibility ✅ Passed This PR does not add any new Ginkgo e2e tests. Changes are limited to CRD YAML schemas and a JSON schema helper file for manifest merging, making this check not applicable.
Topology-Aware Scheduling Compatibility ✅ Passed PR modifies only CRD schema definitions and tooling config, not deployment manifests, operator code, or controllers. The Topology-Aware Scheduling check is not applicable.
Ote Binary Stdout Contract ✅ Passed The OTE Binary Stdout Contract check is not applicable to this PR. The PR modifies API definitions and manifest merging logic in the openshift/api repository, not OTE test binaries or test infrastr...
Ipv6 And Disconnected Network Test Compatibility ✅ Passed No new Ginkgo e2e tests are added in this PR. All changes are to CRD YAML manifests and JSON schema files, not test code.
No-Weak-Crypto ✅ Passed No weak cryptography usage detected. PR contains no cryptographic code - changes are limited to manifest merge schema configuration and generated CRD manifests.
Container-Privileges ✅ Passed This PR modifies CRD schema validation files and a manifest merge schema configuration. No container privilege escalation settings (privileged, hostPID, hostNetwork, hostIPC, SYS_ADMIN, allowPrivil...
No-Sensitive-Data-In-Logs ✅ Passed No logging statements exposing sensitive data found. Existing logs only contain generic names/actions, and CRD validation messages use only placeholder formats, not actual credentials.

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

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

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

@openshift-ci

openshift-ci Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Hello @JoelSpeed! 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/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jun 19, 2026
@openshift-ci

openshift-ci Bot commented Jun 19, 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

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

Caution

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

⚠️ Outside diff range comments (8)
payload-manifests/crds/0000_10_config-operator_01_dnses-TechPreviewNoUpgrade.crd.yaml (1)

76-87: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

TechPreview DNS CRD still contains conflicting partition constraints for privateZoneIAMRole.

Line 77 still lists aws-eusc; Line 84 excludes it; Line 87 keeps the old allow-list. This should be normalized to one rule plus matching docs.

Suggested fix
-                          <partition> is the AWS partition (aws, aws-cn, aws-us-gov, or aws-eusc),
+                          <partition> is the AWS partition (aws, aws-cn, or aws-us-gov),
@@
                         x-kubernetes-validations:
                         - message: 'privateZoneIAMRole must be a valid AWS IAM role
                             ARN in the format: arn:<partition>:iam::<account-id>:role/<role-name>'
                           rule: matches(self, '^arn:(aws|aws-cn|aws-us-gov):iam::[0-9]{12}:role/.*$')
-                        - message: 'privateZoneIAMRole must be a valid AWS IAM role
-                            ARN in the format: arn:<partition>:iam::<account-id>:role/<role-name>'
-                          rule: matches(self, '^arn:(aws|aws-cn|aws-us-gov|aws-eusc):iam::[0-9]{12}:role/.*$')

As per coding guidelines, validation constraints documented in comments must match enforced validation rules.

🤖 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_dnses-TechPreviewNoUpgrade.crd.yaml`
around lines 76 - 87, The privateZoneIAMRole field has duplicate and conflicting
validation rules in the x-kubernetes-validations section where one rule allows
aws-eusc partition and the other excludes it, and the description also lists
aws-eusc inconsistently. Remove one of the two duplicate validation rules
(either the rule matching aws|aws-cn|aws-us-gov or the rule matching
aws|aws-cn|aws-us-gov|aws-eusc) to eliminate the conflict, then update the
description text to match the partition list in the remaining validation rule to
ensure consistency between documentation and enforced constraints.

Source: Coding guidelines

payload-manifests/crds/0000_50_csi-driver_01_clustercsidrivers-DevPreviewNoUpgrade.crd.yaml (1)

129-141: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

DevPreview ClusterCSIDriver CRD still carries conflicting kmsKeyARN partition constraints.

Line 130 includes aws-eusc, Line 138 excludes it, and Line 141 keeps the previous allow-list. Consolidate to one regex and update docs to the exact supported partitions.

Suggested fix
-                          <partition> is the AWS partition (aws, aws-cn, aws-us-gov, aws-iso, aws-iso-b, aws-iso-e, aws-iso-f, or aws-eusc),
+                          <partition> is the AWS partition (aws, aws-cn, aws-us-gov, aws-iso, aws-iso-b, aws-iso-e, or aws-iso-f),
@@
                         x-kubernetes-validations:
                         - message: 'kmsKeyARN must be a valid AWS KMS key ARN in the
                             format: arn:<partition>:kms:<region>:<account-id>:(key|alias)/<key-id-or-alias>'
                           rule: matches(self, '^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b|aws-iso-e|aws-iso-f):kms:[a-z0-9-]+:[0-9]{12}:(key|alias)/.*$')
-                        - message: 'kmsKeyARN must be a valid AWS KMS key ARN in the
-                            format: arn:<partition>:kms:<region>:<account-id>:(key|alias)/<key-id-or-alias>'
-                          rule: matches(self, '^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b|aws-iso-e|aws-iso-f|aws-eusc):kms:[a-z0-9-]+:[0-9]{12}:(key|alias)/.*$')

As per coding guidelines, validation constraints documented in comments must match enforced validation rules.

🤖 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_50_csi-driver_01_clustercsidrivers-DevPreviewNoUpgrade.crd.yaml`
around lines 129 - 141, The kmsKeyARN field has duplicate and conflicting
x-kubernetes-validations rules in the CRD specification. One validation rule on
line 138 excludes the aws-eusc partition while another on line 141 includes it,
creating a contradiction. Consolidate these two validation rules into a single
x-kubernetes-validations entry that includes all the correct AWS partitions
(aws, aws-cn, aws-us-gov, aws-iso, aws-iso-b, aws-iso-e, aws-iso-f, and
aws-eusc), remove the duplicate conflicting rule, and update the description
text at the beginning of the kmsKeyARN field to accurately reflect the exact
list of supported AWS partitions to ensure consistency between the documentation
and the actual validation constraint.

Source: Coding guidelines

payload-manifests/crds/0000_10_config-operator_01_dnses-DevPreviewNoUpgrade.crd.yaml (1)

76-87: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

privateZoneIAMRole validation is internally inconsistent and still carries stale aws-eusc logic.

Line 77 advertises aws-eusc, but Line 84 rejects it; Line 87 keeps an old permissive rule. Please keep a single validator and update the field description accordingly.

Suggested fix
-                          <partition> is the AWS partition (aws, aws-cn, aws-us-gov, or aws-eusc),
+                          <partition> is the AWS partition (aws, aws-cn, or aws-us-gov),
@@
                         x-kubernetes-validations:
                         - message: 'privateZoneIAMRole must be a valid AWS IAM role
                             ARN in the format: arn:<partition>:iam::<account-id>:role/<role-name>'
                           rule: matches(self, '^arn:(aws|aws-cn|aws-us-gov):iam::[0-9]{12}:role/.*$')
-                        - message: 'privateZoneIAMRole must be a valid AWS IAM role
-                            ARN in the format: arn:<partition>:iam::<account-id>:role/<role-name>'
-                          rule: matches(self, '^arn:(aws|aws-cn|aws-us-gov|aws-eusc):iam::[0-9]{12}:role/.*$')

As per coding guidelines, validation constraints documented in comments must match enforced validation rules.

🤖 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_dnses-DevPreviewNoUpgrade.crd.yaml`
around lines 76 - 87, The privateZoneIAMRole field has conflicting validation
rules in the x-kubernetes-validations list: the first rule on line 84 excludes
aws-eusc from the allowed partitions while the second rule on line 87 includes
it, yet the field description on line 76 advertises aws-eusc as a valid
partition. Remove the duplicate validation rule and keep only the one that
correctly includes aws-eusc (the second rule), ensuring the description and the
remaining validation rule are consistent with each other.

Source: Coding guidelines

payload-manifests/crds/0000_50_csi-driver_01_clustercsidrivers-CustomNoUpgrade.crd.yaml (1)

129-141: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

kmsKeyARN partition docs/rules are out of sync, and the old aws-eusc rule is still present.

Line 130 documents aws-eusc, but Line 138 excludes it; Line 141 still keeps a legacy permissive rule. Please keep only one validator and align the description.

Suggested fix
-                          <partition> is the AWS partition (aws, aws-cn, aws-us-gov, aws-iso, aws-iso-b, aws-iso-e, aws-iso-f, or aws-eusc),
+                          <partition> is the AWS partition (aws, aws-cn, aws-us-gov, aws-iso, aws-iso-b, aws-iso-e, or aws-iso-f),
@@
                         x-kubernetes-validations:
                         - message: 'kmsKeyARN must be a valid AWS KMS key ARN in the
                             format: arn:<partition>:kms:<region>:<account-id>:(key|alias)/<key-id-or-alias>'
                           rule: matches(self, '^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b|aws-iso-e|aws-iso-f):kms:[a-z0-9-]+:[0-9]{12}:(key|alias)/.*$')
-                        - message: 'kmsKeyARN must be a valid AWS KMS key ARN in the
-                            format: arn:<partition>:kms:<region>:<account-id>:(key|alias)/<key-id-or-alias>'
-                          rule: matches(self, '^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b|aws-iso-e|aws-iso-f|aws-eusc):kms:[a-z0-9-]+:[0-9]{12}:(key|alias)/.*$')

As per coding guidelines, validation constraints documented in comments must match enforced validation rules.

🤖 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_50_csi-driver_01_clustercsidrivers-CustomNoUpgrade.crd.yaml`
around lines 129 - 141, The kmsKeyARN field has two duplicate
x-kubernetes-validations rules with conflicting regex patterns - the first rule
excludes aws-eusc partition while the second includes it, creating inconsistency
with the documentation that lists aws-eusc. Remove the first validation rule
(the one matching the pattern without aws-eusc) and keep only the second
validation rule that includes the aws-eusc partition. Ensure the description of
the field at the beginning of the spec matches the partitions listed in the kept
validation rule.

Source: Coding guidelines

payload-manifests/crds/0000_10_config-operator_01_dnses-CustomNoUpgrade.crd.yaml (1)

76-87: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Align privateZoneIAMRole docs and CEL rules; remove the stale aws-eusc validator.

Line 77 still documents aws-eusc, while Line 84 removes it and Line 87 still re-allows it in a second rule. Keep one canonical rule and update docs to match the enforced partition set.

Suggested fix
-                          <partition> is the AWS partition (aws, aws-cn, aws-us-gov, or aws-eusc),
+                          <partition> is the AWS partition (aws, aws-cn, or aws-us-gov),
@@
                         x-kubernetes-validations:
                         - message: 'privateZoneIAMRole must be a valid AWS IAM role
                             ARN in the format: arn:<partition>:iam::<account-id>:role/<role-name>'
                           rule: matches(self, '^arn:(aws|aws-cn|aws-us-gov):iam::[0-9]{12}:role/.*$')
-                        - message: 'privateZoneIAMRole must be a valid AWS IAM role
-                            ARN in the format: arn:<partition>:iam::<account-id>:role/<role-name>'
-                          rule: matches(self, '^arn:(aws|aws-cn|aws-us-gov|aws-eusc):iam::[0-9]{12}:role/.*$')

As per coding guidelines, validation constraints documented in comments must match enforced validation rules.

🤖 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_dnses-CustomNoUpgrade.crd.yaml`
around lines 76 - 87, The documentation for the privateZoneIAMRole field
mentions aws-eusc as a valid partition, but there are two conflicting CEL
validation rules: the first rule on line 84 excludes aws-eusc while the second
rule on line 87 includes it. Remove aws-eusc from the documentation comment
describing the partition values, and remove the duplicate validation rule on
line 87 entirely, keeping only the first validation rule that correctly excludes
aws-eusc. Ensure the documentation and the single remaining CEL rule in the
x-kubernetes-validations section are fully aligned on which partitions are
actually supported.

Source: Coding guidelines

payload-manifests/crds/0000_50_csi-driver_01_clustercsidrivers-TechPreviewNoUpgrade.crd.yaml (1)

129-141: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

TechPreview kmsKeyARN validation needs cleanup: stale aws-eusc doc + legacy rule remain.

Line 130 still advertises aws-eusc, while Line 138 removes it and Line 141 still keeps the old matcher. Please remove the legacy rule and make docs/rules consistent.

Suggested fix
-                          <partition> is the AWS partition (aws, aws-cn, aws-us-gov, aws-iso, aws-iso-b, aws-iso-e, aws-iso-f, or aws-eusc),
+                          <partition> is the AWS partition (aws, aws-cn, aws-us-gov, aws-iso, aws-iso-b, aws-iso-e, or aws-iso-f),
@@
                         x-kubernetes-validations:
                         - message: 'kmsKeyARN must be a valid AWS KMS key ARN in the
                             format: arn:<partition>:kms:<region>:<account-id>:(key|alias)/<key-id-or-alias>'
                           rule: matches(self, '^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b|aws-iso-e|aws-iso-f):kms:[a-z0-9-]+:[0-9]{12}:(key|alias)/.*$')
-                        - message: 'kmsKeyARN must be a valid AWS KMS key ARN in the
-                            format: arn:<partition>:kms:<region>:<account-id>:(key|alias)/<key-id-or-alias>'
-                          rule: matches(self, '^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b|aws-iso-e|aws-iso-f|aws-eusc):kms:[a-z0-9-]+:[0-9]{12}:(key|alias)/.*$')

As per coding guidelines, validation constraints documented in comments must match enforced validation rules.

🤖 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_50_csi-driver_01_clustercsidrivers-TechPreviewNoUpgrade.crd.yaml`
around lines 129 - 141, Remove the duplicate and outdated validation rule that
lacks aws-eusc support. Delete the first x-kubernetes-validations rule block
(lines 137-141) that contains the regex pattern without aws-eusc:
'^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b|aws-iso-e|aws-iso-f):kms:...'
Keep only the second x-kubernetes-validations rule block (lines 142-144) that
includes aws-eusc in its regex pattern:
'^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b|aws-iso-e|aws-iso-f|aws-eusc):kms:...'
This ensures the documentation comment mentioning aws-eusc on line 130 matches
the actual enforced validation rules.

Source: Coding guidelines

payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-CustomNoUpgrade.crd.yaml (1)

132-143: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Documentation does not match the validation rule.

The description at lines 132-133 lists aws-eusc as a valid partition value, but the new validation rule at line 140 only accepts aws, aws-cn, and aws-us-gov. This creates user-facing confusion where the documentation promises support that the validation rejects.

Additionally, there are now two validation rules for privateZoneIAMRole:

  • Lines 138-140: New stricter rule (excludes aws-eusc)
  • Lines 141-143: Existing permissive rule (includes aws-eusc)

Since x-kubernetes-validations rules use AND semantics (both must pass), the stricter rule effectively blocks aws-eusc, making the old permissive rule redundant. This appears to be a result of the manifest merge producing both rules, but the documentation should be updated to reflect the actual allowed values.

📝 Suggested documentation fix

The description at line 133 should be updated to match the stricter validation:

-                                  <partition> is the AWS partition (aws, aws-cn, aws-us-gov, or aws-eusc),
+                                  <partition> is the AWS partition (aws, aws-cn, or aws-us-gov),

Note: This change should be made in the source types.go file, then regenerated.

🤖 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_80_machine-config_01_controllerconfigs-CustomNoUpgrade.crd.yaml`
around lines 132 - 143, The documentation for the privateZoneIAMRole field lists
aws-eusc as a valid AWS partition, but the stricter validation rule only accepts
aws, aws-cn, and aws-us-gov. Since both validation rules use AND semantics, the
stricter rule effectively blocks aws-eusc. Update the description documentation
for privateZoneIAMRole in the source types.go file to remove aws-eusc from the
list of valid partitions and state only aws, aws-cn, and aws-us-gov as
supported, ensuring consistency with the actual validation constraints. Then
regenerate the CRD manifest files from the updated source so the documentation
in the generated YAML reflects the true allowed values.
payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-DevPreviewNoUpgrade.crd.yaml (1)

1379-1393: ⚠️ Potential issue | 🟠 Major

Conflicting vcenters validation rules in DevPreviewNoUpgrade variant.

The vcenters field has duplicate and conflicting validation rules in the DevPreviewNoUpgrade CRD (and CustomNoUpgrade/TechPreviewNoUpgrade variants):

  1. New restrictive rule (lines 1379-1382): "vcenters cannot be added or removed once set" — blocks any size changes after initial population
  2. Old permissive rules (lines 1383-1390): "Cannot add and remove vCenters at the same time" (two instances) — allow adding or removing vcenters individually if all old/new servers match

These rules conflict logically: the new rule prohibits size changes, while the old rules permit them under specific conditions. Since all validation rules must pass, the effective behavior is overly restrictive.

The Default and OKD variants do not have this issue—they only include the new restrictive rule plus the uniqueness check. The inconsistency suggests the old rules should have been removed when the new rule was added.

🤖 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_80_machine-config_01_controllerconfigs-DevPreviewNoUpgrade.crd.yaml`
around lines 1379 - 1393, Remove the two conflicting validation rules with the
message "Cannot add and remove vCenters at the same time" from the vcenters
field validation rules in the DevPreviewNoUpgrade CRD variant (and apply the
same fix to CustomNoUpgrade and TechPreviewNoUpgrade variants if they have the
same issue). Keep only the new restrictive rule that states "vcenters cannot be
added or removed once set" along with the uniqueness check "vcenters must have
unique server values", making these variants consistent with the Default and OKD
variants which only have these two rules without the conflicting permissive
rules.
🤖 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-TechPreviewNoUpgrade.crd.yaml`:
- Around line 1087-1089: The validation rule for vcenters at lines 1087-1089
creates a conflict between three parts of the schema: the description stating
TechPreview allows adding/removing vcenters (lines 1035-1038), the new
restrictive rule that only permits 0 to 1 vcenter transitions, and the
VSphereMultiVCenterDay2-gated rules (lines 1090-1095) designed to constrain how
vcenters can be modified. Choose one approach to resolve this: either update the
description to accurately reflect the stricter immutability behavior after the
first vcenter is set, or refactor the validation rule to be feature-gate-aware
so it only applies when VSphereMultiVCenterDay2 is disabled, allowing the gated
rules to handle size changes with their own constraints, or revise the rule
logic to permit size changes that are constrained by the downstream gated rules
rather than blocking all changes post-initialization.

In
`@payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-TechPreviewNoUpgrade.crd.yaml`:
- Around line 137-143: The privateZoneIAMRole field has duplicate
x-kubernetes-validations rules with identical messages but different regex
patterns in six CRD files. Remove the second validation rule (the one containing
`aws-eusc` in the partition pattern) from all affected files to eliminate
redundancy and match the single-rule pattern used in the stable variants. The
files requiring this fix are the CustomNoUpgrade, DevPreviewNoUpgrade, and
TechPreviewNoUpgrade variants of both the DNS and ControllerConfig CRDs, where
you should keep only the stricter rule that excludes `aws-eusc` from the
partition list.

---

Outside diff comments:
In
`@payload-manifests/crds/0000_10_config-operator_01_dnses-CustomNoUpgrade.crd.yaml`:
- Around line 76-87: The documentation for the privateZoneIAMRole field mentions
aws-eusc as a valid partition, but there are two conflicting CEL validation
rules: the first rule on line 84 excludes aws-eusc while the second rule on line
87 includes it. Remove aws-eusc from the documentation comment describing the
partition values, and remove the duplicate validation rule on line 87 entirely,
keeping only the first validation rule that correctly excludes aws-eusc. Ensure
the documentation and the single remaining CEL rule in the
x-kubernetes-validations section are fully aligned on which partitions are
actually supported.

In
`@payload-manifests/crds/0000_10_config-operator_01_dnses-DevPreviewNoUpgrade.crd.yaml`:
- Around line 76-87: The privateZoneIAMRole field has conflicting validation
rules in the x-kubernetes-validations list: the first rule on line 84 excludes
aws-eusc from the allowed partitions while the second rule on line 87 includes
it, yet the field description on line 76 advertises aws-eusc as a valid
partition. Remove the duplicate validation rule and keep only the one that
correctly includes aws-eusc (the second rule), ensuring the description and the
remaining validation rule are consistent with each other.

In
`@payload-manifests/crds/0000_10_config-operator_01_dnses-TechPreviewNoUpgrade.crd.yaml`:
- Around line 76-87: The privateZoneIAMRole field has duplicate and conflicting
validation rules in the x-kubernetes-validations section where one rule allows
aws-eusc partition and the other excludes it, and the description also lists
aws-eusc inconsistently. Remove one of the two duplicate validation rules
(either the rule matching aws|aws-cn|aws-us-gov or the rule matching
aws|aws-cn|aws-us-gov|aws-eusc) to eliminate the conflict, then update the
description text to match the partition list in the remaining validation rule to
ensure consistency between documentation and enforced constraints.

In
`@payload-manifests/crds/0000_50_csi-driver_01_clustercsidrivers-CustomNoUpgrade.crd.yaml`:
- Around line 129-141: The kmsKeyARN field has two duplicate
x-kubernetes-validations rules with conflicting regex patterns - the first rule
excludes aws-eusc partition while the second includes it, creating inconsistency
with the documentation that lists aws-eusc. Remove the first validation rule
(the one matching the pattern without aws-eusc) and keep only the second
validation rule that includes the aws-eusc partition. Ensure the description of
the field at the beginning of the spec matches the partitions listed in the kept
validation rule.

In
`@payload-manifests/crds/0000_50_csi-driver_01_clustercsidrivers-DevPreviewNoUpgrade.crd.yaml`:
- Around line 129-141: The kmsKeyARN field has duplicate and conflicting
x-kubernetes-validations rules in the CRD specification. One validation rule on
line 138 excludes the aws-eusc partition while another on line 141 includes it,
creating a contradiction. Consolidate these two validation rules into a single
x-kubernetes-validations entry that includes all the correct AWS partitions
(aws, aws-cn, aws-us-gov, aws-iso, aws-iso-b, aws-iso-e, aws-iso-f, and
aws-eusc), remove the duplicate conflicting rule, and update the description
text at the beginning of the kmsKeyARN field to accurately reflect the exact
list of supported AWS partitions to ensure consistency between the documentation
and the actual validation constraint.

In
`@payload-manifests/crds/0000_50_csi-driver_01_clustercsidrivers-TechPreviewNoUpgrade.crd.yaml`:
- Around line 129-141: Remove the duplicate and outdated validation rule that
lacks aws-eusc support. Delete the first x-kubernetes-validations rule block
(lines 137-141) that contains the regex pattern without aws-eusc:
'^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b|aws-iso-e|aws-iso-f):kms:...'
Keep only the second x-kubernetes-validations rule block (lines 142-144) that
includes aws-eusc in its regex pattern:
'^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b|aws-iso-e|aws-iso-f|aws-eusc):kms:...'
This ensures the documentation comment mentioning aws-eusc on line 130 matches
the actual enforced validation rules.

In
`@payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-CustomNoUpgrade.crd.yaml`:
- Around line 132-143: The documentation for the privateZoneIAMRole field lists
aws-eusc as a valid AWS partition, but the stricter validation rule only accepts
aws, aws-cn, and aws-us-gov. Since both validation rules use AND semantics, the
stricter rule effectively blocks aws-eusc. Update the description documentation
for privateZoneIAMRole in the source types.go file to remove aws-eusc from the
list of valid partitions and state only aws, aws-cn, and aws-us-gov as
supported, ensuring consistency with the actual validation constraints. Then
regenerate the CRD manifest files from the updated source so the documentation
in the generated YAML reflects the true allowed values.

In
`@payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-DevPreviewNoUpgrade.crd.yaml`:
- Around line 1379-1393: Remove the two conflicting validation rules with the
message "Cannot add and remove vCenters at the same time" from the vcenters
field validation rules in the DevPreviewNoUpgrade CRD variant (and apply the
same fix to CustomNoUpgrade and TechPreviewNoUpgrade variants if they have the
same issue). Keep only the new restrictive rule that states "vcenters cannot be
added or removed once set" along with the uniqueness check "vcenters must have
unique server values", making these variants consistent with the Default and OKD
variants which only have these two rules without the conflicting permissive
rules.
🪄 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: 26ffff9c-d1af-4604-9ae6-7e41a0d47d37

📥 Commits

Reviewing files that changed from the base of the PR and between 5346161 and e7d762d.

⛔ Files ignored due to path filters (16)
  • config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_dnses-CustomNoUpgrade.crd.yaml is excluded by !**/zz_generated.crd-manifests/*
  • config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_dnses-DevPreviewNoUpgrade.crd.yaml is excluded by !**/zz_generated.crd-manifests/*
  • config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_dnses-TechPreviewNoUpgrade.crd.yaml is excluded by !**/zz_generated.crd-manifests/*
  • config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-CustomNoUpgrade.crd.yaml is excluded by !**/zz_generated.crd-manifests/*
  • config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-Default.crd.yaml is excluded by !**/zz_generated.crd-manifests/*
  • config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-DevPreviewNoUpgrade.crd.yaml is excluded by !**/zz_generated.crd-manifests/*
  • config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-OKD.crd.yaml is excluded by !**/zz_generated.crd-manifests/*
  • config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-TechPreviewNoUpgrade.crd.yaml is excluded by !**/zz_generated.crd-manifests/*
  • machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_controllerconfigs-CustomNoUpgrade.crd.yaml is excluded by !**/zz_generated.crd-manifests/*
  • machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_controllerconfigs-Default.crd.yaml is excluded by !**/zz_generated.crd-manifests/*
  • machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_controllerconfigs-DevPreviewNoUpgrade.crd.yaml is excluded by !**/zz_generated.crd-manifests/*
  • machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_controllerconfigs-OKD.crd.yaml is excluded by !**/zz_generated.crd-manifests/*
  • machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_controllerconfigs-TechPreviewNoUpgrade.crd.yaml is excluded by !**/zz_generated.crd-manifests/*
  • operator/v1/zz_generated.crd-manifests/0000_50_csi-driver_01_clustercsidrivers-CustomNoUpgrade.crd.yaml is excluded by !**/zz_generated.crd-manifests/*
  • operator/v1/zz_generated.crd-manifests/0000_50_csi-driver_01_clustercsidrivers-DevPreviewNoUpgrade.crd.yaml is excluded by !**/zz_generated.crd-manifests/*
  • operator/v1/zz_generated.crd-manifests/0000_50_csi-driver_01_clustercsidrivers-TechPreviewNoUpgrade.crd.yaml is excluded by !**/zz_generated.crd-manifests/*
📒 Files selected for processing (17)
  • payload-manifests/crds/0000_10_config-operator_01_dnses-CustomNoUpgrade.crd.yaml
  • payload-manifests/crds/0000_10_config-operator_01_dnses-DevPreviewNoUpgrade.crd.yaml
  • payload-manifests/crds/0000_10_config-operator_01_dnses-TechPreviewNoUpgrade.crd.yaml
  • payload-manifests/crds/0000_10_config-operator_01_infrastructures-CustomNoUpgrade.crd.yaml
  • payload-manifests/crds/0000_10_config-operator_01_infrastructures-Default.crd.yaml
  • payload-manifests/crds/0000_10_config-operator_01_infrastructures-DevPreviewNoUpgrade.crd.yaml
  • payload-manifests/crds/0000_10_config-operator_01_infrastructures-OKD.crd.yaml
  • payload-manifests/crds/0000_10_config-operator_01_infrastructures-TechPreviewNoUpgrade.crd.yaml
  • payload-manifests/crds/0000_50_csi-driver_01_clustercsidrivers-CustomNoUpgrade.crd.yaml
  • payload-manifests/crds/0000_50_csi-driver_01_clustercsidrivers-DevPreviewNoUpgrade.crd.yaml
  • payload-manifests/crds/0000_50_csi-driver_01_clustercsidrivers-TechPreviewNoUpgrade.crd.yaml
  • payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-CustomNoUpgrade.crd.yaml
  • payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-Default.crd.yaml
  • payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-DevPreviewNoUpgrade.crd.yaml
  • payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-OKD.crd.yaml
  • payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-TechPreviewNoUpgrade.crd.yaml
  • tools/codegen/pkg/manifestmerge/crd-schema.json

Comment on lines +1087 to +1089
- message: vcenters cannot be added or removed once set
rule: 'size(self) != size(oldSelf) ? size(oldSelf) == 0
&& size(self) < 2 : true'

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | 🏗️ Heavy lift

Validation rule conflicts with TechPreview description and feature-gated rules.

The new validation rule forbids changing the vcenters list size except during initial population (size 0 to <2). However, this conflicts with:

  1. Description at lines 1035-1038: States "in TechPreview you are able to add and remove vCenters but may not remove all vCenters." This promises flexibility that the rule prevents.

  2. VSphereMultiVCenterDay2-gated rules (lines 1090-1095): These rules constrain how vcenters are added/removed (preventing simultaneous add/remove), but the new rule prevents size changes entirely, making the gated rules largely ineffective.

The rule logic size(oldSelf) == 0 && size(self) < 2 allows only the transition from 0 to 1 vcenter (given minItems: 1). This blocks subsequent additions (1→2, 1→3) and removals (2→1, 3→2) that the description and gated rules appear designed to support.

Either:

  • The description should be updated to reflect the new stricter behavior, or
  • The rule should be feature-gate-aware and not apply when VSphereMultiVCenterDay2 is enabled, or
  • The rule logic should be revised to allow size changes constrained by the gated rules
🤖 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-TechPreviewNoUpgrade.crd.yaml`
around lines 1087 - 1089, The validation rule for vcenters at lines 1087-1089
creates a conflict between three parts of the schema: the description stating
TechPreview allows adding/removing vcenters (lines 1035-1038), the new
restrictive rule that only permits 0 to 1 vcenter transitions, and the
VSphereMultiVCenterDay2-gated rules (lines 1090-1095) designed to constrain how
vcenters can be modified. Choose one approach to resolve this: either update the
description to accurately reflect the stricter immutability behavior after the
first vcenter is set, or refactor the validation rule to be feature-gate-aware
so it only applies when VSphereMultiVCenterDay2 is disabled, allowing the gated
rules to handle size changes with their own constraints, or revise the rule
logic to permit size changes that are constrained by the downstream gated rules
rather than blocking all changes post-initialization.

Comment on lines 137 to 143
x-kubernetes-validations:
- message: 'privateZoneIAMRole must be a valid AWS
IAM role ARN in the format: arn:<partition>:iam::<account-id>:role/<role-name>'
rule: matches(self, '^arn:(aws|aws-cn|aws-us-gov):iam::[0-9]{12}:role/.*$')
- message: 'privateZoneIAMRole must be a valid AWS
IAM role ARN in the format: arn:<partition>:iam::<account-id>:role/<role-name>'
rule: matches(self, '^arn:(aws|aws-cn|aws-us-gov|aws-eusc):iam::[0-9]{12}:role/.*$')

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check for duplicate privateZoneIAMRole validations across DNS and ControllerConfig CRDs

echo "=== Checking DNS CRDs ==="
for variant in CustomNoUpgrade DevPreviewNoUpgrade TechPreviewNoUpgrade; do
  echo "Variant: $variant"
  rg -A 2 'privateZoneIAMRole.*x-kubernetes-validations' \
    "payload-manifests/crds/0000_10_config-operator_01_dnses-${variant}.crd.yaml" | \
    rg 'rule.*matches.*arn'
done

echo -e "\n=== Checking ControllerConfig CRDs ==="
for variant in CustomNoUpgrade DevPreviewNoUpgrade TechPreviewNoUpgrade; do
  echo "Variant: $variant"
  rg -A 2 'privateZoneIAMRole.*x-kubernetes-validations' \
    "payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-${variant}.crd.yaml" | \
    rg 'rule.*matches.*arn'
done

Repository: openshift/api

Length of output: 291


🏁 Script executed:

#!/bin/bash

# First, check if the file exists
echo "=== Checking file existence ==="
ls -la "payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-TechPreviewNoUpgrade.crd.yaml" 2>&1 | head -5

# Check content around lines 137-143
echo -e "\n=== Content at lines 137-143 ==="
sed -n '137,143p' "payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-TechPreviewNoUpgrade.crd.yaml" 2>&1

# Search for privateZoneIAMRole field across all CRD files
echo -e "\n=== Searching for privateZoneIAMRole in CRD files ==="
find payload-manifests/crds -name "*.crd.yaml" -exec grep -l "privateZoneIAMRole" {} \; 2>&1

# Check context around privateZoneIAMRole in ControllerConfig CRDs
echo -e "\n=== Content around privateZoneIAMRole in ControllerConfig ==="
grep -n "privateZoneIAMRole" "payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-TechPreviewNoUpgrade.crd.yaml" 2>&1 | head -5

# Check if there are x-kubernetes-validations under privateZoneIAMRole
echo -e "\n=== Checking validation rules structure ==="
grep -A 10 "privateZoneIAMRole:" "payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-TechPreviewNoUpgrade.crd.yaml" 2>&1 | head -20

Repository: openshift/api

Length of output: 3184


🏁 Script executed:

#!/bin/bash

# Check all ControllerConfig variants for the privateZoneIAMRole validation rules
echo "=== ControllerConfig variants - privateZoneIAMRole validation rules ==="
for variant in Default OKD CustomNoUpgrade DevPreviewNoUpgrade TechPreviewNoUpgrade; do
  echo -e "\n--- Variant: $variant ---"
  file="payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-${variant}.crd.yaml"
  
  if [ -f "$file" ]; then
    # Find line number of privateZoneIAMRole and show context
    line_num=$(grep -n "privateZoneIAMRole:" "$file" | head -1 | cut -d: -f1)
    if [ -n "$line_num" ]; then
      # Show the validation rules (about 20 lines after the field name)
      sed -n "${line_num},$((line_num+25))p" "$file" | grep -E "(rule:|message:)" | head -10
    fi
  fi
done

# Also check DNS variants for comparison
echo -e "\n\n=== DNS variants - privateZoneIAMRole validation rules ==="
for variant in Default OKD CustomNoUpgrade DevPreviewNoUpgrade TechPreviewNoUpgrade; do
  echo -e "\n--- Variant: $variant ---"
  file="payload-manifests/crds/0000_10_config-operator_01_dnses-${variant}.crd.yaml"
  
  if [ -f "$file" ]; then
    # Find line number of privateZoneIAMRole and show context
    line_num=$(grep -n "privateZoneIAMRole:" "$file" | head -1 | cut -d: -f1)
    if [ -n "$line_num" ]; then
      # Show the validation rules (about 20 lines after the field name)
      sed -n "${line_num},$((line_num+25))p" "$file" | grep -E "(rule:|message:)" | head -10
    fi
  fi
done

Repository: openshift/api

Length of output: 3594


Remove duplicate x-kubernetes-validations rules for privateZoneIAMRole across multiple CRD variants.

Two validation rules are defined for the same field with identical messages but different regex patterns. While CEL AND-logic means the stricter rule (excluding aws-eusc) takes effect, having both rules is redundant and confusing.

This issue affects three variants across both DNS and ControllerConfig CRDs:

  • CustomNoUpgrade (2 files)
  • DevPreviewNoUpgrade (2 files)
  • TechPreviewNoUpgrade (2 files)

The stable variants (Default and OKD) correctly contain only a single rule excluding aws-eusc. All affected variants should match this pattern by removing the second rule that includes aws-eusc.

♻️ Affected files and fix location

Each file has duplicate rules at slightly different line numbers:

  • payload-manifests/crds/0000_10_config-operator_01_dnses-CustomNoUpgrade.crd.yaml
  • payload-manifests/crds/0000_10_config-operator_01_dnses-DevPreviewNoUpgrade.crd.yaml
  • payload-manifests/crds/0000_10_config-operator_01_dnses-TechPreviewNoUpgrade.crd.yaml
  • payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-CustomNoUpgrade.crd.yaml
  • payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-DevPreviewNoUpgrade.crd.yaml
  • payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-TechPreviewNoUpgrade.crd.yaml

Remove the second validation rule (the one including aws-eusc) from each file to match the single-rule pattern in stable variants.

🤖 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_80_machine-config_01_controllerconfigs-TechPreviewNoUpgrade.crd.yaml`
around lines 137 - 143, The privateZoneIAMRole field has duplicate
x-kubernetes-validations rules with identical messages but different regex
patterns in six CRD files. Remove the second validation rule (the one containing
`aws-eusc` in the partition pattern) from all affected files to eliminate
redundancy and match the single-rule pattern used in the stable variants. The
files requiring this fix are the CustomNoUpgrade, DevPreviewNoUpgrade, and
TechPreviewNoUpgrade variants of both the DNS and ControllerConfig CRDs, where
you should keep only the stricter rule that excludes `aws-eusc` from the
partition list.

@JoelSpeed

Copy link
Copy Markdown
Contributor Author

@tthvo @vr4manta can you please take a look at the integration test failures and let me know how you want me to resolve these?

It looks like some of the validations you added were not being correctly added, and therefore the tests are now broken now that the validations are kicking in

@openshift-ci

openshift-ci Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

@JoelSpeed: 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-client-go e7d762d link true /test verify-client-go
ci/prow/integration e7d762d link true /test integration

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Comment on lines +82 to 87
- message: 'privateZoneIAMRole must be a valid AWS IAM role
ARN in the format: arn:<partition>:iam::<account-id>:role/<role-name>'
rule: matches(self, '^arn:(aws|aws-cn|aws-us-gov):iam::[0-9]{12}:role/.*$')
- message: 'privateZoneIAMRole must be a valid AWS IAM role
ARN in the format: arn:<partition>:iam::<account-id>:role/<role-name>'
rule: matches(self, '^arn:(aws|aws-cn|aws-us-gov|aws-eusc):iam::[0-9]{12}:role/.*$')

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

AFAIK, the intention is that aws-eusc is only allowed behind gate. Thus, the partition regex is defined based on whether AWSEuropeanSovereignCloudInstall feature gate is enabled 👇

api/config/v1/types_dns.go

Lines 143 to 146 in 5346161

// +openshift:validation:FeatureGateAwareXValidation:featureGate="",rule=`matches(self, '^arn:(aws|aws-cn|aws-us-gov):iam::[0-9]{12}:role/.*$')`,message=`privateZoneIAMRole must be a valid AWS IAM role ARN in the format: arn:<partition>:iam::<account-id>:role/<role-name>`
// +openshift:validation:FeatureGateAwareXValidation:featureGate=AWSEuropeanSovereignCloudInstall,rule=`matches(self, '^arn:(aws|aws-cn|aws-us-gov|aws-eusc):iam::[0-9]{12}:role/.*$')`,message=`privateZoneIAMRole must be a valid AWS IAM role ARN in the format: arn:<partition>:iam::<account-id>:role/<role-name>`
// +optional
PrivateZoneIAMRole string `json:"privateZoneIAMRole"`

That is the 2 validation entries should be mutually exclusive (same KMS key ARN). I remember we discussed it in #2708 (comment) and #2770.

Any ideas how to achieve the same thing with the new tooling change here 🤔?

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

Labels

size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants