Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃尡 Updates CAPV manager cluster role #1529

Merged
merged 1 commit into from
May 12, 2022

Conversation

srm09
Copy link
Contributor

@srm09 srm09 commented May 10, 2022

What this PR does / why we need it:
This patch adds an aggregration rule for the CAPV manager role which can be used to add permissions to the CAPV manager ClusterRole on the fly. External clients such as addons providers for CPI/CSI can use this label to add permissions to the manager dynamically, thereby reducing the need to hardcode these permissions in CAPV.
It also cleans up the patch files to add the CAPI and KCP aggregation labels to the CAPV manager role.

Which issue(s) this PR fixes:
Fixes #1526
Fixes #1523

Special notes for the reviewer:
The aggregation rule will help the clients creating ProviderServiceAccount objects to add the permissions specified in the spec.Rules field to the CAPV manager ClusterRole. Without these permissions, the CAPV manager fails to create the role and role binding during the reconciliation of the ProviderServiceAccount object.

Release note:

Adds aggregation rule to the CAPV manager ClusterRole

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels May 10, 2022
This patch does the following two things:
- Adds an aggregration rule for the CAPV manager role which can be used
  to add permissions to the manager role on the fly. External clients
  such as addons providers for CPI/CSI can use this label to add
  permissions to the manager dynamically, thereby reducing the need to
  hardcode these permissions in CAPV.
- It also cleans up the patch files to add the CAPI and KCP aggregation
  labels to the CAPV manager role

Signed-off-by: Sagar Muchhal <muchhals@vmware.com>
@srm09 srm09 force-pushed the add-capv-rbac-permissions branch from b23f3f8 to f0a3999 Compare May 10, 2022 02:31
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels May 10, 2022
@srm09 srm09 added this to the v1.2.0 milestone May 10, 2022
@aartij17
Copy link
Contributor

/lgtm

1 similar comment
@aartij17
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 10, 2022
@srm09
Copy link
Contributor Author

srm09 commented May 11, 2022

/test pull-cluster-api-provider-vsphere-apidiff-main

@srm09
Copy link
Contributor Author

srm09 commented May 12, 2022

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: srm09

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 12, 2022
@srm09
Copy link
Contributor Author

srm09 commented May 12, 2022

/retest

@k8s-ci-robot k8s-ci-robot merged commit a172764 into kubernetes-sigs:main May 12, 2022
@srm09 srm09 deleted the add-capv-rbac-permissions branch June 15, 2022 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
3 participants