1 {{- if and .Values.prometheusOperator.admissionWebhooks.enabled .Values.prometheusOperator.admissionWebhooks.patch.enabled }}
5 name: {{ template "prometheus-operator.fullname" . }}-admission-create
6 namespace: {{ template "prometheus-operator.namespace" . }}
8 "helm.sh/hook": pre-install,pre-upgrade
9 "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
11 app: {{ template "prometheus-operator.name" $ }}-admission-create
12 {{- include "prometheus-operator.labels" $ | indent 4 }}
14 {{- if .Capabilities.APIVersions.Has "batch/v1alpha1" }}
15 # Alpha feature since k8s 1.12
16 ttlSecondsAfterFinished: 0
20 name: {{ template "prometheus-operator.fullname" . }}-admission-create
21 {{- with .Values.prometheusOperator.admissionWebhooks.patch.podAnnotations }}
23 {{ toYaml . | indent 8 }}
26 app: {{ template "prometheus-operator.name" $ }}-admission-create
27 {{- include "prometheus-operator.labels" $ | indent 8 }}
29 {{- if .Values.prometheusOperator.admissionWebhooks.patch.priorityClassName }}
30 priorityClassName: {{ .Values.prometheusOperator.admissionWebhooks.patch.priorityClassName }}
34 image: {{ .Values.prometheusOperator.admissionWebhooks.patch.image.repository }}:{{ .Values.prometheusOperator.admissionWebhooks.patch.image.tag }}
35 imagePullPolicy: {{ .Values.prometheusOperator.admissionWebhooks.patch.image.pullPolicy }}
38 - --host={{ template "prometheus-operator.operator.fullname" . }},{{ template "prometheus-operator.operator.fullname" . }}.{{ template "prometheus-operator.namespace" . }}.svc
39 - --namespace={{ template "prometheus-operator.namespace" . }}
40 - --secret-name={{ template "prometheus-operator.fullname" . }}-admission
42 {{ toYaml .Values.prometheusOperator.admissionWebhooks.patch.resources | indent 12 }}
43 restartPolicy: OnFailure
44 serviceAccountName: {{ template "prometheus-operator.fullname" . }}-admission
45 {{- with .Values.prometheusOperator.admissionWebhooks.patch.nodeSelector }}
47 {{ toYaml . | indent 8 }}
49 {{- with .Values.prometheusOperator.admissionWebhooks.patch.affinity }}
51 {{ toYaml . | indent 8 }}
53 {{- with .Values.prometheusOperator.admissionWebhooks.patch.tolerations }}
55 {{ toYaml . | indent 8 }}