This repository has been archived by the owner on Mar 10, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
migration-job.yml
98 lines (98 loc) · 2.63 KB
/
migration-job.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
apiVersion: v1
kind: Template
metadata:
name: fabric8-tenant-che-migration-namespace-template
objects:
- apiVersion: batch/v1
kind: Job
metadata:
name: migration-${JOB_ID}
annotations:
request-id: ${REQUEST_ID}
labels:
migration:
spec:
parallelism: 1
completions: 1
template:
metadata:
name: migration-${JOB_ID}
annotations:
request-id: ${REQUEST_ID}
labels:
migration:
spec:
containers:
- name: migration
env:
- name: JAVA_OPTS
valueFrom:
configMapKeyRef:
key: java-options
name: migration-settings
optional: true
- name: DEBUG
valueFrom:
configMapKeyRef:
key: debug
name: migration-settings
optional: true
- name: CLEANUP_SINGLE_TENANT
valueFrom:
configMapKeyRef:
key: cleanup-single-tenant
name: migration
optional: true
- name: CHE_MULTITENANT_SERVER
valueFrom:
configMapKeyRef:
key: che-multitenant-server
name: migration
optional: true
- name: CHE_DESTINATION_SERVER
valueFrom:
configMapKeyRef:
key: che-destination-server
name: migration
optional: true
- name: OSIO_TOKEN
valueFrom:
configMapKeyRef:
key: osio-token
name: migration
optional: true
- name: MAINTENANCE
valueFrom:
configMapKeyRef:
key: migration
name: migration
optional: true
- name: IDENTITY_ID
valueFrom:
configMapKeyRef:
key: identity-id
name: migration
optional: true
- name: REQUEST_ID
valueFrom:
configMapKeyRef:
key: request-id
name: migration
optional: true
- name: JOB_REQUEST_ID
value: ${REQUEST_ID}
image: ${IMAGE}
imagePullPolicy: "Always"
restartPolicy: Never
# serviceAccount: che
parameters:
- description: The container image
name: IMAGE
value: "docker.io/dfestal/fabric8-tenant-che-migration:latest"
- description: Migration Job ID
name: JOB_ID
generate: expression
from: "[a-z0-9]{12}"
- description: Request ID
name: REQUEST_ID
value: "theRequestId"