Skip to content

Conversation

@zhiweiyin318
Copy link
Member

@zhiweiyin318 zhiweiyin318 commented Nov 3, 2025

Summary

Related issue(s)

Fixes #

Summary by CodeRabbit

  • New Features

    • Added optional server configuration for ClusterManager so users can specify HTTP/gRPC endpoint exposure and related settings when needed.
  • Documentation

    • Added commented example configuration blocks illustrating registration driver and grpc endpoint options in the default values.
  • Tests

    • Added test coverage for GRPC configuration scenarios to validate server configuration behavior.

@openshift-ci openshift-ci bot requested review from xuezhaojun and zhujian7 November 3, 2025 01:12
@coderabbitai
Copy link

coderabbitai bot commented Nov 3, 2025

Walkthrough

Adds an optional serverConfiguration field to the ClusterManager Helm template and values, exposes a matching Go struct field in ClusterManagerConfig, and adds a test case validating GRPC registration driver with endpoints exposure.

Changes

Cohort / File(s) Summary
Helm chart template & values
deploy/cluster-manager/chart/cluster-manager/templates/cluster_manager.yaml, deploy/cluster-manager/chart/cluster-manager/values.yaml
Conditional rendering of serverConfiguration under ClusterManager.spec when .Values.clusterManager.serverConfiguration is defined; values.yaml adds commented example blocks for registrationDrivers and serverConfiguration.endpointsExposure.grpc.
Go struct
pkg/operator/helpers/chart/config.go
Adds exported field ServerConfiguration operatorv1.ServerConfiguration json:"serverConfiguration,omitempty"toClusterManagerConfig`.
Tests
pkg/operator/helpers/chart/render_test.go
Adds test case ("enable grpc") that configures a GRPC registration driver and endpoint exposure; extends assertions to require non-empty ServerConfiguration.EndpointsExposure when GRPCAuthType is present.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Verify JSON tag and placement of ServerConfiguration in ClusterManagerConfig for serialization behavior.
  • Confirm Helm conditional uses correct value path and toYaml indentation to avoid malformed YAML.
  • Review the new test to ensure it correctly exercises and asserts the intended behavior (object count and ServerConfiguration presence).

Suggested labels

lgtm, approved

Suggested reviewers

  • xuezhaojun
  • qiujian16

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The pull request description is largely incomplete and fails to provide meaningful content. While the required template structure is present with "Summary" and "Related issue(s)" sections, both sections are empty or only partially filled. The Summary section contains no explanation of the changes, their purpose, or their impact. The Related issue(s) section only shows the template placeholder "Fixes #" without an actual issue number. This lacks the substantive information needed to understand the motivation and context for the server configuration changes being introduced. Please complete the pull request description by filling in the Summary section with details about what server configuration is being added to the ClusterManager helm chart, the purpose of these changes, and any relevant implementation notes. Additionally, complete the Related issue(s) section by either providing a specific issue number (e.g., "Fixes #1234") if this addresses a particular issue, or removing that line if no issue is associated with this change.
✅ Passed checks (1 passed)
Check name Status Explanation
Title Check ✅ Passed The pull request title ":seedling: Add server configuration for clusterManager helm chart" accurately and concisely describes the main change across all modified files. The changeset adds a serverConfiguration block to the ClusterManager helm chart template, extends the configuration struct with a ServerConfiguration field, updates the values file with optional server configuration examples, and adds corresponding tests. The title is specific, clear, and directly related to the primary objective without being vague or misleading.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1384645 and ca12ae8.

📒 Files selected for processing (4)
  • deploy/cluster-manager/chart/cluster-manager/templates/cluster_manager.yaml (1 hunks)
  • deploy/cluster-manager/chart/cluster-manager/values.yaml (1 hunks)
  • pkg/operator/helpers/chart/config.go (1 hunks)
  • pkg/operator/helpers/chart/render_test.go (2 hunks)
🧰 Additional context used
🧠 Learnings (12)
📓 Common learnings
Learnt from: skeeey
Repo: open-cluster-management-io/ocm PR: 1086
File: test/integration/util/grpc.go:146-146
Timestamp: 2025-07-23T10:10:42.066Z
Learning: In OCM codebase, there are two different GRPCServerOptions types: the local one in pkg/server/grpc/options.go (which only has GRPCServerConfig field) and the SDK one from open-cluster-management.io/sdk-go/pkg/cloudevents/server/grpc/options (which has ServerBindPort and other fields with default values). Test code uses the SDK version via grpcoptions import alias.
📚 Learning: 2025-08-28T01:58:05.882Z
Learnt from: skeeey
Repo: open-cluster-management-io/ocm PR: 1146
File: deploy/cluster-manager/chart/cluster-manager/crds/0000_01_operator.open-cluster-management.io_clustermanagers.crd.yaml:128-135
Timestamp: 2025-08-28T01:58:05.882Z
Learning: Files in deploy/cluster-manager/chart/cluster-manager/crds/ and similar CRD directories are often copied from vendor/upstream sources and should not be modified directly to avoid conflicts during updates.

Applied to files:

  • deploy/cluster-manager/chart/cluster-manager/values.yaml
📚 Learning: 2025-08-28T01:58:37.933Z
Learnt from: skeeey
Repo: open-cluster-management-io/ocm PR: 1146
File: deploy/cluster-manager/chart/cluster-manager/crds/0000_01_operator.open-cluster-management.io_clustermanagers.crd.yaml:247-280
Timestamp: 2025-08-28T01:58:37.933Z
Learning: CRD files in deploy/cluster-manager/chart/cluster-manager/crds/ directory are copied from vendor and should not be modified locally as changes may be overwritten during vendor updates.

Applied to files:

  • deploy/cluster-manager/chart/cluster-manager/values.yaml
📚 Learning: 2025-08-28T01:58:23.958Z
Learnt from: skeeey
Repo: open-cluster-management-io/ocm PR: 1146
File: deploy/cluster-manager/chart/cluster-manager/crds/0000_01_operator.open-cluster-management.io_clustermanagers.crd.yaml:192-225
Timestamp: 2025-08-28T01:58:23.958Z
Learning: CRD files in deploy/cluster-manager/chart/cluster-manager/crds/ and deploy/cluster-manager/config/crds/ directories are copied from vendor (open-cluster-management.io/api dependency) and should not be modified locally.

Applied to files:

  • deploy/cluster-manager/chart/cluster-manager/values.yaml
📚 Learning: 2025-08-28T04:09:12.357Z
Learnt from: skeeey
Repo: open-cluster-management-io/ocm PR: 1146
File: deploy/cluster-manager/chart/cluster-manager/crds/0000_01_operator.open-cluster-management.io_clustermanagers.crd.yaml:94-176
Timestamp: 2025-08-28T04:09:12.357Z
Learning: CRD files in deploy/cluster-manager/chart/cluster-manager/crds/ directory are copied from vendor/upstream sources and should not be modified directly.

Applied to files:

  • deploy/cluster-manager/chart/cluster-manager/values.yaml
📚 Learning: 2025-08-28T01:59:04.611Z
Learnt from: skeeey
Repo: open-cluster-management-io/ocm PR: 1146
File: deploy/cluster-manager/olm-catalog/latest/manifests/operator.open-cluster-management.io_clustermanagers.yaml:94-176
Timestamp: 2025-08-28T01:59:04.611Z
Learning: The file deploy/cluster-manager/olm-catalog/latest/manifests/operator.open-cluster-management.io_clustermanagers.yaml is copied from vendor and should not be modified directly as changes would be overwritten during vendor updates.

Applied to files:

  • deploy/cluster-manager/chart/cluster-manager/values.yaml
📚 Learning: 2025-08-28T02:00:03.385Z
Learnt from: skeeey
Repo: open-cluster-management-io/ocm PR: 1146
File: deploy/klusterlet/chart/klusterlet/crds/0000_00_operator.open-cluster-management.io_klusterlets.crd.yaml:278-280
Timestamp: 2025-08-28T02:00:03.385Z
Learning: CRD files in deploy/klusterlet/chart/klusterlet/crds/ and similar directories are copied from vendor code and should not be modified locally. Grammar or other issues in these files should be reported upstream to the vendor instead.

Applied to files:

  • deploy/cluster-manager/chart/cluster-manager/values.yaml
📚 Learning: 2025-08-04T08:58:41.865Z
Learnt from: skeeey
Repo: open-cluster-management-io/ocm PR: 1107
File: manifests/klusterlet/management/klusterlet-registration-deployment.yaml:111-115
Timestamp: 2025-08-04T08:58:41.865Z
Learning: In OCM klusterlet deployments, gRPC authentication uses different file naming conventions than CSR/kube authentication: gRPC auth expects config.yaml files (/spoke/bootstrap/config.yaml and /spoke/hub-kubeconfig/config.yaml) while CSR/kube auth uses kubeconfig files. The gRPC driver explicitly creates config.yaml files in the secret data via additionalSecretData["config.yaml"] = d.configTemplate.

Applied to files:

  • deploy/cluster-manager/chart/cluster-manager/values.yaml
  • pkg/operator/helpers/chart/render_test.go
📚 Learning: 2025-09-24T00:18:33.339Z
Learnt from: zhiweiyin318
Repo: open-cluster-management-io/ocm PR: 1194
File: deploy/klusterlet/chart/klusterlet/templates/bootstrap_kubeconfig_secret.yaml:25-27
Timestamp: 2025-09-24T00:18:33.339Z
Learning: gRPC config in OCM klusterlet bootstrap secrets does not support multiHubBootstrapHubKubeConfigs scenarios - it is intentionally designed only for single hub bootstrap configurations.

Applied to files:

  • deploy/cluster-manager/chart/cluster-manager/values.yaml
📚 Learning: 2025-07-25T01:21:08.891Z
Learnt from: skeeey
Repo: open-cluster-management-io/ocm PR: 1077
File: test/integration/registration/spokecluster_grpc_test.go:0-0
Timestamp: 2025-07-25T01:21:08.891Z
Learning: In OCM integration tests, gRPC and kube authentication mechanisms require different CSR handling approaches: gRPC authentication uses util.ApproveCSR since the hub controller signs client certificates, while kube authentication uses authn.ApproveSpokeClusterCSR to simulate the kube-controller-manager signing client certificates.

Applied to files:

  • deploy/cluster-manager/chart/cluster-manager/values.yaml
  • pkg/operator/helpers/chart/render_test.go
📚 Learning: 2025-07-23T10:10:42.066Z
Learnt from: skeeey
Repo: open-cluster-management-io/ocm PR: 1086
File: test/integration/util/grpc.go:146-146
Timestamp: 2025-07-23T10:10:42.066Z
Learning: In OCM codebase, there are two different GRPCServerOptions types: the local one in pkg/server/grpc/options.go (which only has GRPCServerConfig field) and the SDK one from open-cluster-management.io/sdk-go/pkg/cloudevents/server/grpc/options (which has ServerBindPort and other fields with default values). Test code uses the SDK version via grpcoptions import alias.

Applied to files:

  • deploy/cluster-manager/chart/cluster-manager/values.yaml
  • pkg/operator/helpers/chart/render_test.go
📚 Learning: 2025-08-06T06:00:53.508Z
Learnt from: skeeey
Repo: open-cluster-management-io/ocm PR: 1107
File: deploy/cluster-manager/config/rbac/cluster_role.yaml:165-168
Timestamp: 2025-08-06T06:00:53.508Z
Learning: In OCM gRPC deployments, both the cluster-manager operator ClusterRole and the gRPC server ClusterRole need "create" permission on "managedclustersets/join" resources for proper bootstrapping of managed clusters.

Applied to files:

  • deploy/cluster-manager/chart/cluster-manager/values.yaml
🧬 Code graph analysis (2)
pkg/operator/helpers/chart/config.go (1)
vendor/open-cluster-management.io/api/operator/v1/types_clustermanager.go (1)
  • ServerConfiguration (166-176)
pkg/operator/helpers/chart/render_test.go (4)
pkg/operator/helpers/chart/config.go (1)
  • ClusterManagerChartConfig (9-36)
pkg/operator/helpers/chart/render.go (1)
  • NewDefaultClusterManagerChartConfig (25-33)
vendor/open-cluster-management.io/api/operator/v1/types_klusterlet.go (1)
  • RegistrationConfiguration (133-189)
vendor/open-cluster-management.io/api/operator/v1/types_clustermanager.go (6)
  • RegistrationDriverHub (144-164)
  • GRPCRegistrationConfig (254-258)
  • ServerConfiguration (166-176)
  • EndpointExposure (178-195)
  • HostnameConfig (212-220)
  • GRPCAuthType (131-131)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
  • GitHub Check: e2e
  • GitHub Check: e2e-hosted
  • GitHub Check: e2e-singleton
  • GitHub Check: unit
  • GitHub Check: integration
  • GitHub Check: build
  • GitHub Check: verify
🔇 Additional comments (4)
pkg/operator/helpers/chart/config.go (1)

144-147: LGTM! Clean field addition.

The ServerConfiguration field is properly typed, has appropriate JSON tags with omitempty, and includes a descriptive comment. The placement after AddOnManagerConfiguration is logical and maintains consistency with the struct organization.

pkg/operator/helpers/chart/render_test.go (1)

235-242: LGTM! Good validation logic.

The assertion correctly validates that when a GRPC authentication driver is configured, the corresponding ServerConfiguration.EndpointsExposure must also be populated. This helps prevent incomplete GRPC configurations.

deploy/cluster-manager/chart/cluster-manager/templates/cluster_manager.yaml (1)

44-47: LGTM! Consistent with existing patterns.

The optional serverConfiguration block follows the same pattern as other configuration sections (workConfiguration, addOnManagerConfiguration), using the with directive for conditional rendering and proper YAML indentation.

deploy/cluster-manager/chart/cluster-manager/values.yaml (1)

126-132: LGTM! Helpful configuration example.

The commented serverConfiguration example provides clear guidance for configuring GRPC endpoint exposure, including the structure for hostname-based endpoints.

@codecov
Copy link

codecov bot commented Nov 3, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.15%. Comparing base (1384645) to head (735f93e).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1239   +/-   ##
=======================================
  Coverage   62.15%   62.15%           
=======================================
  Files         209      209           
  Lines       16968    16968           
=======================================
  Hits        10547    10547           
  Misses       5304     5304           
  Partials     1117     1117           
Flag Coverage Δ
unit 62.15% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
deploy/cluster-manager/chart/cluster-manager/values.yaml (1)

126-132: Consider adding a comment explaining when serverConfiguration is needed.

While the example is clear, users might not immediately understand that serverConfiguration is typically required when using GRPC registration drivers (shown in lines 116-120 above). Adding a brief comment would improve discoverability.

For example, you could add a comment before line 126:

+# serverConfiguration is required when using GRPC registration drivers.
+# It defines how the GRPC server endpoints are exposed to managed clusters.
 # serverConfiguration:
 #   endpointsExposure:
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ca12ae8 and 735f93e.

📒 Files selected for processing (4)
  • deploy/cluster-manager/chart/cluster-manager/templates/cluster_manager.yaml (1 hunks)
  • deploy/cluster-manager/chart/cluster-manager/values.yaml (1 hunks)
  • pkg/operator/helpers/chart/config.go (1 hunks)
  • pkg/operator/helpers/chart/render_test.go (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • pkg/operator/helpers/chart/render_test.go
🧰 Additional context used
🧠 Learnings (12)
📓 Common learnings
Learnt from: skeeey
Repo: open-cluster-management-io/ocm PR: 1086
File: test/integration/util/grpc.go:146-146
Timestamp: 2025-07-23T10:10:42.066Z
Learning: In OCM codebase, there are two different GRPCServerOptions types: the local one in pkg/server/grpc/options.go (which only has GRPCServerConfig field) and the SDK one from open-cluster-management.io/sdk-go/pkg/cloudevents/server/grpc/options (which has ServerBindPort and other fields with default values). Test code uses the SDK version via grpcoptions import alias.
Learnt from: skeeey
Repo: open-cluster-management-io/ocm PR: 1107
File: manifests/klusterlet/management/klusterlet-registration-deployment.yaml:111-115
Timestamp: 2025-08-04T08:58:41.865Z
Learning: In OCM klusterlet deployments, gRPC authentication uses different file naming conventions than CSR/kube authentication: gRPC auth expects config.yaml files (/spoke/bootstrap/config.yaml and /spoke/hub-kubeconfig/config.yaml) while CSR/kube auth uses kubeconfig files. The gRPC driver explicitly creates config.yaml files in the secret data via additionalSecretData["config.yaml"] = d.configTemplate.
📚 Learning: 2025-08-28T01:58:05.882Z
Learnt from: skeeey
Repo: open-cluster-management-io/ocm PR: 1146
File: deploy/cluster-manager/chart/cluster-manager/crds/0000_01_operator.open-cluster-management.io_clustermanagers.crd.yaml:128-135
Timestamp: 2025-08-28T01:58:05.882Z
Learning: Files in deploy/cluster-manager/chart/cluster-manager/crds/ and similar CRD directories are often copied from vendor/upstream sources and should not be modified directly to avoid conflicts during updates.

Applied to files:

  • deploy/cluster-manager/chart/cluster-manager/values.yaml
📚 Learning: 2025-08-28T01:58:37.933Z
Learnt from: skeeey
Repo: open-cluster-management-io/ocm PR: 1146
File: deploy/cluster-manager/chart/cluster-manager/crds/0000_01_operator.open-cluster-management.io_clustermanagers.crd.yaml:247-280
Timestamp: 2025-08-28T01:58:37.933Z
Learning: CRD files in deploy/cluster-manager/chart/cluster-manager/crds/ directory are copied from vendor and should not be modified locally as changes may be overwritten during vendor updates.

Applied to files:

  • deploy/cluster-manager/chart/cluster-manager/values.yaml
📚 Learning: 2025-08-28T01:58:23.958Z
Learnt from: skeeey
Repo: open-cluster-management-io/ocm PR: 1146
File: deploy/cluster-manager/chart/cluster-manager/crds/0000_01_operator.open-cluster-management.io_clustermanagers.crd.yaml:192-225
Timestamp: 2025-08-28T01:58:23.958Z
Learning: CRD files in deploy/cluster-manager/chart/cluster-manager/crds/ and deploy/cluster-manager/config/crds/ directories are copied from vendor (open-cluster-management.io/api dependency) and should not be modified locally.

Applied to files:

  • deploy/cluster-manager/chart/cluster-manager/values.yaml
📚 Learning: 2025-08-28T04:09:12.357Z
Learnt from: skeeey
Repo: open-cluster-management-io/ocm PR: 1146
File: deploy/cluster-manager/chart/cluster-manager/crds/0000_01_operator.open-cluster-management.io_clustermanagers.crd.yaml:94-176
Timestamp: 2025-08-28T04:09:12.357Z
Learning: CRD files in deploy/cluster-manager/chart/cluster-manager/crds/ directory are copied from vendor/upstream sources and should not be modified directly.

Applied to files:

  • deploy/cluster-manager/chart/cluster-manager/values.yaml
📚 Learning: 2025-08-28T01:59:04.611Z
Learnt from: skeeey
Repo: open-cluster-management-io/ocm PR: 1146
File: deploy/cluster-manager/olm-catalog/latest/manifests/operator.open-cluster-management.io_clustermanagers.yaml:94-176
Timestamp: 2025-08-28T01:59:04.611Z
Learning: The file deploy/cluster-manager/olm-catalog/latest/manifests/operator.open-cluster-management.io_clustermanagers.yaml is copied from vendor and should not be modified directly as changes would be overwritten during vendor updates.

Applied to files:

  • deploy/cluster-manager/chart/cluster-manager/values.yaml
📚 Learning: 2025-08-28T02:00:03.385Z
Learnt from: skeeey
Repo: open-cluster-management-io/ocm PR: 1146
File: deploy/klusterlet/chart/klusterlet/crds/0000_00_operator.open-cluster-management.io_klusterlets.crd.yaml:278-280
Timestamp: 2025-08-28T02:00:03.385Z
Learning: CRD files in deploy/klusterlet/chart/klusterlet/crds/ and similar directories are copied from vendor code and should not be modified locally. Grammar or other issues in these files should be reported upstream to the vendor instead.

Applied to files:

  • deploy/cluster-manager/chart/cluster-manager/values.yaml
📚 Learning: 2025-08-04T08:58:41.865Z
Learnt from: skeeey
Repo: open-cluster-management-io/ocm PR: 1107
File: manifests/klusterlet/management/klusterlet-registration-deployment.yaml:111-115
Timestamp: 2025-08-04T08:58:41.865Z
Learning: In OCM klusterlet deployments, gRPC authentication uses different file naming conventions than CSR/kube authentication: gRPC auth expects config.yaml files (/spoke/bootstrap/config.yaml and /spoke/hub-kubeconfig/config.yaml) while CSR/kube auth uses kubeconfig files. The gRPC driver explicitly creates config.yaml files in the secret data via additionalSecretData["config.yaml"] = d.configTemplate.

Applied to files:

  • deploy/cluster-manager/chart/cluster-manager/values.yaml
📚 Learning: 2025-07-25T01:21:08.891Z
Learnt from: skeeey
Repo: open-cluster-management-io/ocm PR: 1077
File: test/integration/registration/spokecluster_grpc_test.go:0-0
Timestamp: 2025-07-25T01:21:08.891Z
Learning: In OCM integration tests, gRPC and kube authentication mechanisms require different CSR handling approaches: gRPC authentication uses util.ApproveCSR since the hub controller signs client certificates, while kube authentication uses authn.ApproveSpokeClusterCSR to simulate the kube-controller-manager signing client certificates.

Applied to files:

  • deploy/cluster-manager/chart/cluster-manager/values.yaml
📚 Learning: 2025-09-24T00:18:33.339Z
Learnt from: zhiweiyin318
Repo: open-cluster-management-io/ocm PR: 1194
File: deploy/klusterlet/chart/klusterlet/templates/bootstrap_kubeconfig_secret.yaml:25-27
Timestamp: 2025-09-24T00:18:33.339Z
Learning: gRPC config in OCM klusterlet bootstrap secrets does not support multiHubBootstrapHubKubeConfigs scenarios - it is intentionally designed only for single hub bootstrap configurations.

Applied to files:

  • deploy/cluster-manager/chart/cluster-manager/values.yaml
📚 Learning: 2025-07-23T10:10:42.066Z
Learnt from: skeeey
Repo: open-cluster-management-io/ocm PR: 1086
File: test/integration/util/grpc.go:146-146
Timestamp: 2025-07-23T10:10:42.066Z
Learning: In OCM codebase, there are two different GRPCServerOptions types: the local one in pkg/server/grpc/options.go (which only has GRPCServerConfig field) and the SDK one from open-cluster-management.io/sdk-go/pkg/cloudevents/server/grpc/options (which has ServerBindPort and other fields with default values). Test code uses the SDK version via grpcoptions import alias.

Applied to files:

  • deploy/cluster-manager/chart/cluster-manager/values.yaml
📚 Learning: 2025-08-06T06:00:53.508Z
Learnt from: skeeey
Repo: open-cluster-management-io/ocm PR: 1107
File: deploy/cluster-manager/config/rbac/cluster_role.yaml:165-168
Timestamp: 2025-08-06T06:00:53.508Z
Learning: In OCM gRPC deployments, both the cluster-manager operator ClusterRole and the gRPC server ClusterRole need "create" permission on "managedclustersets/join" resources for proper bootstrapping of managed clusters.

Applied to files:

  • deploy/cluster-manager/chart/cluster-manager/values.yaml
🧬 Code graph analysis (1)
pkg/operator/helpers/chart/config.go (1)
vendor/open-cluster-management.io/api/operator/v1/types_clustermanager.go (1)
  • ServerConfiguration (166-176)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: integration
  • GitHub Check: e2e-singleton
  • GitHub Check: unit
  • GitHub Check: e2e-hosted
  • GitHub Check: e2e
🔇 Additional comments (3)
deploy/cluster-manager/chart/cluster-manager/values.yaml (1)

116-120: LGTM - GRPC registration driver example is clear.

The commented example correctly demonstrates the GRPC registration driver configuration with appropriate auto-approved identities for the bootstrap service account.

pkg/operator/helpers/chart/config.go (1)

144-146: LGTM - ServerConfiguration field properly integrated.

The new field follows Go and JSON conventions, correctly uses the vendor type operatorv1.ServerConfiguration, and is appropriately marked as optional. The placement after AddOnManagerConfiguration maintains logical grouping of configuration fields.

deploy/cluster-manager/chart/cluster-manager/templates/cluster_manager.yaml (1)

44-47: LGTM - Template follows established patterns.

The serverConfiguration block rendering uses the same conditional with pattern and toYaml serialization as other optional configuration blocks in this template. The indentation and positioning are correct.

@zhiweiyin318
Copy link
Member Author

/assign @qiujian16
/assign @skeeey

@zhiweiyin318
Copy link
Member Author

zhiweiyin318 commented Nov 3, 2025

cc @ncr38 feel free help review this PR

@qiujian16
Copy link
Member

/approve
/lgtm

@openshift-ci openshift-ci bot added the lgtm label Nov 5, 2025
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 5, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: qiujian16, zhiweiyin318

The full list of commands accepted by this bot can be found here.

The pull request process is described here

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-ci openshift-ci bot added the approved label Nov 5, 2025
@openshift-merge-bot openshift-merge-bot bot merged commit d80ec55 into open-cluster-management-io:main Nov 5, 2025
17 checks passed
@zhiweiyin318 zhiweiyin318 deleted the add-grpc-init branch November 5, 2025 07:04
@qiujian16
Copy link
Member

/cherry-pick release-1.1

@openshift-cherrypick-robot

@qiujian16: new pull request created: #1244

In response to this:

/cherry-pick release-1.1

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.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants