forked from kata-containers/kata-containers
-
Notifications
You must be signed in to change notification settings - Fork 4
/
webhook.yaml
69 lines (68 loc) · 1.7 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
# Copyright (c) 2019 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0
apiVersion: apps/v1
kind: Deployment
metadata:
name: pod-annotate-webhook
labels:
app: pod-annotate-webhook
spec:
selector:
matchLabels:
app: pod-annotate-webhook
replicas: 1
template:
metadata:
labels:
app: pod-annotate-webhook
spec:
containers:
- name: pod-annotate-webhook
image: quay.io/kata-containers/kata-webhook-example:latest
imagePullPolicy: Always
env:
- name: RUNTIME_CLASS
valueFrom:
configMapKeyRef:
name: kata-webhook
key: runtime_class
optional: true
args:
- -tls-cert-file=/etc/webhook/certs/cert.pem
- -tls-key-file=/etc/webhook/certs/key.pem
- -exclude-namespaces=rook-ceph-system,rook-ceph
volumeMounts:
- name: webhook-certs
mountPath: /etc/webhook/certs
readOnly: true
resources:
requests:
cpu: "100m"
memory: "250Mi"
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
runAsNonRoot: true
runAsUser: 1000
seccompProfile:
type: RuntimeDefault
volumes:
- name: webhook-certs
secret:
secretName: pod-annotate-webhook-certs
---
apiVersion: v1
kind: Service
metadata:
name: pod-annotate-webhook
labels:
app: pod-annotate-webhook
spec:
ports:
- port: 443
targetPort: 8080
selector:
app: pod-annotate-webhook