forked from kubernetes-csi/external-snapshotter
-
Notifications
You must be signed in to change notification settings - Fork 3
/
webhook.yaml
51 lines (51 loc) · 1.72 KB
/
webhook.yaml
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: snapshot-validation-deployment
namespace: default # NOTE: change the namespace
labels:
app.kubernetes.io/name: snapshot-validation
spec:
replicas: 3
selector:
matchLabels:
app.kubernetes.io/name: snapshot-validation
template:
metadata:
labels:
app.kubernetes.io/name: snapshot-validation
spec:
serviceAccountName: snapshot-webhook
containers:
- name: snapshot-validation
image: registry.k8s.io/sig-storage/snapshot-validation-webhook:v8.0.1 # change the image if you wish to use your own custom validation server image
imagePullPolicy: IfNotPresent
args:
- '--tls-cert-file=/etc/snapshot-validation-webhook/certs/tls.crt'
- '--tls-private-key-file=/etc/snapshot-validation-webhook/certs/tls.key'
# uncomment the following line to enable webhook for VolumeGroupSnapshot, VolumeGroupSnapshotContent and VolumeGroupSnapshotClass.
# - '--enable-volume-group-snapshot-webhook'
ports:
- containerPort: 443 # change the port as needed
volumeMounts:
- name: snapshot-validation-webhook-certs
mountPath: /etc/snapshot-validation-webhook/certs
readOnly: true
volumes:
- name: snapshot-validation-webhook-certs
secret:
secretName: snapshot-validation-secret
---
apiVersion: v1
kind: Service
metadata:
name: snapshot-validation-service
namespace: default # NOTE: change the namespace
spec:
selector:
app.kubernetes.io/name: snapshot-validation
ports:
- protocol: TCP
port: 443 # Change if needed
targetPort: 443 # Change if the webserver image expects a different port