diff --git a/chart/templates/deployment.yaml b/chart/templates/deployment.yaml index bce41c9c..f9a7f51f 100644 --- a/chart/templates/deployment.yaml +++ b/chart/templates/deployment.yaml @@ -170,6 +170,9 @@ metadata: labels: app.kubernetes.io/component: controller-manager {{- include "vso.chart.labels" . | nindent 4 }} + {{- if .Values.controller.preDeleteHook.labels }} + {{- toYaml .Values.controller.labels | nindent 4 }} + {{- end }} annotations: # This is what defines this resource as a hook. Without this line, the # job is considered part of the release. @@ -178,6 +181,9 @@ metadata: {{- if .Values.controller.annotations }} {{- toYaml .Values.controller.annotations | nindent 4 }} {{- end }} + {{- if .Values.controller.preDeleteHook.annotations }} + {{- toYaml .Values.controller.annotations | nindent 4 }} + {{- end }} spec: backoffLimit: 5 template: diff --git a/chart/values.yaml b/chart/values.yaml index 4bd33cd4..670537e1 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -141,6 +141,14 @@ controller: # This value defines additional annotations for the deployment. This should be formatted as a YAML object (map) annotations: {} + # Controller pre-delete hook labels and annotations + preDeleteHook: + # Extra labels to attach to the pre-delete hook deployment. This should be formatted as a YAML object (map) + labels: {} + + # This value defines additional annotations for the pre-delete hook deployment. This should be formatted as a YAML object (map) + annotations: {} + # Settings related to the vault-secrets-operator container. manager: