4.22 backport: add IBMCloudServiceTransitGateway and IBMCloudServicePowerVS to IBMCloudServiceName - #2961
Conversation
… support Staging Overrides in Openshift installer Signed-off-by: Natalia Jordan <natalia.jordan@ibm.com>
Signed-off-by: Natalia Jordan <natalia.jordan@ibm.com>
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited) Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
|
Hello @taliandre49! Some important instructions when contributing to openshift/api: |
|
[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 QodoBackport 4.22: add TransitGateway and PowerVS to IBMCloudServiceName enum
AI Description
Diagram
High-Level Assessment
Files changed (50)
|
Code Review by Qodo
1. PowerVSServiceEndpoint.Name enum undocumented
|
| // +required | ||
| // +kubebuilder:validation:Enum=CIS;COS;COSConfig;DNSServices;GlobalCatalog;GlobalSearch;GlobalTagging;HyperProtect;IAM;KeyProtect;Power;ResourceController;ResourceManager;VPC | ||
| // +kubebuilder:validation:Enum=CIS;COS;COSConfig;DNSServices;GlobalCatalog;GlobalSearch;GlobalTagging;HyperProtect;IAM;KeyProtect;Power;ResourceController;ResourceManager;VPC;TransitGateway | ||
| Name string `json:"name"` |
There was a problem hiding this comment.
1. powervsserviceendpoint.name enum undocumented 📜 Skill insight ✧ Quality
The updated +kubebuilder:validation:Enum=... on PowerVSServiceEndpoint.Name lacks field-level documentation that lists and explains each allowed enum value. This makes the API harder to use correctly and violates the requirement that enum values be documented with their meanings.
Agent Prompt
## Issue description
`PowerVSServiceEndpoint.Name` has a `+kubebuilder:validation:Enum=...` marker (updated in this PR) but the field’s doc comment does not list every allowed enum value and explain what each means.
## Issue Context
Compliance requires that enum-constrained API fields be documented at the field comment level (not only via the marker) with an explanation for each value.
## Fix Focus Areas
- config/v1/types_infrastructure.go[1911-1919]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| - -AWSClusterHostedDNS | ||
| - -VSphereMultiVCenterDay2 |
There was a problem hiding this comment.
2. Wrong feature gates filtered 🐞 Bug ☼ Reliability
The Infrastructure ungated test suite now disables "AWSClusterHostedDNS" (and "VSphereMultiVCenterDay2") instead of disabling the schema’s actual gate "AWSClusterHostedDNSInstall", so CRD-variant selection can skip the wrong manifests and fail to exclude the gated AWS schema variants. This can reduce or distort CI schema coverage and cause redundant test runs against unexpected CRD variants.
Agent Prompt
### Issue description
`config/v1/tests/infrastructures.config.openshift.io/AAA_ungated.yaml` was changed to disable `AWSClusterHostedDNS` and `VSphereMultiVCenterDay2`, but the Infrastructure CRD’s AWS hosted-DNS schema is gated by `AWSClusterHostedDNSInstall`. The test harness uses `featureGates` (including `-<gate>` for required-disabled gates) to decide which generated CRD manifests each suite runs against; using the wrong gate means the ungated suite can be applied to the wrong CRD variants and/or skip variants it should still test.
### Issue Context
- The AWS hosted DNS-related field `CloudLoadBalancerConfig` is gated by `AWSClusterHostedDNSInstall` in the Infrastructure types.
- The test suite `featureGates` list drives CRD selection, and `-` prefixes mean “must be disabled”.
### Fix Focus Areas
- config/v1/tests/infrastructures.config.openshift.io/AAA_ungated.yaml[4-7]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
|
@taliandre49: The following tests 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. |
Add TransitGateway and PowerVS to the IBMCloudServiceName enum so that users can override the IBM Cloud Transit Gateway and Power Virtual Server service endpoints via serviceEndpoints in the install-config (needed for Staging OpenShift install).
Both services are already supported by the IBM Cloud CAPI provider (sigs.k8s.io/cluster-api-provider-ibmcloud) which accepts transitgateway and powervs as valid service IDs in its --service-endpoint flag. The installer translates IBMCloudServiceName values to CAPI's internal service IDs in GetRegionAndEndpointsFlag(). Until these constants exist in openshift/api, the installer is forced to match against raw string literals with a workaround comment — this PR removes that need.
Changes:
Add ;TransitGateway;PowerVS to the +kubebuilder:validation:Enum marker on IBMCloudServiceName
Add IBMCloudServiceTransitGateway and IBMCloudServicePowerVS constants