kubernetes-yaml/learn/learn-kubernetes-master/kiamol/ch16/admission-webhook/helm/validating-webhook/templates/validatingWebhookConfiguration.yaml

19 lines
490 B
YAML

apiVersion: admissionregistration.k8s.io/v1beta1
kind: ValidatingWebhookConfiguration
metadata:
name: servicetokenpolicy
labels:
kiamol: ch16
webhooks:
- name: servicetokenpolicy.kiamol.net
rules:
- operations: [ "CREATE", "UPDATE" ]
apiGroups: [""]
apiVersions: ["v1"]
resources: ["pods"]
clientConfig:
service:
name: admission-webhook
namespace: default
path: "/validate"
caBundle: {{ .Values.caBundle }}