Skip to content

Commit a4a3620

Browse files
committed
feat(init_containers_migrations_deploy.yml): Move RBAC after deployment
1 parent 64e6853 commit a4a3620

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed

init_containers_migrations_deploy.yml

+27-27
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,3 @@
1-
apiVersion: v1
2-
kind: ServiceAccount
3-
metadata:
4-
name: job-read
5-
---
6-
apiVersion: rbac.authorization.k8s.io/v1
7-
kind: Role
8-
metadata:
9-
name: job-read
10-
rules:
11-
- apiGroups: ["batch"]
12-
resources: ["jobs"]
13-
resourceNames: ["sleep20s"]
14-
verbs: ["get", "list", "watch"]
15-
---
16-
apiVersion: rbac.authorization.k8s.io/v1
17-
kind: RoleBinding
18-
metadata:
19-
name: job-read
20-
roleRef:
21-
apiGroup: rbac.authorization.k8s.io
22-
kind: Role
23-
name: job-read
24-
subjects:
25-
- kind: ServiceAccount
26-
name: job-read
27-
---
281
apiVersion: apps/v1
292
kind: Deployment
303
metadata:
@@ -61,3 +34,30 @@ spec:
6134
limits:
6235
memory: 100Mi
6336
cpu: 20m
37+
---
38+
apiVersion: v1
39+
kind: ServiceAccount
40+
metadata:
41+
name: job-read
42+
---
43+
apiVersion: rbac.authorization.k8s.io/v1
44+
kind: Role
45+
metadata:
46+
name: job-read
47+
rules:
48+
- apiGroups: ["batch"]
49+
resources: ["jobs"]
50+
resourceNames: ["sleep20s"]
51+
verbs: ["get", "list", "watch"]
52+
---
53+
apiVersion: rbac.authorization.k8s.io/v1
54+
kind: RoleBinding
55+
metadata:
56+
name: job-read
57+
roleRef:
58+
apiGroup: rbac.authorization.k8s.io
59+
kind: Role
60+
name: job-read
61+
subjects:
62+
- kind: ServiceAccount
63+
name: job-read

0 commit comments

Comments
 (0)