Browse Source

Example of RBAC resources

Michael Bridgen 2 years ago
parent
commit
78a3ca4e89
1 changed files with 37 additions and 0 deletions
  1. 37
    0
      deploy/flux-account.yaml

+ 37
- 0
deploy/flux-account.yaml View File

@@ -0,0 +1,37 @@
1
+---
2
+# The service account, cluster roles, and cluster role binding are
3
+# only needed for Kubernetes with role-based access control (RBAC).
4
+apiVersion: v1
5
+kind: ServiceAccount
6
+metadata:
7
+  labels:
8
+    name: flux
9
+  name: flux
10
+---
11
+apiVersion: rbac.authorization.k8s.io/v1beta1
12
+kind: ClusterRole
13
+metadata:
14
+  labels:
15
+    name: flux
16
+  name: flux
17
+rules:
18
+  - apiGroups: ['*']
19
+    resources: ['*']
20
+    verbs: ['*']
21
+  - nonResourceURLs: ['*']
22
+    verbs: ['*']
23
+---
24
+apiVersion: rbac.authorization.k8s.io/v1beta1
25
+kind: ClusterRoleBinding
26
+metadata:
27
+  labels:
28
+    name: flux
29
+  name: flux
30
+roleRef:
31
+  apiGroup: rbac.authorization.k8s.io
32
+  kind: ClusterRole
33
+  name: flux
34
+subjects:
35
+  - kind: ServiceAccount
36
+    name: flux
37
+    namespace: default

Loading…
Cancel
Save