2020-02-21 18:25:08 +00:00
|
|
|
#########
|
2020-02-27 11:15:46 +00:00
|
|
|
#Since Kubernetes jobs are immitable (you cannot update it with a new image).
|
|
|
|
# To update these jobs, CI deletes the old jobs and recreates them using this file.
|
2020-02-21 18:25:08 +00:00
|
|
|
#########
|
|
|
|
|
|
|
|
#########
|
|
|
|
#UPDATE: Any update to this file should also be accompanied with ../test.yaml
|
|
|
|
#########
|
|
|
|
|
2022-04-11 13:11:16 +00:00
|
|
|
########-InitScript-##########
|
2020-02-21 18:25:08 +00:00
|
|
|
apiVersion: batch/v1
|
|
|
|
kind: Job
|
|
|
|
metadata:
|
2022-04-11 13:11:16 +00:00
|
|
|
name: InitScript
|
2020-02-21 18:25:08 +00:00
|
|
|
spec:
|
2020-02-27 11:15:46 +00:00
|
|
|
template:
|
|
|
|
spec:
|
|
|
|
containers:
|
2022-04-11 13:11:16 +00:00
|
|
|
- name: InitScript
|
|
|
|
image: localhost:32000/InitScript:staging
|
2020-02-27 11:15:46 +00:00
|
|
|
imagePullPolicy: Always
|
|
|
|
env:
|
|
|
|
- name: MONGO_URL
|
2022-01-28 22:34:06 +00:00
|
|
|
value: 'mongodb://admin:372b60f4-704c-4205-8e5c-45cdbf44b1fc@mongo-0.mongo.default.svc.cluster.local:27017,mongo-1.mongo.default.svc.cluster.local:27017,mongo-2.mongo.default.svc.cluster.local:27017/oneuptimedb?replicaSet=rs0'
|
2020-02-27 11:15:46 +00:00
|
|
|
restartPolicy: Never
|
2020-02-21 18:25:08 +00:00
|
|
|
---
|
2020-02-27 11:15:46 +00:00
|
|
|
###########################
|