apiVersion: batch/v1
kind: Job
metadata:
  name: secrets-store-csi-driver-upgrade-crds
  namespace: secrets-store-csi-driver
  labels:
    app.kubernetes.io/instance: "secrets-store-csi-driver"
    app.kubernetes.io/managed-by: "Helm"
    app.kubernetes.io/name: "secrets-store-csi-driver"
    app.kubernetes.io/version: "1.6.0"
    app: secrets-store-csi-driver
    helm.sh/chart: "secrets-store-csi-driver-1.6.0"
  annotations:
    helm.sh/hook: pre-install,pre-upgrade
    helm.sh/hook-weight: "10"
    helm.sh/hook-delete-policy: "hook-succeeded,before-hook-creation"
spec:
  backoffLimit: 3
  template:
    metadata:
      name: secrets-store-csi-driver-upgrade-crds
    spec:
      serviceAccountName: secrets-store-csi-driver-upgrade-crds
      restartPolicy: Never
      containers:
        - name: crds-upgrade
          image: "registry.k8s.io/csi-secrets-store/driver-crds:v1.6.0@sha256:2419b318a1c17bd741686bf1994cd37cee7162039c019435b8f534f2846fe488"
          args:
            - apply
            - -f
            - crds/
          imagePullPolicy: IfNotPresent
      nodeSelector:
        kubernetes.io/os: linux
      tolerations:
        - operator: Exists
