Skip to content

feat: add harvester/rancher integration rbac chart#475

Merged
ihcsim merged 2 commits intoharvester:masterfrom
ihcsim:harvester-rancher-rbac
Mar 10, 2026
Merged

feat: add harvester/rancher integration rbac chart#475
ihcsim merged 2 commits intoharvester:masterfrom
ihcsim:harvester-rancher-rbac

Conversation

@ihcsim
Copy link
Copy Markdown
Contributor

@ihcsim ihcsim commented Feb 13, 2026

This PR introduces the harvester-rbac Helm chart. The chart contains the RoleTemplate RBAC resources described in HEP: Introduce Harvester/Rancher Integration RBAC Roles. These roles are assigned to Rancher users to govern cluster-scoped vs. project-scoped permissions and read-only vs. read-write permissions on Harvester resources.

The chart provides values configuration to allow users to add additional rules to the roles.

Related Issue(s):

harvester/harvester#7909

Test Plan

The test plans to validate the enforcement of the role permissions are laid out in the HEP.

The test steps described in this PR are limited to the correct installation of the chart and its configuration.

To install the chart from local path to Rancher 2.13:

helm upgrade --install harvester-rbac .

To verify that the resources are installed correctly:

$ kubectl get roletemplates -l "app.kubernetes.io/name=harvester-rbac" 

NAME                  AGE
virt-cluster-manage   8s
virt-project-manage   8s
virt-project-view     8s
virt-view-cluster     8s

To add additional rules to the roles, update the additionalRules sections in the values.yaml and then install/upgrade the chart again.

Verify that the additional rules are included in the RoleTemplates resources:

kubectl get roletemplates -l "app.kubernetes.io/name=harvester-rbac" -ojsonpath='{.items[*].rules}' | jq .

Copilot AI review requested due to automatic review settings February 13, 2026 00:12
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces a new Helm chart harvester-rbac that provides RBAC role templates for Harvester/Rancher integration. The chart creates four RoleTemplate resources that segregate permissions based on scope (cluster vs. project) and access level (view vs. manage). It supports customization through values configuration to allow users to add additional RBAC rules.

Changes:

  • Added new Helm chart structure with Chart.yaml, values.yaml, .helmignore, and template files
  • Created four RoleTemplate resources: virt-cluster-manage, virt-cluster-view, virt-project-manage, and virt-project-view
  • Implemented support for extending roles with additional rules via values configuration

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
charts/harvester-rbac/Chart.yaml Defines chart metadata, version info, and Rancher-specific annotations
charts/harvester-rbac/values.yaml Provides configuration structure for adding custom RBAC rules to each role
charts/harvester-rbac/.helmignore Standard Helm ignore patterns for package building
charts/harvester-rbac/templates/_helpers.tpl Common Helm template helpers for labels and naming
charts/harvester-rbac/templates/NOTES.txt Post-installation notes for users
charts/harvester-rbac/templates/virt-cluster-manage.yaml Cluster-scoped management role with full access to Harvester resources
charts/harvester-rbac/templates/virt-cluster-view.yaml Cluster-scoped view role with read-only access
charts/harvester-rbac/templates/virt-project-manage.yaml Project-scoped management role for load balancer resources
charts/harvester-rbac/templates/virt-project-view.yaml Project-scoped view role for load balancer resources

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Signed-off-by: Ivan Sim <ivan.sim@suse.com>
@ihcsim ihcsim force-pushed the harvester-rancher-rbac branch from fd790ca to de0a660 Compare February 13, 2026 00:34
- get
- list
- watch
- create
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

create is needed for UI to load the settings page. Since we have a list of UI items to check, I didn't bother investigating further at this time.

ibrokethecloud
ibrokethecloud previously approved these changes Feb 24, 2026
Copy link
Copy Markdown
Member

@w13915984028 w13915984028 left a comment

Choose a reason for hiding this comment

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

Some questions, thanks.

Signed-off-by: Ivan Sim <ivan.sim@suse.com>
Copy link
Copy Markdown
Member

@w13915984028 w13915984028 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks.

Copy link
Copy Markdown
Contributor

@Vicente-Cheng Vicente-Cheng left a comment

Choose a reason for hiding this comment

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

lgtm, thanks!

@ihcsim ihcsim merged commit 251894a into harvester:master Mar 10, 2026
5 checks passed
@ihcsim ihcsim deleted the harvester-rancher-rbac branch March 10, 2026 17:26
@ihcsim
Copy link
Copy Markdown
Contributor Author

ihcsim commented Mar 10, 2026

@mergify backport v1.8

@mergify
Copy link
Copy Markdown

mergify bot commented Mar 10, 2026

backport v1.8

❌ No backport have been created

Details
  • Backport to branch v1.8 failed

GitHub error: Branch not found

@ihcsim
Copy link
Copy Markdown
Contributor Author

ihcsim commented Mar 10, 2026

@mergify backport release-v1.8

@mergify
Copy link
Copy Markdown

mergify bot commented Mar 10, 2026

backport release-v1.8

✅ Backports have been created

Details

mergify bot pushed a commit that referenced this pull request Mar 10, 2026
Signed-off-by: Ivan Sim <ivan.sim@suse.com>
(cherry picked from commit 251894a)
Vicente-Cheng pushed a commit that referenced this pull request Mar 11, 2026
Signed-off-by: Ivan Sim <ivan.sim@suse.com>
(cherry picked from commit 251894a)
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.

5 participants