--- apiVersion: batch/v1 kind: Job metadata: name: delete-rolebinding annotations: "helm.sh/hook": pre-upgrade "helm.sh/hook-delete-policy": hook-succeeded, before-hook-creation, hook-failed spec: template: spec: serviceAccountName: cis-operator-serviceaccount nodeSelector: {{ include "linux-node-selector" . | nindent 8 }} {{- if .Values.nodeSelector }} {{ toYaml .Values.nodeSelector | indent 8 }} {{- end }} tolerations: {{ include "linux-node-tolerations" . | nindent 8 }} {{- if .Values.tolerations }} {{ toYaml .Values.tolerations | indent 8 }} {{- end }} restartPolicy: Never containers: - name: delete-binding image: "{{ template "system_default_registry" . }}{{ .Values.global.kubectl.repository }}:{{ .Values.global.kubectl.tag }}" imagePullPolicy: {{ .Values.global.imagePullPolicy }} command: ["kubectl", "delete", "clusterrolebinding", "cis-operator-rolebinding", "cis-operator-installer"] backoffLimit: 1