apiVersion: batch/v1
kind: Job
metadata:
  name: upgrader
  namespace: keptn
spec:
  backoffLimit: 1
  template:
    metadata:
      labels:
        app: upgrader
    spec:
      volumes:
        - name: kubectl
          emptyDir: {}
      containers:
        - name: upgrader
          image: keptn/upgrader:0.7.0
          imagePullPolicy: Always
          env:
            - name: KEPTN_VERSION
              value: "master"
            - name: MONGODB_SOURCE_URL
              value: 'mongodb://user:password@mongodb.keptn-datastore:27017/keptn'
            - name: MONGODB_TARGET_URL
              value: 'mongodb.keptn:27017/keptn'
            - name: CONFIGURATION_SERVICE_URL
              value: 'configuration-service:8080'
            - name: HELM_RELEASE_UPGRADE
              value: 'true'
            - name: HELM_CHART_URL
              value: 'https://storage.googleapis.com/keptn-installer'
      restartPolicy: Never
