Ocelot-Social/db-migration-worker.yaml
Robert Schäfer fb929da2cd Refactor db-migration-worker deployment
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.
2019-02-04 01:37:35 +01:00

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