CORS-4417: Add UniverseDomain field to GCPPlatformStatus - #2963
CORS-4417: Add UniverseDomain field to GCPPlatformStatus#2963rochacbruno wants to merge 2 commits into
Conversation
Adds a universeDomain field to GCPPlatformStatus, gated behind the GCPSovereignCloudInstall feature gate. This field reports the GCP universe domain for the cluster as detected from installer credentials, enabling components without their own GCP credentials to determine the correct universe domain to use. The field validates as a DNS subdomain (RFC 1123) with a maximum length of 253 characters. When omitted, standard public GCP (googleapis.com) is assumed. Supersedes openshift#2933 (rebased to resolve conflicts, original author on PTO). Co-Authored-By: Brent Barbachem <barbacbd@gmail.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
@rochacbruno: This pull request references CORS-4417 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. DetailsIn response to this:
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. |
|
Hello @rochacbruno! Some important instructions when contributing to openshift/api: |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited) Review profile: CHILL Plan: Enterprise Run ID: ⛔ Files ignored due to path filters (13)
📒 Files selected for processing (11)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughAdds the feature-gated Suggested reviewers: 🚥 Pre-merge checks | ✅ 14 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (14 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
PR Summary by QodoAdd universeDomain to GCPPlatformStatus (feature-gated)
AI Description
Diagram
High-Level Assessment
Files changed (26)
|
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
machineconfiguration/v1/tests/controllerconfigs.machineconfiguration.openshift.io/GCPSovereignCloudInstall.yaml (1)
1-105: 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick winMissing
universeDomaincoverage for ControllerConfig.Only a minimal onCreate test is present. The PR states this layer covers "valid domains, propagation, and invalid domain rejection" for ControllerConfig too, but no onUpdate test here sets
infra.status.platformStatus.gcp.universeDomain(valid or invalid), unlike the parallelconfig/v1/tests/infrastructures.config.openshift.io/GCPSovereignCloudInstall.yamlfile. Since the same DNS1123Subdomain CEL rule is duplicated into the embeddedinfraschema here, this path should be exercised with its own update/rejection tests.🤖 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 `@machineconfiguration/v1/tests/controllerconfigs.machineconfiguration.openshift.io/GCPSovereignCloudInstall.yaml` around lines 1 - 105, Add onUpdate coverage to the GCPSovereignCloudInstall ControllerConfig test configuration for infra.status.platformStatus.gcp.universeDomain. Include a valid DNS1123Subdomain case asserting the value is preserved, and an invalid-domain case asserting the update is rejected, matching the corresponding Infrastructure tests and exercising the embedded infra schema validation.
🧹 Nitpick comments (1)
config/v1/tests/infrastructures.config.openshift.io/GCPSovereignCloudInstall.yaml (1)
105-191: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winConsider adding boundary tests for
maxLength/minLength.Uppercase, spaces, and leading-hyphen cases are covered, but the 253-character
maxLengthand 1-characterminLengthboundaries introduced by this schema aren't exercised (e.g. a 254-char domain or an empty string).🤖 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/tests/infrastructures.config.openshift.io/GCPSovereignCloudInstall.yaml` around lines 105 - 191, Extend the GCP universeDomain validation cases in the infrastructure test suite to cover schema length boundaries: add an invalid value exceeding the 253-character maxLength and an invalid empty value below the 1-character minLength, each expecting the existing “universeDomain must be a valid DNS subdomain” status error.
🤖 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.
Outside diff comments:
In
`@machineconfiguration/v1/tests/controllerconfigs.machineconfiguration.openshift.io/GCPSovereignCloudInstall.yaml`:
- Around line 1-105: Add onUpdate coverage to the GCPSovereignCloudInstall
ControllerConfig test configuration for
infra.status.platformStatus.gcp.universeDomain. Include a valid DNS1123Subdomain
case asserting the value is preserved, and an invalid-domain case asserting the
update is rejected, matching the corresponding Infrastructure tests and
exercising the embedded infra schema validation.
---
Nitpick comments:
In
`@config/v1/tests/infrastructures.config.openshift.io/GCPSovereignCloudInstall.yaml`:
- Around line 105-191: Extend the GCP universeDomain validation cases in the
infrastructure test suite to cover schema length boundaries: add an invalid
value exceeding the 253-character maxLength and an invalid empty value below the
1-character minLength, each expecting the existing “universeDomain must be a
valid DNS subdomain” status error.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: 20a279bc-6f5b-48f6-b85d-f25c51142388
⛔ Files ignored due to path filters (15)
config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-Hypershift-CustomNoUpgrade.crd.yamlis excluded by!**/zz_generated.crd-manifests/*config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-Hypershift-DevPreviewNoUpgrade.crd.yamlis excluded by!**/zz_generated.crd-manifests/*config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-SelfManagedHA-CustomNoUpgrade.crd.yamlis excluded by!**/zz_generated.crd-manifests/*config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-SelfManagedHA-DevPreviewNoUpgrade.crd.yamlis excluded by!**/zz_generated.crd-manifests/*config/v1/zz_generated.featuregated-crd-manifests.yamlis excluded by!**/zz_generated*config/v1/zz_generated.featuregated-crd-manifests/infrastructures.config.openshift.io/GCPSovereignCloudInstall.yamlis excluded by!**/zz_generated.featuregated-crd-manifests/**config/v1/zz_generated.swagger_doc_generated.gois excluded by!**/zz_generated*machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_controllerconfigs-Hypershift-CustomNoUpgrade.crd.yamlis excluded by!**/zz_generated.crd-manifests/*machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_controllerconfigs-Hypershift-DevPreviewNoUpgrade.crd.yamlis excluded by!**/zz_generated.crd-manifests/*machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_controllerconfigs-SelfManagedHA-CustomNoUpgrade.crd.yamlis excluded by!**/zz_generated.crd-manifests/*machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_controllerconfigs-SelfManagedHA-DevPreviewNoUpgrade.crd.yamlis excluded by!**/zz_generated.crd-manifests/*machineconfiguration/v1/zz_generated.featuregated-crd-manifests.yamlis excluded by!**/zz_generated*machineconfiguration/v1/zz_generated.featuregated-crd-manifests/controllerconfigs.machineconfiguration.openshift.io/GCPSovereignCloudInstall.yamlis excluded by!**/zz_generated.featuregated-crd-manifests/**openapi/generated_openapi/zz_generated.openapi.gois excluded by!openapi/**,!**/zz_generated*openapi/openapi.jsonis excluded by!openapi/**
📒 Files selected for processing (11)
config/v1/tests/infrastructures.config.openshift.io/GCPSovereignCloudInstall.yamlconfig/v1/types_infrastructure.gomachineconfiguration/v1/tests/controllerconfigs.machineconfiguration.openshift.io/GCPSovereignCloudInstall.yamlpayload-manifests/crds/0000_10_config-operator_01_infrastructures-Hypershift-CustomNoUpgrade.crd.yamlpayload-manifests/crds/0000_10_config-operator_01_infrastructures-Hypershift-DevPreviewNoUpgrade.crd.yamlpayload-manifests/crds/0000_10_config-operator_01_infrastructures-SelfManagedHA-CustomNoUpgrade.crd.yamlpayload-manifests/crds/0000_10_config-operator_01_infrastructures-SelfManagedHA-DevPreviewNoUpgrade.crd.yamlpayload-manifests/crds/0000_80_machine-config_01_controllerconfigs-Hypershift-CustomNoUpgrade.crd.yamlpayload-manifests/crds/0000_80_machine-config_01_controllerconfigs-Hypershift-DevPreviewNoUpgrade.crd.yamlpayload-manifests/crds/0000_80_machine-config_01_controllerconfigs-SelfManagedHA-CustomNoUpgrade.crd.yamlpayload-manifests/crds/0000_80_machine-config_01_controllerconfigs-SelfManagedHA-DevPreviewNoUpgrade.crd.yaml
Code Review by Qodo
1.
|
- Document MinLength=1 constraint in universeDomain field comment - Add boundary tests for empty string and >253 char domains - Add onUpdate tests for ControllerConfig (valid and invalid universeDomain) - Regenerate CRD manifests, swagger docs, and OpenAPI Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@JoelSpeed This is the follow up to Brent's #2933 since Brent's on PTO and it needed a rebase. PTAL |
|
@rochacbruno: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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. |
Summary
universeDomainfield toGCPPlatformStatus, gated behind theGCPSovereignCloudInstallfeature gategoogleapis.com) is assumedSupersedes #2933 - rebased to resolve conflicts (original author @barbacbd on PTO).
Test plan
make update- all generated files regenerated cleanlymake verify- all verification checks pass (codegen, lint, prerelease lifecycle)make -C config/v1 test- 3101 integration tests passed, 0 failedgoogleapis.com,s3nsapis.fr), invalid domains (uppercase, spaces, leading hyphen)cc @barbacbd @patrickdillon