Skip to content

Commit 406dda9

Browse files
committed
Added proper RBAC
1 parent eccc733 commit 406dda9

File tree

2 files changed

+16
-14
lines changed

2 files changed

+16
-14
lines changed

config/rbac/role.yaml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -296,22 +296,22 @@ rules:
296296
- patch
297297
- update
298298
- apiGroups:
299-
- infrastructure.cluster.x-k8s.io
299+
- infrastructure.cluster.x-k8s.io
300300
resources:
301-
- kubemarkmachinetemplates
301+
- kubemarkmachinetemplates
302302
verbs:
303-
- create
304-
- delete
305-
- get
306-
- list
307-
- patch
308-
- update
309-
- watch
303+
- create
304+
- delete
305+
- get
306+
- list
307+
- patch
308+
- update
309+
- watch
310310
- apiGroups:
311-
- infrastructure.cluster.x-k8s.io
311+
- infrastructure.cluster.x-k8s.io
312312
resources:
313-
- kubemarkmachinetemplates/status
313+
- kubemarkmachinetemplates/status
314314
verbs:
315-
- get
316-
- patch
317-
- update
315+
- get
316+
- patch
317+
- update

controllers/awsmachine_controller.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,8 @@ func (r *AWSMachineReconciler) getObjectStoreService(scope scope.S3Scope) servic
137137
// +kubebuilder:rbac:groups="",resources=secrets;,verbs=get;list;watch
138138
// +kubebuilder:rbac:groups="",resources=namespaces,verbs=get;list;watch
139139
// +kubebuilder:rbac:groups="",resources=events,verbs=get;list;watch;create;update;patch
140+
// +kubebuilder:rbac:groups=infrastructure.cluster.x-k8s.io,resources=kubemarkmachinetemplates,verbs=get;list;watch;create;update;patch;delete
141+
// +kubebuilder:rbac:groups=infrastructure.cluster.x-k8s.io,resources=kubemarkmachinetemplates/status,verbs=get;patch;update
140142

141143
func (r *AWSMachineReconciler) Reconcile(ctx context.Context, req ctrl.Request) (_ ctrl.Result, reterr error) {
142144
log := ctrl.LoggerFrom(ctx)

0 commit comments

Comments
 (0)