Skip to content

Commit b8f811a

Browse files
committed
added roles
1 parent 07c9f3c commit b8f811a

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

config/rbac/role.yaml

+16
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,14 @@ rules:
3232
verbs:
3333
- create
3434
- patch
35+
- apiGroups:
36+
- ""
37+
resources:
38+
- nodes
39+
verbs:
40+
- get
41+
- list
42+
- watch
3543
- apiGroups:
3644
- ""
3745
resources:
@@ -40,6 +48,14 @@ rules:
4048
- delete
4149
- list
4250
- watch
51+
- apiGroups:
52+
- ""
53+
resources:
54+
- pods
55+
verbs:
56+
- get
57+
- list
58+
- watch
4359
- apiGroups:
4460
- ""
4561
resources:

internal/controller/nats/controller.go

+2
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ func NewReconciler(
112112
//+kubebuilder:rbac:groups="",resources=configmaps,verbs=list;watch
113113
//+kubebuilder:rbac:groups="",resources=persistentvolumeclaims,verbs=list;delete;watch
114114
// +kubebuilder:rbac:groups="",resources=events,verbs=create;patch
115+
//+kubebuilder:rbac:groups="",resources=pods,verbs=list;watch;get
116+
//+kubebuilder:rbac:groups="",resources=nodes,verbs=list;watch;get
115117
//+kubebuilder:rbac:groups="apps",resources=statefulsets,verbs=list;watch
116118
//+kubebuilder:rbac:groups="networking.istio.io",resources=destinationrules,verbs=list;watch
117119
//+kubebuilder:rbac:groups="policy",resources=poddisruptionbudgets,verbs=list;watch

0 commit comments

Comments
 (0)