Files
external-snapshotter/deploy/kubernetes/webhook-example/admission-configuration-template
Ben Swartzlander a2666d1ea9 Fix image name for example webhook, and other nitpicks
Also bump example container versions to v3.0.0, and use
k8s.gcr.io/sig-storage instead of quay.io/k8scsi.
2020-09-22 16:40:32 -04:00

23 lines
886 B
Plaintext

apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingWebhookConfiguration
metadata:
name: "validation-webhook.snapshot.storage.k8s.io"
webhooks:
- name: "validation-webhook.snapshot.storage.k8s.io"
rules:
- apiGroups: ["snapshot.storage.k8s.io"]
apiVersions: ["v1beta1"]
operations: ["CREATE", "UPDATE"]
resources: ["volumesnapshots", "volumesnapshotcontents"]
scope: "*"
clientConfig:
service:
namespace: "default"
name: "snapshot-validation-service"
path: "/volumesnapshot"
caBundle: ${CA_BUNDLE}
admissionReviewVersions: ["v1", "v1beta1"]
sideEffects: None
failurePolicy: Ignore # We recommend switching to Fail only after successful installation of the webhook server and webhook.
timeoutSeconds: 2 # This will affect the latency and performance. Finetune this value based on your application's tolerance.