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

Bug 2074510: Add RBAC role for PlacementDecision resource #28

Merged
merged 2 commits into from
Apr 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/sanity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,13 @@ jobs:
- name: Checkout source
uses: actions/checkout@v2

- name: Setup go
uses: actions/setup-go@v2
with:
go-version: ${{ env.GO_VERSION }}

- name: GolangCI Lint
uses: golangci/golangci-lint-action@v2
uses: golangci/golangci-lint-action@v3
with:
version: v1.37.1

Expand Down
30 changes: 30 additions & 0 deletions config/hub/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,16 @@ rules:
- patch
- update
- watch
- apiGroups:
- apps.open-cluster-management.io
resources:
- placementrules/finalizers
verbs:
- create
- delete
- get
- patch
- update
- apiGroups:
- apps.open-cluster-management.io
resources:
Expand All @@ -48,6 +58,26 @@ rules:
- get
- patch
- update
- apiGroups:
- cluster.open-cluster-management.io
resources:
- placementdecisions
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- cluster.open-cluster-management.io
resources:
- placementdecisions/status
verbs:
- get
- patch
- update
- apiGroups:
- cluster.open-cluster-management.io
resources:
Expand Down
30 changes: 30 additions & 0 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@ rules:
- patch
- update
- watch
- apiGroups:
- apps.open-cluster-management.io
resources:
- placementrules/finalizers
verbs:
- create
- delete
- get
- patch
- update
- apiGroups:
- apps.open-cluster-management.io
resources:
Expand All @@ -48,6 +58,26 @@ rules:
- get
- list
- watch
- apiGroups:
- cluster.open-cluster-management.io
resources:
- placementdecisions
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- cluster.open-cluster-management.io
resources:
- placementdecisions/status
verbs:
- get
- patch
- update
- apiGroups:
- ""
resources:
Expand Down
3 changes: 3 additions & 0 deletions controllers/drplacementcontrol_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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=get;create;update;patch;delete
// +kubebuilder:rbac:groups=cluster.open-cluster-management.io,resources=managedclusters,verbs=get;list;watch
// +kubebuilder:rbac:groups=work.open-cluster-management.io,resources=manifestworks,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=view.open-cluster-management.io,resources=managedclusterviews,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=core,resources=events,verbs=get;create;patch;update
// +kubebuilder:rbac:groups=cluster.open-cluster-management.io,resources=placementdecisions,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=cluster.open-cluster-management.io,resources=placementdecisions/status,verbs=get;update;patch

// Reconcile is part of the main kubernetes reconciliation loop which aims to
// move the current state of the cluster closer to the desired state.
Expand Down