apiVersion: batch/v1
kind: Job
metadata:
  annotations:
    helm.sh/hook: pre-upgrade
    helm.sh/hook-delete-policy: before-hook-creation
    helm.sh/hook-weight: "10"
  labels:
    app.kubernetes.io/instance: RELEASE-NAME
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: k8ssandra
    app.kubernetes.io/part-of: k8ssandra-RELEASE-NAME-default
    helm.sh/chart: k8ssandra-1.4.1
  name: RELEASE-NAME-crd-upgrader-job-k8ssandra
spec:
  backoffLimit: 3
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: RELEASE-NAME
        app.kubernetes.io/managed-by: Helm
        app.kubernetes.io/name: k8ssandra
        app.kubernetes.io/part-of: k8ssandra-RELEASE-NAME-default
        helm.sh/chart: k8ssandra-1.4.1
    spec:
      containers:
      - args:
        - -upgradecrds
        - --targetVersion
        - 1.4.1
        env:
        - name: POD_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        image: docker.io/k8ssandra/k8ssandra-tools:latest
        imagePullPolicy: IfNotPresent
        name: crd-upgrade-job-k8ssandra
      restartPolicy: OnFailure
      serviceAccountName: RELEASE-NAME-crd-upgrader-k8ssandra
