-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathwebhook.yaml
71 lines (70 loc) · 1.69 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
name: selfsigned-issuer
namespace: hostpath-provisioner
spec:
selfSigned: {}
---
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
namespace: hostpath-provisioner
name: hostpath-provisioner-operator-webhook-service-cert
labels:
name: hostpath-provisioner-operator
spec:
secretName: hostpath-provisioner-operator-webhook-service-cert
dnsNames:
- hostpath-provisioner-operator-webhook-service.hostpath-provisioner.svc
issuerRef:
name: selfsigned-issuer
---
apiVersion: v1
kind: Service
metadata:
name: hostpath-provisioner-operator-webhook-service
namespace: hostpath-provisioner
spec:
ports:
- port: 443
protocol: TCP
targetPort: 9443
selector:
name: hostpath-provisioner-operator
---
apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingWebhookConfiguration
metadata:
name: hostpathprovisioner.kubevirt.io
annotations:
cert-manager.io/inject-ca-from: hostpath-provisioner/hostpath-provisioner-operator-webhook-service-cert
labels:
name: hostpath-provisioner-operator
webhooks:
- admissionReviewVersions:
- v1beta1
clientConfig:
service:
name: hostpath-provisioner-operator-webhook-service
namespace: hostpath-provisioner
path: /validate-hostpathprovisioner-kubevirt-io-v1beta1-hostpathprovisioner
port: 443
failurePolicy: Fail
matchPolicy: Equivalent
name: validate-hostpath-provisioner.kubevirt.io
objectSelector: {}
rules:
- apiGroups:
- hostpathprovisioner.kubevirt.io
apiVersions:
- v1beta1
operations:
- CREATE
- DELETE
- UPDATE
resources:
- "*/*"
scope: '*'
sideEffects: None
timeoutSeconds: 30