apiVersion: batch/v1
kind: Job
metadata:
  annotations:
    helm.sh/hook: pre-delete
    helm.sh/hook-delete-policy: hook-succeeded,hook-failed
  labels:
    app.kubernetes.io/instance: RELEASE-NAME
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: voyager
    app.kubernetes.io/version: v14.1.0
    helm.sh/chart: voyager-v2022.01.10
  name: RELEASE-NAME-voyager-cleaner
  namespace: default
spec:
  activeDeadlineSeconds: 120
  backoffLimit: 3
  template:
    spec:
      containers:
      - command:
        - sh
        - -c
        - sleep 2; kubectl delete validatingwebhookconfigurations admission.voyager.appscode.com
          || true; kubectl delete apiservice v1alpha1.admission.voyager.appscode.com
          || true
        image: appscode/kubectl:v1.22
        imagePullPolicy: IfNotPresent
        name: kubectl
      restartPolicy: Never
      serviceAccountName: RELEASE-NAME-voyager
