-
Notifications
You must be signed in to change notification settings - Fork 30
Expand file tree
/
Copy pathcontroller-manager-deployment.yaml
More file actions
106 lines (106 loc) · 4.27 KB
/
controller-manager-deployment.yaml
File metadata and controls
106 lines (106 loc) · 4.27 KB
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
apiVersion: apps/v1
kind: Deployment
metadata:
name: function-mesh-controller-manager
namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/name: {{ template "function-mesh-operator.name" . }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: controller-manager
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
spec:
replicas: {{ .Values.controllerManager.replicas }}
selector:
matchLabels:
app.kubernetes.io/name: {{ template "function-mesh-operator.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: controller-manager
template:
metadata:
labels:
app.kubernetes.io/name: {{ template "function-mesh-operator.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: controller-manager
annotations:
prometheus.io/scrape: "true"
prometheus.io/path: "/metrics"
prometheus.io/port: "{{ .Values.controllerManager.metrics.port }}"
traffic.sidecar.istio.io/excludeInboundPorts: '9443,8443'
spec:
{{- if .Values.controllerManager.serviceAccount }}
serviceAccount: {{ .Values.controllerManager.serviceAccount }}
{{- end }}
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{ toYaml .Values.imagePullSecrets | indent 6 }}
{{- end }}
containers:
- name: function-mesh-operator
image: {{ .Values.operatorImage }}
imagePullPolicy: {{ .Values.imagePullPolicy | default "IfNotPresent" }}
{{- if .Values.controllerManager.resources }}
resources:
{{ toYaml .Values.controllerManager.resources | indent 12 }}
{{- end }}
ports:
{{- if .Values.admissionWebhook.enabled }}
- containerPort: 9443
name: webhook-server
protocol: TCP
{{- end}}
- containerPort: {{ .Values.controllerManager.metrics.port }}
name: http-metrics
protocol: TCP
command:
- /manager
args:
- --enable-leader-election={{ .Values.controllerManager.enableLeaderElection }}
- --enable-pprof={{ .Values.controllerManager.pprof.enable }}
- --metrics-addr=:{{ .Values.controllerManager.metrics.port }}
- --health-probe-addr=:{{ .Values.controllerManager.healthProbe.port }}
- --pprof-addr=:{{ .Values.controllerManager.pprof.port }}
- --config-file={{ .Values.controllerManager.configFile }}
- --enable-init-containers={{ .Values.controllerManager.enableInitContainers }}
- --global-backend-config={{ .Values.controllerManager.globalBackendConfig }}
- --global-backend-config-namespace={{ .Values.controllerManager.globalBackendConfigNamespace }}
- --namespaced-backend-config={{ .Values.controllerManager.namespacedBackendConfig }}
- --add-default-affinity={{ .Values.controllerManager.addDefaultAffinity }}
env:
- name: NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: ENABLE_WEBHOOKS
value: {{ .Values.admissionWebhook.enabled | quote }}
volumeMounts:
{{- include "function-mesh-operator.volumeMounts" . | nindent 8 }}
livenessProbe:
httpGet:
path: /healthz
port: {{ .Values.controllerManager.healthProbe.port }}
initialDelaySeconds: 15
periodSeconds: 20
readinessProbe:
httpGet:
path: /readyz
port: {{ .Values.controllerManager.healthProbe.port }}
initialDelaySeconds: 5
periodSeconds: 10
{{- with .Values.controllerManager.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.controllerManager.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.controllerManager.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
{{- if .Values.controllerManager.priorityClassName }}
priorityClassName: {{ .Values.controllerManager.priorityClassName }}
{{- end }}
volumes:
{{- include "function-mesh-operator.volumes" . | nindent 6 -}}