-
-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathinit_containers_migrations_slu.yml
55 lines (55 loc) · 1 KB
/
init_containers_migrations_slu.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: job-read
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: job-read
rules:
- apiGroups: ["batch"]
resources: ["jobs"]
resourceNames: ["sleep20s"]
verbs: ["get", "list", "watch"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: job-read
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: job-read
subjects:
- kind: ServiceAccount
name: job-read
---
apiVersion: v1
kind: Pod
metadata:
name: app
labels:
svc: example
spec:
serviceAccountName: job-read
initContainers:
- name: wait-for-migrations
image: sikalabs/slu:v0.23.0
args:
- /bin/sh
- -c
- slu wait-for k8s job -j sleep20s
containers:
- name: main
image: ondrejsika/go-hello-world:2
ports:
- containerPort: 80
resources:
requests:
memory: 10Mi
cpu: 10m
limits:
memory: 100Mi
cpu: 20m