blob: 3d26f46798d8ed45e1afafded333730715c2507e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
{{- if and .Values.prometheusOperator.admissionWebhooks.enabled }}
apiVersion: admissionregistration.k8s.io/v1beta1
kind: ValidatingWebhookConfiguration
metadata:
name: {{ template "prometheus-operator.fullname" . }}-admission
labels:
app: {{ template "prometheus-operator.name" $ }}-admission
{{- include "prometheus-operator.labels" $ | indent 4 }}
webhooks:
- name: prometheusrulemutate.monitoring.coreos.com
{{- if .Values.prometheusOperator.admissionWebhooks.patch.enabled }}
failurePolicy: Ignore
{{- else }}
failurePolicy: {{ .Values.prometheusOperator.admissionWebhooks.failurePolicy }}
{{- end }}
rules:
- apiGroups:
- monitoring.coreos.com
apiVersions:
- "*"
resources:
- prometheusrules
operations:
- CREATE
- UPDATE
clientConfig:
service:
namespace: {{ template "prometheus-operator.namespace" . }}
name: {{ template "prometheus-operator.operator.fullname" $ }}
path: /admission-prometheusrules/validate
{{- end }}
|