mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
Instead of creating a deployment with a replica set, we just create the pod once. Also the pod should have everything in the future to run the database migration. Ie. have `cypher-shell` to write directly to the database in the current network. All required configuration is passed manually to the `db-migration-worker`-pod directly. SSH-keys are copied through a secrets file. This altogether made many configuration files obsolete.
40 lines
872 B
YAML
40 lines
872 B
YAML
---
|
|
kind: Pod
|
|
apiVersion: v1
|
|
metadata:
|
|
name: nitro-db-migration-worker
|
|
namespace: staging
|
|
spec:
|
|
volumes:
|
|
- name: secret-volume
|
|
secret:
|
|
secretName: ssh-keys
|
|
defaultMode: 0400
|
|
- name: mongo-export
|
|
persistentVolumeClaim:
|
|
claimName: mongo-export-claim
|
|
containers:
|
|
- name: nitro-db-migration-worker
|
|
image: humanconnection/db-migration-worker:latest
|
|
envFrom:
|
|
- configMapRef:
|
|
name: db-migration-worker
|
|
volumeMounts:
|
|
- name: secret-volume
|
|
readOnly: false
|
|
mountPath: /root/.ssh
|
|
- name: mongo-export
|
|
mountPath: /mongo-export/
|
|
---
|
|
kind: PersistentVolumeClaim
|
|
apiVersion: v1
|
|
metadata:
|
|
name: mongo-export-claim
|
|
namespace: staging
|
|
spec:
|
|
accessModes:
|
|
- ReadWriteOnce
|
|
resources:
|
|
requests:
|
|
storage: 1Gi
|