---
apiVersion: v1
kind: Pod
metadata:
  name: dbinit
spec:
  containers:
  - name: dbinit
    image: funkypenguin/grinpool-latest
    #    command: ["sleep", "99999999"]
    command: ["/usr/local/bin/dbInit.py"]
    env:
    - name: GRIN_POOL_ADMIN_USER
      valueFrom:
        secretKeyRef:
          name: grinpool-admin
          key: username.txt
    - name: GRIN_POOL_ADMIN_PASSWORD
      valueFrom:
        secretKeyRef:
          name: grinpool-admin
          key: password.txt
    - name: MYSQL_ROOT_PASSWORD
      valueFrom:
        secretKeyRef:
          name: mysql-pass
          key: password
          #    volumeMounts: # directory inside container
          #    - mountPath: /services
          #      name: xxx
          #  volumes: # directory location on host
          #  - name: xxx
          #    hostPath:
          #      path: /data/services
  imagePullSecrets:
  - name: regsecret
  restartPolicy: Never
