forked from kyma-project/kyma
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeployment.yaml
96 lines (96 loc) · 4.13 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
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "operator.fullname" . }}
labels:
{{- include "operator.labels" . | nindent 4 }}
{{- toYaml .Values.extraLabels | nindent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
{{- include "operator.selectorLabels" . | nindent 6 }}
{{- toYaml .Values.extraLabels | nindent 6 }}
template:
metadata:
annotations:
sidecar.istio.io/inject: "false"
labels:
{{- include "operator.selectorLabels" . | nindent 8 }}
{{- toYaml .Values.extraLabels | nindent 8 }}
spec:
serviceAccountName: {{ include "operator.serviceAccountName" . }}
terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }}
{{- if .Values.priorityClassName }}
priorityClassName: {{ .Values.priorityClassName }}
{{- end }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- command:
- /manager
args:
- --cert-dir=/tmp
- --manager-namespace=$(MY_POD_NAMESPACE)
- --fluent-bit-filesystem-buffer-limit={{ .Values.filesystemBufferLimit }}
- --fluent-bit-cpu-limit={{ .Values.fluentbit.resources.limits.cpu }}
- --fluent-bit-memory-limit={{ .Values.fluentbit.resources.limits.memory }}
- --fluent-bit-cpu-request={{ .Values.fluentbit.resources.requests.cpu }}
- --fluent-bit-memory-request={{ .Values.fluentbit.resources.requests.memory }}
- --fluent-bit-denied-filter-plugins={{ join "," .Values.deniedPlugins.filter}}
- --fluent-bit-denied-output-plugins={{ join "," .Values.deniedPlugins.output}}
- --fluent-bit-max-pipelines={{.Values.maxLogPipelines}}
- --fluent-bit-image={{ include "imageurl" (dict "reg" .Values.global.containerRegistry "img" .Values.global.images.fluent_bit) }}
- --fluent-bit-exporter-image={{ include "imageurl" (dict "reg" .Values.global.containerRegistry "img" .Values.global.images.directory_size_exporter) }}
- --validating-webhook-enabled={{ .Values.webhook.enabled }}
- --enable-telemetry-manager-module=false
{{- if .Values.highPriorityClassName }}
- --fluent-bit-priority-class-name={{ .Values.highPriorityClassName }}
{{- end }}
{{- if not .Values.controllers.logging.enabled }}
- --enable-logging=false
{{- end }}
{{- if not .Values.controllers.tracing.enabled }}
- --enable-tracing=false
{{- else }}
- --enable-tracing=true
- --trace-collector-image={{ include "imageurl" (dict "reg" .Values.global.containerRegistry "img" .Values.global.images.telemetry_otel_collector) }}
{{- if .Values.priorityClassName }}
- --trace-collector-priority-class={{ .Values.priorityClassName }}
{{- end }}
{{- end }}
{{- if not .Values.controllers.metrics.enabled }}
- --enable-metrics=false
{{- else }}
{{- if .Values.priorityClassName }}
- --metric-gateway-priority-class={{ .Values.priorityClassName }}
{{- end }}
{{- end }}
name: manager
ports:
- containerPort: 9443
protocol: TCP
name: webook
- containerPort: 8081
protocol: TCP
name: health
- containerPort: 8080
protocol: TCP
name: metrics
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ include "imageurl" (dict "reg" .Values.global.containerRegistry "img" .Values.global.images.telemetry_operator) }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
livenessProbe:
{{- toYaml .Values.livenessProbe | nindent 12 }}
readinessProbe:
{{- toYaml .Values.readinessProbe | nindent 12 }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
env:
- name: APP_LOG_LEVEL
value: {{ .Values.global.log.level | quote }}
- name: MY_POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace