Skip to content

Add GCD cluster profile#5261

Open
rochacbruno wants to merge 1 commit into
openshift:mainfrom
rochacbruno:CORS-4508/add-gcd-cluster-profile
Open

Add GCD cluster profile#5261
rochacbruno wants to merge 1 commit into
openshift:mainfrom
rochacbruno:CORS-4508/add-gcd-cluster-profile

Conversation

@rochacbruno

@rochacbruno rochacbruno commented Jun 18, 2026

Copy link
Copy Markdown
Member

Summary

  • Register ClusterProfileGCD ("gcd") for Google Cloud Dedicated
  • Maps to cluster type "gcp" (reuses existing GCP cloud type)
  • Lease type: "gcd-quota-slice"
  • Added to LeaseTypeFromClusterType for template-based test compatibility

Context

This is part of CORS-4508: setting up Workload Identity Federation authentication for the OpenShift installer on Google Cloud Dedicated (Berlin environment).

The corresponding openshift/release PR will add the cluster profile config, Boskos quota slices, secret bootstrap entry, and installer CI job configuration.

Generated with Claude Code

Summary

This PR adds support for Google Cloud Dedicated (GCD) cluster infrastructure to the OpenShift CI tooling. The changes introduce a new cluster profile gcd that maps to the existing GCP cloud provider implementation, allowing CI jobs to target GCD clusters without duplicating provider logic.

Changes

pkg/api/clusterprofile.go:

  • Added a new ClusterProfileGCD constant with value "gcd" to register the GCD cluster profile
  • Included the new profile in the ClusterProfiles() enumeration function
  • Mapped the profile to use the same GCP cloud type (CloudGCP) as other GCP-based profiles
  • Associated a gcd-quota-slice lease type with the profile
  • Updated the LeaseTypeFromClusterType() mapping to recognize the "gcd" cluster type and resolve it to the corresponding gcd-quota-slice lease type

Impact

This enables the CI infrastructure to provision and manage test clusters on Google Cloud Dedicated infrastructure. The new cluster profile reuses the existing GCP cloud provider implementation while establishing a distinct identity for GCD resources. This is part of implementing Workload Identity Federation authentication for the OpenShift installer on GCD, specifically targeting the Berlin environment (CORS-4508).

Corresponding configuration is being added to the openshift/release repository, including cluster profile configuration, Boskos quota slice definitions, secret bootstrap entries, and CI job configuration.

Register the "gcd" cluster profile for testing OpenShift installations
on Google Cloud Dedicated. Maps to the "gcp" cluster type and uses
"gcd-quota-slice" for lease management.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@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: automatic mode

@coderabbitai

coderabbitai Bot commented Jun 18, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

Adds a new exported constant ClusterProfileGCD = "gcd" to pkg/api/clusterprofile.go and wires it into four places: the ClusterProfiles() enumeration slice, the ClusterType() switch (mapping to CloudGCP), the LeaseType() switch (returning "gcd-quota-slice"), and the LeaseTypeFromClusterType accepted-type set.

Changes

GCD Cluster Profile Registration

Layer / File(s) Summary
ClusterProfileGCD constant and full wiring
pkg/api/clusterprofile.go
Declares ClusterProfileGCD ClusterProfile = "gcd", includes it in ClusterProfiles(), maps it to CloudGCP in ClusterType(), returns "gcd-quota-slice" from LeaseType(), and adds "gcd" to the accepted set in LeaseTypeFromClusterType.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

🚥 Pre-merge checks | ✅ 17
✅ Passed checks (17 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding a new GCD cluster profile constant and wiring it through the profile enumeration logic.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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.
Go Error Handling ✅ Passed The changes add a new cluster profile constant and update switch-case mappings with no error-returning function calls, pointer dereferences, or error ignoring patterns.
Test Coverage For New Features ✅ Passed This is a configuration-only change adding a new cluster profile constant and wiring it through existing enumeration/mapping logic without introducing new functions or methods. It falls under the e...
Stable And Deterministic Test Names ✅ Passed PR only adds cluster profile constant and configuration mappings in clusterprofile.go; no Ginkgo test definitions are added or modified, so the test name stability check does not apply.
Test Structure And Quality ✅ Passed PR contains no Ginkgo test code changes—only cluster profile constant definitions and mapping logic in clusterprofile.go, making test structure review inapplicable.
Microshift Test Compatibility ✅ Passed PR adds cluster profile configuration only; no new Ginkgo e2e tests are added, making the MicroShift test compatibility check inapplicable.
Single Node Openshift (Sno) Test Compatibility ✅ Passed The custom check applies only to new Ginkgo e2e tests. This PR adds only a ClusterProfileGCD constant and mapping logic with no tests, so the check is not applicable.
Topology-Aware Scheduling Compatibility ✅ Passed PR only adds a cluster profile constant and enumeration mappings to pkg/api/clusterprofile.go; does not introduce deployment manifests, operator code, controllers, or any scheduling constraints.
Ote Binary Stdout Contract ✅ Passed PR adds only constant and switch statement mappings with no process-level code or stdout writes that could violate OTE binary stdout contract.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed PR adds only a cluster profile constant and API mappings in clusterprofile.go; no Ginkgo e2e tests are added, so the IPv6/disconnected compatibility check does not apply.
No-Weak-Crypto ✅ Passed PR adds cluster profile configuration mapping only; no cryptographic operations, algorithms, or secret comparisons are introduced.
Container-Privileges ✅ Passed PR only modifies pkg/api/clusterprofile.go with Go constant and mapping logic; no container/K8s manifests present to violate privilege security policies.
No-Sensitive-Data-In-Logs ✅ Passed PR adds cluster profile constants and mapping logic with no logging statements or exposed sensitive data like passwords, tokens, API keys, or PII.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ 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 requested review from droslean and smg247 June 18, 2026 14:08
@openshift-ci

openshift-ci Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: rochacbruno
Once this PR has been reviewed and has the lgtm label, please assign pruan-rht 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

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test e2e

@openshift-ci

openshift-ci Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

@rochacbruno: The following test 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/e2e a3f44ae link true /test e2e

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.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant