Kong / kong-dist-kubernetes

Kubernetes managed Kong cluster
255 stars 136 forks source link

for kong1.0.0,job doesn't work with using postgres #67

Closed Bevisy closed 5 years ago

Bevisy commented 5 years ago

original job

apiVersion: batch/v1
kind: Job
metadata:
  name: kong-migration
spec:
  template:
    metadata:
      name: kong-migration
    spec:
      containers:
      - name: kong-migration
        image: kong:1.0.0rc3
        env:
          - name: KONG_NGINX_DAEMON
            value: 'off'
          - name: KONG_PG_PASSWORD
            value: kong
          - name: KONG_PG_HOST
            value: postgres
        command: [ "/bin/sh", "-c", "kong migrations up" ]
      restartPolicy: Never
Bevisy commented 5 years ago

for jorb working normally,we should modify the job,add "kong migrations bootstrap":

apiVersion: batch/v1
kind: Job
metadata:
  name: kong-migration
spec:
  template:
    metadata:
      name: kong-migration
    spec:
      containers:
      - name: kong-migration
        image: kong:1.0.0rc3
        env:
          - name: KONG_NGINX_DAEMON
            value: 'off'
          - name: KONG_PG_PASSWORD
            value: kong
          - name: KONG_PG_HOST
            value: postgres
        command: [ "/bin/sh", "-c", "kong migrations bootstrap" ]
      restartPolicy: Never
muthmano-dev commented 5 years ago

I was about to start an issue ticket for this once I figured why our new production setup was not working. It seems the update has gone a day back. The new pull request #66 fixes this. This repo needs to be updated regularly along with Kong updates. This issue ticket can now be closed.