Skip to content

Commit cfba940

Browse files
committed
Add RBAC permissions for reading secrets.
1 parent 04df60c commit cfba940

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

config/rbac/role.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ kind: ClusterRole
44
metadata:
55
name: manager-role
66
rules:
7+
- apiGroups:
8+
- ""
9+
resources:
10+
- secrets
11+
verbs:
12+
- get
13+
- list
14+
- watch
715
- apiGroups:
816
- cluster.x-k8s.io
917
resources:

internal/controller/metalstackmachine_controller.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ type machineReconciler struct {
7272
// +kubebuilder:rbac:groups=infrastructure.cluster.x-k8s.io,resources=metalstackmachines,verbs=get;list;watch;create;update;patch;delete
7373
// +kubebuilder:rbac:groups=infrastructure.cluster.x-k8s.io,resources=metalstackmachines/status,verbs=get;update;patch
7474
// +kubebuilder:rbac:groups=infrastructure.cluster.x-k8s.io,resources=metalstackmachines/finalizers,verbs=update
75+
// +kubebuilder:rbac:groups="",resources=secrets,verbs=get;list;watch
7576

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

0 commit comments

Comments
 (0)