{{- if not (hasPrefix "queens" .Values.imageVersion) }}
apiVersion: batch/v1
kind: Job
metadata:
  name: neutron-test-migration
  labels:
    system: openstack
    type: configuration
    component: neutron
spec:
  template:
    spec:
      restartPolicy: OnFailure
      containers:
        - name: neutron-migration
          image: {{ default "hub.global.cloud.sap" .Values.global.imageRegistry }}/monsoon/loci-neutron:{{default "queens-20190318110549" .Values.imageVersionUpgrade }}
          imagePullPolicy: IfNotPresent
          command:
            - /usr/local/bin/kubernetes-entrypoint
          env:
            - name: COMMAND
              value: "/db-migrate"
            - name: NAMESPACE
              value: {{ .Release.Namespace }}
            - name: DEPENDENCY_SERVICE
              value: "neutron-postgresql"
            - name: PGAPPNAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
          volumeMounts:
            - mountPath: /etc/neutron
              name: empty-dir
            - mountPath: /db-migrate
              name: container-init
              subPath: db-migrate
              readOnly: true
      volumes:
        - name: empty-dir
          emptyDir: {}
        - name: neutron-etc
          configMap:
            name: neutron-etc
        - name: container-init
          configMap:
            name: neutron-bin-test-migrate
            defaultMode: 0755
{{- end }}
Revert "[neutron] temporarly remove test migration"
Revert "[neutron] temporarly remove test migration"

This reverts commit fdb4085a0498559815b06e82529003d77e069a74.
