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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add RBAC role for accessing PlacementDecision resource #423

Merged

Conversation

BenamarMk
Copy link
Member

This commit fixes https://bugzilla.redhat.com/show_bug.cgi?id=2071494.
The PlacmentRule has been changed and now generates a placementDecision in the same namespace.
The subscription watches the PlacementDecision changes and deploy the application to the
managed clusters accordingly. The PlacementRule controller needs to be granted access to the
PlacementDecision resource.

@BenamarMk BenamarMk changed the title Add RBAC role for PlacementDecision resource Add RBAC role for accessing PlacementDecision resource Apr 6, 2022
@BenamarMk BenamarMk force-pushed the add_rbac_role_for_placementdecision branch from 24b96a9 to 7674dba Compare April 6, 2022 10:54
@BenamarMk BenamarMk force-pushed the add_rbac_role_for_placementdecision branch from 7674dba to c76ab66 Compare April 6, 2022 13:26
@@ -448,10 +448,13 @@ func (r *DRPlacementControlReconciler) SetupWithManager(mgr ctrl.Manager) error
// +kubebuilder:rbac:groups=ramendr.openshift.io,resources=drpolicies,verbs=get;list;watch
// +kubebuilder:rbac:groups=apps.open-cluster-management.io,resources=placementrules,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=apps.open-cluster-management.io,resources=placementrules/status,verbs=get;update;patch
// +kubebuilder:rbac:groups=apps.open-cluster-management.io,resources=placementrules/finalizers,verbs="*"
Copy link
Member

Choose a reason for hiding this comment

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

@BenamarMk "" will fail security audit, it is preferred that required verbs are called out explicitly, such that in the future if a new verb is added the "" does not automatically grant the the rights to operate on it.

Copy link
Member Author

Choose a reason for hiding this comment

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

agreed

@BenamarMk BenamarMk force-pushed the add_rbac_role_for_placementdecision branch from c76ab66 to 78178e5 Compare April 6, 2022 16:28
This commit fixes https://bugzilla.redhat.com/show_bug.cgi?id=2071494.
The PlacmentRule has been changed and now generates a placementDecision in the same namespace.
The subscription watches the PlacementDecision changes and deploy the application to the
managed clusters accordingly. The PlacementRule controller needs to be granted access to the
PlacementDecision resource.
@BenamarMk BenamarMk force-pushed the add_rbac_role_for_placementdecision branch from 78178e5 to 2d45066 Compare April 6, 2022 16:36
@BenamarMk BenamarMk force-pushed the add_rbac_role_for_placementdecision branch from 0760d53 to 49fd397 Compare April 8, 2022 13:20
@BenamarMk BenamarMk force-pushed the add_rbac_role_for_placementdecision branch from 49fd397 to 0277769 Compare April 8, 2022 13:28
@ShyamsundarR ShyamsundarR merged commit 92482e4 into RamenDR:main Apr 11, 2022
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.

None yet

2 participants