apiVersion: batch/v1
kind: Job
metadata:
  name: kong-int-migration
  namespace: kong
spec:
  template:
    metadata:
      name: kong-int-migration
    spec:
      containers:
      - name: kong-int-migration
        image: kong:2.1.4-alpine
        env:
          - name: KONG_NGINX_DAEMON
            value: 'off'
          - name: KONG_PG_HOST
            value: postgres
          - name: KONG_PG_DATABASE
            value: "kong_int"
          - name: KONG_PG_USER
            value: "kong_int"
          - name: KONG_PG_PASSWORD
            value: kong
        command: [ "/bin/sh", "-c", "kong migrations bootstrap --vv" ]
      restartPolicy: Never
