Skip to content

Add cluster profile for powervs-hcp#5260

Draft
shinde-smita wants to merge 2 commits into
openshift:mainfrom
shinde-smita:powervs-hcp
Draft

Add cluster profile for powervs-hcp#5260
shinde-smita wants to merge 2 commits into
openshift:mainfrom
shinde-smita:powervs-hcp

Conversation

@shinde-smita

@shinde-smita shinde-smita commented Jun 18, 2026

Copy link
Copy Markdown

Add cluster profile for powervs-hcp

**Changes:

Added ClusterProfilePOWERVSHCP constant with value "powervs-hcp"
Added profile to ClusterProfiles() function
Added quota slice case for powervs-hcp-quota-slice
Added powervs-hcp to LeaseTypeFromClusterType function

A detailed high-level summary could not be generated for this review. Here is an overview derived from the analyzed file changes:

  • pkg/api/clusterprofile.go: ## AI-generated summary of changes

@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

@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 18, 2026
@coderabbitai

coderabbitai Bot commented Jun 18, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: ca89be27-7cb1-43bd-829f-072f52338456

📥 Commits

Reviewing files that changed from the base of the PR and between d0daabe and b70b8d7.

📒 Files selected for processing (1)
  • pkg/api/clusterprofile.go
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • openshift/release (manual)
  • openshift/ci-docs (manual)
  • openshift/release-controller (manual)
  • openshift/ci-chat-bot (manual)

📝 Walkthrough

Walkthrough

Adds ClusterProfilePOWERVSHCP ("powervs-hcp") as a new exported constant in pkg/api/clusterprofile.go. It is registered in ClusterProfiles(), mapped to cluster type "powervs-hcp" in ClusterType(), mapped to lease type "powervs-hcp-quota-slice" in LeaseType(), and recognized in LeaseTypeFromClusterType().

Changes

PowerVS HCP Cluster Profile Registration

Layer / File(s) Summary
Constant declaration and full registration
pkg/api/clusterprofile.go
Declares ClusterProfilePOWERVSHCP = "powervs-hcp", adds it to ClusterProfiles(), returns "powervs-hcp" from ClusterType(), returns "powervs-hcp-quota-slice" from LeaseType(), and adds "powervs-hcp" to the accepted set in LeaseTypeFromClusterType().

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 17
✅ Passed checks (17 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change—adding a new cluster profile constant for powervs-hcp and its integration into the codebase.
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 PR adds cluster profile constant and mappings with no error handling code. No ignored errors, panics, improper error wrapping, or nil dereferences introduced.
Test Coverage For New Features ✅ Passed Existing test TestClusterProfilesConfig iterates through all ClusterProfiles() and calls ClusterType() and LeaseType() on each, automatically covering the new powervs-hcp constant without requiring...
Stable And Deterministic Test Names ✅ Passed PR only modifies pkg/api/clusterprofile.go, a configuration file with no Ginkgo tests added. Check is not applicable.
Test Structure And Quality ✅ Passed PR modifies only production code (pkg/api/clusterprofile.go) to add ClusterProfilePOWERVSHCP constant with supporting mappings. No Ginkgo test code changes present; check is not applicable.
Microshift Test Compatibility ✅ Passed No Ginkgo e2e tests are added in this PR. The changes only add a new cluster profile constant and register it in mapping functions—standard configuration code unrelated to test writing.
Single Node Openshift (Sno) Test Compatibility ✅ Passed PR adds cluster profile constant to pkg/api/clusterprofile.go—a non-test source file. No Ginkgo e2e tests (It, Describe, etc.) were added, so the SNO compatibility check does not apply.
Topology-Aware Scheduling Compatibility ✅ Passed PR adds only cluster profile constant and mapping functions (metadata) to pkg/api/clusterprofile.go. No deployment manifests, operator code, controllers, or scheduling constraints introduced.
Ote Binary Stdout Contract ✅ Passed PR adds cluster profile constant and updates functions; no process-level stdout writes detected. Const blocks execute at compile-time, case statements are silent data mappings.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed No Ginkgo e2e tests are added in this PR. The changes are limited to cluster profile configuration constants in pkg/api/clusterprofile.go, making the IPv6/disconnected network test compatibility ch...
No-Weak-Crypto ✅ Passed PR adds cluster profile constant with no cryptographic code. File contains only string constants and configuration mappings for cluster types and lease types.
Container-Privileges ✅ Passed PR only modifies Go API definitions in clusterprofile.go (constant and function mappings). No Kubernetes manifests, container configs, or security context settings present.
No-Sensitive-Data-In-Logs ✅ Passed PR contains only constant definitions and simple switch case mappings with no logging statements that could expose sensitive data like passwords, tokens, API keys, or PII.

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

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

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.

❤️ Share

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

@openshift-ci openshift-ci Bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jun 18, 2026
@openshift-ci

openshift-ci Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Hi @shinde-smita. Thanks for your PR.

I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@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: shinde-smita
Once this PR has been reviewed and has the lgtm label, please assign jmguzik 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

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

Labels

do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant