forked from openpitrix/ks-auto-migrate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmigrate-runtime-job.yaml
36 lines (36 loc) · 1.04 KB
/
migrate-runtime-job.yaml
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
apiVersion: batch/v1
kind: Job
metadata:
name: hyperpitrix-migrate-runtime
namespace: openpitrix-system
labels:
app: hyperpitrix
job: hyperpitrix-migrate-runtime
version: v0.0.1
spec:
backoffLimit: 100
completions: 1
parallelism: 1
template:
metadata:
labels:
app: hyperpitrix
job: hyperpitrix-migrate-runtime
version: v0.0.1
name: hyperpitrix-migrate-runtime-job
spec:
initContainers:
- name: wait-runtime-manager
image: busybox:1.28.4
imagePullPolicy: IfNotPresent
command: ['sh', '-c', 'until nc -z hyperpitrix.openpitrix-system.svc 9103; do echo "waiting for runtime-manager"; sleep 2; done;']
containers:
- command: ["migrate-runtime"]
name: hyperpitrix-migrate-runtime
imagePullPolicy: Always
image: openpitrix/generate-kubeconfig:latest
restartPolicy: OnFailure
dnsPolicy: ClusterFirst
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30