Skip to content

Commit e370dc2

Browse files
committed
Proper RBAC roles for the operator service account
1 parent 53600ef commit e370dc2

File tree

3 files changed

+21
-3
lines changed

3 files changed

+21
-3
lines changed

charts/chisel-operator/templates/serviceaccount.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,18 @@ metadata:
2121
{{- toYaml . | nindent 4 }}
2222
{{- end }}
2323
rules:
24-
- apiGroups: ["*"]
24+
- apiGroups: ["apps"]
25+
resources: ["deployments", "deployments/*"]
26+
verbs: ["*"]
27+
- apiGroups: [""]
28+
resources: ["services", "services/status", "services/finalizers"]
29+
verbs: ["get", "list", "watch", "update", "patch"]
30+
- apiGroups: ["chisel-operator.io"]
2531
resources: ["*"]
2632
verbs: ["*"]
33+
- apiGroups: [""]
34+
resources: ["secrets"]
35+
verbs: ["get", "list", "create", "update", "patch", "delete"]
2736

2837
---
2938
apiVersion: rbac.authorization.k8s.io/v1

deploy/clusterrole.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,15 @@ kind: ClusterRole
33
metadata:
44
name: chisel-operator
55
rules:
6-
- apiGroups: ["*"]
6+
- apiGroups: ["apps"]
7+
resources: ["deployments", "deployments/*"]
8+
verbs: ["*"]
9+
- apiGroups: [""]
10+
resources: ["services", "services/status", "services/finalizers"]
11+
verbs: ["get", "list", "watch", "update", "patch"]
12+
- apiGroups: ["chisel-operator.io"]
713
resources: ["*"]
814
verbs: ["*"]
15+
- apiGroups: [""]
16+
resources: ["secrets"]
17+
verbs: ["get", "list", "create", "update", "patch", "delete"]

deploy/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ spec:
1919
automountServiceAccountToken: true
2020
containers:
2121
- name: chisel-operator
22-
image: ghcr.io/fyralabs/chisel-operator:v0.3.4
22+
image: ghcr.io/fyralabs/chisel-operator:v0.4.0
2323
env:
2424
- name: RUST_LOG
2525
value: "debug"

0 commit comments

Comments
 (0)