Files
external-snapshotter/deploy/kubernetes/webhook-example/webhook.yaml
Niels de Vos 926df0c8c4 add "document-start" 1st line to all yaml files
The YAML Specification requires three daashes `---` as marker for the
start of a content block. That means, each YAML file needs to start with
`---` on the first line (or after initial comments).

See-also: https://yaml.org/
2023-05-25 18:13:50 +02:00

48 lines
1.4 KiB
YAML

---
apiVersion: apps/v1
kind: Deployment
metadata:
name: snapshot-validation-deployment
namespace: default # NOTE: change the namespace
labels:
app: snapshot-validation
spec:
replicas: 3
selector:
matchLabels:
app: snapshot-validation
template:
metadata:
labels:
app: snapshot-validation
spec:
serviceAccountName: snapshot-webhook
containers:
- name: snapshot-validation
image: registry.k8s.io/sig-storage/snapshot-validation-webhook:v6.2.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']
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: snapshot-validation
ports:
- protocol: TCP
port: 443 # Change if needed
targetPort: 443 # Change if the webserver image expects a different port