-
Notifications
You must be signed in to change notification settings - Fork 15
/
backup-job-template.yaml
99 lines (99 loc) · 3.49 KB
/
backup-job-template.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
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
99
---
apiVersion: v1
kind: Template
metadata:
name: "integreatly-job-backup-template"
annotations:
description: 'Job for backing up integreatly data on demand'
objects:
- apiVersion: batch/v1
kind: Job
metadata:
name: ${NAME}
labels:
monitoring-key: middleware
spec:
parallelism: 1
completions: 1
template:
metadata:
name: ${NAME}
labels:
job-name: ${NAME}
spec:
serviceAccountName: "${SERVICEACCOUNT}"
containers:
- name: backup-job
image: "${IMAGE}"
imagePullPolicy: Always
command:
- "/opt/intly/tools/entrypoint.sh"
- "-c"
- "${COMPONENT}"
- '-b'
- "${BACKEND}"
- "-e"
- "${ENCRYPTION}"
- "-d"
- "${DEBUG}"
env:
- name: BACKEND_SECRET_NAME
value: "${BACKEND_SECRET_NAME}"
- name: BACKEND_SECRET_NAMESPACE
value: "${BACKEND_SECRET_NAMESPACE}"
- name: ENCRYPTION_SECRET_NAME
value: "${ENCRYPTION_SECRET_NAME}"
- name: ENCRYPTION_SECRET_NAMESPACE
value: "${ENCRYPTION_SECRET_NAMESPACE}"
- name: COMPONENT_SECRET_NAME
value: "${COMPONENT_SECRET_NAME}"
- name: COMPONENT_SECRET_NAMESPACE
value: "${COMPONENT_SECRET_NAMESPACE}"
- name: PRODUCT_NAME
value: "${PRODUCT_NAME}"
- name: PRODUCT_NAMESPACE_PREFIX
value: "${PRODUCT_NAMESPACE_PREFIX}"
restartPolicy: Never
parameters:
- name: NAME
description: Unique job name to be used in several resource name(s)
value: integreatly-job-backup
- name: PRODUCT_NAME
description: Middleware product name to have its data archived
required: true
- name: COMPONENT
description: Component name to run the backup
required: true
- name: PRODUCT_NAMESPACE_PREFIX
description: Namespace prefix for individual product namespaces. Empty by default. Planned to be 'openshift-' for RHMI.
value: ''
- name: BACKEND
description: Backend engine to upload the component archive
value: s3
- name: ENCRYPTION
description: Encryption engine to encrypt component archive before uploading it
- name: COMPONENT_SECRET_NAME
description: Component secret name to create environment variables from
- name: COMPONENT_SECRET_NAMESPACE
description: If the component secret is not in default, put it's namespace here
value: default
- name: BACKEND_SECRET_NAME
description: Backend secret name to create environment variables from
required: true
value: s3-credentials
- name: BACKEND_SECRET_NAMESPACE
description: Backend secret namespace to create environment variables from
value: default
- name: ENCRYPTION_SECRET_NAME
description: Encruption secret name to create environment variables from
- name: ENCRYPTION_SECRET_NAMESPACE
description: Encruption secret namespace to create environment variables from
value: default
- name: IMAGE
description: 'Backup docker image URL'
value: 'quay.io/integreatly/backup-container:master'
- name: SERVICEACCOUNT
description: 'The service account used by the backup job'
value: backupjob
- name: DEBUG
description: "Debug flag to sleep the job pod after its execution"