Skip to content

Commit

Permalink
Fix rbac for AWSProvider resource
Browse files Browse the repository at this point in the history
Signed-off-by: Andrei Pavlov <[email protected]>
  • Loading branch information
Kshatrix committed Jun 4, 2024
1 parent 3205400 commit 8adab97
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions charts/hmc/templates/awsprovider-editor-rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ rules:
- apiGroups:
- hmc.mirantis.com.hmc.mirantis.com
resources:
- awsprovider
- awsproviders
verbs:
- create
- delete
Expand All @@ -20,6 +20,6 @@ rules:
- apiGroups:
- hmc.mirantis.com.hmc.mirantis.com
resources:
- awsprovider/status
- awsproviders/status
verbs:
- get
4 changes: 2 additions & 2 deletions charts/hmc/templates/awsprovider-viewer-rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ rules:
- apiGroups:
- hmc.mirantis.com.hmc.mirantis.com
resources:
- awsprovider
- awsproviders
verbs:
- get
- list
- watch
- apiGroups:
- hmc.mirantis.com.hmc.mirantis.com
resources:
- awsprovider/status
- awsproviders/status
verbs:
- get
6 changes: 3 additions & 3 deletions charts/hmc/templates/manager-rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ rules:
- apiGroups:
- hmc.mirantis.com
resources:
- awsprovider
- awsproviders
verbs:
- create
- delete
Expand All @@ -20,13 +20,13 @@ rules:
- apiGroups:
- hmc.mirantis.com
resources:
- awsprovider/finalizers
- awsproviders/finalizers
verbs:
- update
- apiGroups:
- hmc.mirantis.com
resources:
- awsprovider/status
- awsproviders/status
verbs:
- get
- patch
Expand Down
4 changes: 2 additions & 2 deletions config/rbac/awsprovider_editor_role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ rules:
- apiGroups:
- hmc.mirantis.com.hmc.mirantis.com
resources:
- awsprovider
- awsproviders
verbs:
- create
- delete
Expand All @@ -22,6 +22,6 @@ rules:
- apiGroups:
- hmc.mirantis.com.hmc.mirantis.com
resources:
- awsprovider/status
- awsproviders/status
verbs:
- get
4 changes: 2 additions & 2 deletions config/rbac/awsprovider_viewer_role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ rules:
- apiGroups:
- hmc.mirantis.com.hmc.mirantis.com
resources:
- awsprovider
- awsproviders
verbs:
- get
- list
- watch
- apiGroups:
- hmc.mirantis.com.hmc.mirantis.com
resources:
- awsprovider/status
- awsproviders/status
verbs:
- get
6 changes: 3 additions & 3 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ rules:
- apiGroups:
- hmc.mirantis.com
resources:
- awsprovider
- awsproviders
verbs:
- create
- delete
Expand All @@ -19,13 +19,13 @@ rules:
- apiGroups:
- hmc.mirantis.com
resources:
- awsprovider/finalizers
- awsproviders/finalizers
verbs:
- update
- apiGroups:
- hmc.mirantis.com
resources:
- awsprovider/status
- awsproviders/status
verbs:
- get
- patch
Expand Down
6 changes: 3 additions & 3 deletions internal/controller/hmcprovideraws_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ type AWSProviderReconciler struct {
Scheme *runtime.Scheme
}

//+kubebuilder:rbac:groups=hmc.mirantis.com,resources=awsprovider,verbs=get;list;watch;create;update;patch;delete
//+kubebuilder:rbac:groups=hmc.mirantis.com,resources=awsprovider/status,verbs=get;update;patch
//+kubebuilder:rbac:groups=hmc.mirantis.com,resources=awsprovider/finalizers,verbs=update
//+kubebuilder:rbac:groups=hmc.mirantis.com,resources=awsproviders,verbs=get;list;watch;create;update;patch;delete
//+kubebuilder:rbac:groups=hmc.mirantis.com,resources=awsproviders/status,verbs=get;update;patch
//+kubebuilder:rbac:groups=hmc.mirantis.com,resources=awsproviders/finalizers,verbs=update

// 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

0 comments on commit 8adab97

Please sign in to comment.