---
apiVersion: batch/v1
kind: Job
metadata:
  annotations:
    helm.sh/hook: post-delete
    helm.sh/hook-delete-policy: before-hook-creation,hook-succeeded,hook-failed
    helm.sh/hook-weight: "10"
  labels:
    app.kubernetes.io/component: hooks
    app.kubernetes.io/instance: kyverno
    app.kubernetes.io/part-of: kyverno
    app.kubernetes.io/version: 3.4.1
  name: kyverno-remove-configmap
  namespace: kyverno
spec:
  backoffLimit: 2
  template:
    metadata: null
    spec:
      containers:
        - command:
            - /bin/bash
            - -c
            - |-
              set -euo pipefail
              kubectl delete cm --ignore-not-found -n kyverno kyverno
          image: bitnami/kubectl:1.32.3
          imagePullPolicy: null
          name: kubectl
          resources:
            limits:
              cpu: 100m
              memory: 256Mi
            requests:
              cpu: 10m
              memory: 64Mi
          securityContext:
            allowPrivilegeEscalation: false
            capabilities:
              drop:
                - ALL
            privileged: false
            readOnlyRootFilesystem: true
            runAsGroup: 65534
            runAsNonRoot: true
            runAsUser: 65534
            seccompProfile:
              type: RuntimeDefault
      restartPolicy: Never
      serviceAccountName: kyverno-remove-configmap
