110 lines
3.2 KiB
YAML
110 lines
3.2 KiB
YAML
---
|
|
apiVersion: batch/v1
|
|
kind: Job
|
|
metadata:
|
|
name: copy-postgresdb
|
|
namespace: kore
|
|
labels:
|
|
app: kore_site
|
|
component: kore_dply
|
|
tier: kore_sitedply
|
|
group: kore
|
|
spec:
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: kore_site
|
|
component: kore_dply
|
|
tier: kore_sitedply
|
|
group: kore
|
|
spec:
|
|
containers:
|
|
- name: copy-postgresdb
|
|
image: termas.librecloud.online/termas_librecloud/tasksmanager:1.3
|
|
command: ["bash", "-c", "/usr/local/bin/backups-manager -v copy - - . ."]
|
|
#command: ['sh', '-c', 'until nslookup myservice; do echo waiting for myservice; sleep 200; done;']
|
|
ports:
|
|
volumeMounts:
|
|
- mountPath: /data/tasks_list
|
|
readOnly: true
|
|
subPath: tasks_cmd
|
|
name: config-postgresdb-tasks
|
|
- mountPath: /data/.crd
|
|
readOnly: true
|
|
subPath: cmd_crd
|
|
name: config-postgresdb-tasks
|
|
- name: kore-data-storage
|
|
mountPath: /var/lib/postgresql/postgresdb-data-pv-claim
|
|
- name: kore-root-storage
|
|
mountPath: /etc/postgresqlpostgresdb-root-pv-claim
|
|
- mountPath: /data/bin/env
|
|
readOnly: true
|
|
subPath: env
|
|
name: config-postgresdb-tasks
|
|
- mountPath: /usr/local/bin/backups-manager
|
|
readOnly: true
|
|
subPath: backups-manager
|
|
name: config-postgresdb-tasks
|
|
- mountPath: /data/etc/.bcksrvr
|
|
readOnly: true
|
|
subPath: bcksrvr
|
|
name: config-postgresdb-tasks
|
|
- mountPath: /data/etc/.s3_bcksrvr
|
|
readOnly: true
|
|
subPath: s3_bcksrvr
|
|
name: config-postgresdb-tasks
|
|
- mountPath: /usr/local/bin/entrypoint.sh
|
|
readOnly: true
|
|
subPath: entrypoint.sh
|
|
name: config-postgresdb-tasks
|
|
- mountPath: /usr/local/bin/run.sh
|
|
readOnly: true
|
|
subPath: run.sh
|
|
name: config-postgresdb-tasks
|
|
imagePullPolicy: IfNotPresent
|
|
affinity:
|
|
podAntiAffinity:
|
|
requiredDuringSchedulingIgnoredDuringExecution:
|
|
- labelSelector:
|
|
matchExpressions:
|
|
- key: app
|
|
operator: In
|
|
values:
|
|
- site
|
|
topologyKey: "kubernetes.io/hostname"
|
|
nodeSelector:
|
|
rolenode: storage
|
|
imagePullSecrets:
|
|
- name: lco-postgresdb-termasreg
|
|
restartPolicy: Never
|
|
volumes:
|
|
- name: kore-data-storage
|
|
persistentVolumeClaim:
|
|
claimName:
|
|
- name: kore-root-storage
|
|
persistentVolumeClaim:
|
|
claimName:
|
|
- name: config-postgresdb-tasks
|
|
configMap:
|
|
name: config-postgresdb-tasks
|
|
defaultMode: 0755
|
|
items:
|
|
- key: env
|
|
path: env
|
|
- key: backups-manager
|
|
path: backups-manager
|
|
- key: tasks_cmd
|
|
path: tasks_cmd
|
|
- key: tasks_archive
|
|
path: tasks_archive
|
|
- key: cmd_crd
|
|
path: cmd_crd
|
|
- key: bcksrvr
|
|
path: bcksrvr
|
|
- key: s3_bcksrvr
|
|
path: s3_bcksrvr
|
|
- key: entrypoint.sh
|
|
path: entrypoint.sh
|
|
- key: run.sh
|
|
path: run.sh
|
|
|