-
Notifications
You must be signed in to change notification settings - Fork 220
/
deployment.yaml
103 lines (103 loc) · 3.75 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
{{- if gt (int .Values.operator.replicas) 0 }}
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app.kubernetes.io/component: operator
{{- include "keda-http-add-on.labels" . | indent 4 }}
name: {{ .Chart.Name }}-controller-manager
namespace: {{ .Release.Namespace }}
spec:
replicas: {{ .Values.operator.replicas }}
selector:
matchLabels:
app.kubernetes.io/component: operator
{{- include "keda-http-add-on.matchLabels" . | indent 6 }}
template:
metadata:
labels:
app.kubernetes.io/component: operator
{{- include "keda-http-add-on.labels" . | indent 8 }}
spec:
imagePullSecrets:
{{- toYaml .Values.operator.imagePullSecrets | nindent 8 }}
serviceAccountName: {{ .Chart.Name }}
{{- if .Values.podSecurityContext.operator }}
securityContext:
{{- toYaml .Values.podSecurityContext.operator | nindent 8 }}
{{- else }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- end }}
containers:
- args:
- --secure-listen-address=0.0.0.0:{{ .Values.operator.port | default 8443 }}
- --upstream=http://127.0.0.1:8080/
- --logtostderr=true
- --v={{ .Values.logging.operator.kubeRbacProxy.level }}
image: "{{ .Values.images.kubeRbacProxy.name }}:{{ .Values.images.kubeRbacProxy.tag }}"
name: kube-rbac-proxy
resources:
{{- toYaml .Values.operator.kubeRbacProxy.resources | nindent 10 }}
{{- if .Values.securityContext.kuberbacproxy }}
securityContext:
{{- toYaml .Values.securityContext.kuberbacproxy | nindent 10 }}
{{- else }}
securityContext:
{{- toYaml .Values.securityContext | nindent 10 }}
{{- end }}
- args:
- --metrics-bind-address=127.0.0.1:8080
- --leader-elect
- --zap-log-level={{ .Values.logging.operator.level }}
- --zap-time-encoding={{ .Values.logging.operator.timeEncoding }}
- --zap-encoder={{ .Values.logging.operator.format }}
image: "{{ .Values.images.operator }}:{{ .Values.images.tag | default .Chart.AppVersion }}"
imagePullPolicy: '{{ .Values.operator.pullPolicy | default "Always" }}'
name: "{{ .Chart.Name }}-operator"
env:
- name: KEDAHTTP_OPERATOR_EXTERNAL_SCALER_SERVICE
value: "{{ .Chart.Name }}-{{ .Values.scaler.service }}"
- name: KEDAHTTP_OPERATOR_EXTERNAL_SCALER_PORT
value: "{{ default 9090 .Values.scaler.grpcPort }}"
- name: KEDA_HTTP_OPERATOR_NAMESPACE
value: "{{ .Release.Namespace }}"
- name: KEDA_HTTP_OPERATOR_WATCH_NAMESPACE
value: "{{ .Values.operator.watchNamespace }}"
ports:
- name: metrics
containerPort: 8080
- name: probes
containerPort: 8081
livenessProbe:
httpGet:
path: /healthz
port: probes
readinessProbe:
httpGet:
path: /readyz
port: probes
resources:
{{- toYaml .Values.operator.resources | nindent 10 }}
{{- if .Values.securityContext.operator }}
securityContext:
{{- toYaml .Values.securityContext.operator | nindent 10 }}
{{- else }}
securityContext:
{{- toYaml .Values.securityContext | nindent 10 }}
{{- end }}
terminationGracePeriodSeconds: 10
nodeSelector:
kubernetes.io/os: linux
{{- with .Values.operator.nodeSelector }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.operator.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.operator.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}