-
Notifications
You must be signed in to change notification settings - Fork 106
/
deployment.yaml
101 lines (101 loc) · 3.28 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
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "ingress-monitor-controller.fullname" . }}
namespace: {{ include "ingress-monitor-controller.namespace" . }}
labels:
{{- include "ingress-monitor-controller.labels" . | nindent 4 }}
control-plane: controller-manager
{{- with .Values.deploymentAnnotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
{{- include "ingress-monitor-controller.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "ingress-monitor-controller.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "ingress-monitor-controller.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
{{- with (index .Values "kube-rbac-proxy") }}
- args:
- --secure-listen-address=0.0.0.0:8443
- --upstream=http://127.0.0.1:8080/
- --v=0
image: {{ printf "%s:%s" .image.repository .image.tag | default "gcr.io/kubebuilder/kube-rbac-proxy:v0.8.0" | quote }}
imagePullPolicy: {{ .image.pullPolicy | quote }}
name: kube-rbac-proxy
ports:
- containerPort: 8443
name: https
resources:
{{- toYaml .resources | nindent 10 }}
securityContext:
{{- toYaml .securityContext | nindent 10 }}
{{- end }}
- args:
- --health-probe-bind-address=:8081
- --metrics-bind-address=127.0.0.1:8080
- --leader-elect
command:
- /manager
env:
- name: WATCH_NAMESPACE
value: {{ .Values.watchNamespaces | quote }}
- name: CONFIG_SECRET_NAME
value: {{ default "imc-config" .Values.configSecretName }}
{{- if gt (len .Values.env) 0 }}
{{- toYaml .Values.env | nindent 8 }}
{{- end }}
{{- if gt (len .Values.envFrom) 0 }}
envFrom:
{{- toYaml .Values.envFrom | nindent 8 }}
{{- end }}
name: manager
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
livenessProbe:
httpGet:
path: /healthz
port: 8081
initialDelaySeconds: 15
periodSeconds: 20
readinessProbe:
httpGet:
path: /readyz
port: 8081
initialDelaySeconds: 5
periodSeconds: 10
resources:
{{- toYaml .Values.resources | nindent 10 }}
securityContext:
{{- toYaml .Values.securityContext | nindent 10 }}
terminationGracePeriodSeconds: 10
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
---