forked from google/k8s-digester
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeployment.yaml
108 lines (107 loc) · 3.48 KB
/
deployment.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: apps/v1
kind: Deployment
metadata:
name: digester-controller-manager
namespace: digester-system
labels:
control-plane: controller-manager
digester/operation: webhook
digester/system: 'yes'
spec:
replicas: 3 # {"$kpt-set":"replicas"}
selector:
matchLabels:
control-plane: controller-manager
digester/operation: webhook
digester/system: 'yes'
template:
metadata:
labels:
control-plane: controller-manager
digester/operation: webhook
digester/system: 'yes'
annotations:
container.seccomp.security.alpha.kubernetes.io/manager: runtime/default
prometheus.io/port: '8888' # {"$kpt-set":"metrics-port"}
spec:
serviceAccountName: digester-admin
nodeSelector:
kubernetes.io/os: linux
containers:
- name: manager
image: ko://github.com/google/k8s-digester # {"$kpt-set":"image"}
args:
- webhook
- --cert-dir=/certs # {"$kpt-set":"cert-dir-flag"}
- --disable-cert-rotation=false # {"$kpt-set":"disable-cert-rotation-flag"}
- --dry-run=false # {"$kpt-set":"dry-run-flag"}
- --health-addr=:9090 # {"$kpt-set":"health-addr-flag"}
- --metrics-addr=:8888 # {"$kpt-set":"metrics-addr-flag"}
- --offline=false # {"$kpt-set":"offline-flag"}
- --port=8443 # {"$kpt-set":"port-flag"}
ports:
- name: webhook-server
protocol: TCP
containerPort: 8443 # {"$kpt-set":"port"}
- name: metrics
protocol: TCP
containerPort: 8888 # {"$kpt-set":"metrics-port"}
- name: healthz
protocol: TCP
containerPort: 9090 # {"$kpt-set":"health-port"}
env:
- name: DEBUG
value: 'false' # {"$kpt-set":"debug"}
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: POD_NAMESPACE
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
resources:
requests:
cpu: 100m # {"$kpt-set":"request-cpu"}
ephemeral-storage: 256Mi # {"$kpt-set":"request-ephemeral-storage"}
memory: 256Mi # {"$kpt-set":"request-memory"}
volumeMounts:
- name: cert
readOnly: true
mountPath: /certs # {"$kpt-set":"cert-dir"}
livenessProbe:
httpGet:
port: healthz
path: /healthz
readinessProbe:
httpGet:
port: healthz
path: /readyz
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- all
readOnlyRootFilesystem: true
runAsGroup: 65532
runAsNonRoot: true
runAsUser: 65532
volumes:
- name: cert
secret:
defaultMode: 420
secretName: digester-webhook-server-cert