38 lines
1.2 KiB
YAML
38 lines
1.2 KiB
YAML
apiVersion: admissionregistration.k8s.io/v1
|
|
kind: ValidatingWebhookConfiguration
|
|
metadata:
|
|
name: {{ template "k8s-triliovault-operator.name" . }}-ns-validating-webhook-configuration
|
|
labels:
|
|
app.kubernetes.io/part-of: {{ template "k8s-triliovault-operator.appName" . }}
|
|
app.kubernetes.io/name: {{ template "k8s-triliovault-operator.appName" . }}
|
|
app.kubernetes.io/instance: {{ template "k8s-triliovault-operator.appName" . }}-ns-validating-webhook-configuration
|
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
|
webhooks:
|
|
- clientConfig:
|
|
caBundle: Cg==
|
|
service:
|
|
name: {{ template "k8s-triliovault-operator.fullname" . }}-webhook-service
|
|
namespace: {{ .Release.Namespace }}
|
|
path: /validate-core-v1-namespace
|
|
failurePolicy: Fail
|
|
name: v1-tvm-ns-validation.trilio.io
|
|
namespaceSelector:
|
|
matchExpressions:
|
|
- key: trilio-operator-label
|
|
operator: In
|
|
values:
|
|
- {{ .Release.Namespace }}
|
|
rules:
|
|
- apiGroups:
|
|
- ""
|
|
apiVersions:
|
|
- v1
|
|
operations:
|
|
- DELETE
|
|
resources:
|
|
- namespaces
|
|
scope: '*'
|
|
sideEffects: None
|
|
admissionReviewVersions:
|
|
- v1
|