apiVersion: batch/v1
kind: Job
metadata:
  name: init-db
spec:
  template:
    metadata:
      name:  init-db
      labels:
        app: init-postgresdb
    spec:
      containers:
      - image: postgres
        name: init-db
        command: ["bin/bash",
        "-c",
        "psql -h postgres -U postgres -c 'CREATE DATABASE game_changer;' && psql -h postgres -U postgres -c 'CREATE DATABASE \"gc-orchestration\";'"]
      restartPolicy: OnFailure