@@ -11,38 +11,134 @@ spec:
1111 selector :
1212 matchLabels :
1313 {{- include "mb3r-otel-addon.selectorLabels" . | nindent 6 }}
14- app.kubernetes. io/component : bering
14+ mb3r. io/has-bering : " true "
1515 template :
1616 metadata :
1717 labels :
1818 {{- include "mb3r-otel-addon.selectorLabels" . | nindent 8 }}
1919 app.kubernetes.io/component : bering
20- {{- with .Values.global.commonAnnotations }}
20+ mb3r.io/has-bering : " true"
21+ {{- if and .Values.sheaft.enabled .Values.sheaft.coLocateWithBering }}
22+ mb3r.io/has-sheaft : " true"
23+ {{- end }}
24+ {{- with .Values.bering.podLabels }}
25+ {{- toYaml . | nindent 8 }}
26+ {{- end }}
27+ {{- if or .Values.global.commonAnnotations .Values.bering.podAnnotations }}
2128 annotations :
29+ {{- with .Values.global.commonAnnotations }}
30+ {{- toYaml . | nindent 8 }}
31+ {{- end }}
32+ {{- with .Values.bering.podAnnotations }}
2233 {{- toYaml . | nindent 8 }}
34+ {{- end }}
2335 {{- end }}
2436 spec :
2537 {{- with .Values.global.imagePullSecrets }}
2638 imagePullSecrets :
2739 {{- toYaml . | nindent 8 }}
2840 {{- end }}
41+ securityContext :
42+ {{- toYaml .Values.bering.podSecurityContext | nindent 8 }}
2943 containers :
3044 - name : bering
3145 image : {{ include "mb3r-otel-addon.resolveImage" (dict "root" . "image" .Values.bering.image) | quote }}
3246 imagePullPolicy : {{ .Values.bering.image.pullPolicy }}
47+ args :
48+ - serve
49+ - --config
50+ - {{ printf "/etc/bering/%s" .Values.bering.config.fileName | quote }}
51+ {{- range .Values.bering.extraArgs }}
52+ - {{ . | quote }}
53+ {{- end }}
3354 ports :
55+ - name : http
56+ containerPort : {{ .Values.bering.service.ports.http.targetPort }}
57+ protocol : TCP
58+ {{- if .Values.bering.service.ports.grpc.enabled }}
3459 - name : otlp-grpc
35- containerPort : {{ .Values.bering.service.port }}
36- - name : metrics
37- containerPort : {{ .Values.bering.service.metricsPort }}
38- {{- with .Values.bering.extraArgs }}
60+ containerPort : {{ .Values.bering.service.ports.grpc.targetPort }}
61+ protocol : TCP
62+ {{- end }}
63+ livenessProbe :
64+ httpGet :
65+ path : /healthz
66+ port : http
67+ readinessProbe :
68+ httpGet :
69+ path : /readyz
70+ port : http
71+ securityContext :
72+ {{- toYaml .Values.bering.securityContext | nindent 12 }}
73+ volumeMounts :
74+ - name : bering-config
75+ mountPath : /etc/bering
76+ readOnly : true
77+ - name : shared-artifacts
78+ mountPath : /var/lib/mb3r
79+ {{- with .Values.bering.env }}
80+ env :
81+ {{- toYaml . | nindent 12 }}
82+ {{- end }}
83+ {{- with .Values.bering.envFrom }}
84+ envFrom :
85+ {{- toYaml . | nindent 12 }}
86+ {{- end }}
87+ resources :
88+ {{- toYaml .Values.bering.resources | nindent 12 }}
89+ {{- if and .Values.sheaft.enabled .Values.sheaft.coLocateWithBering }}
90+ - name : sheaft
91+ image : {{ include "mb3r-otel-addon.resolveImage" (dict "root" . "image" .Values.sheaft.image) | quote }}
92+ imagePullPolicy : {{ .Values.sheaft.image.pullPolicy }}
3993 args :
94+ - serve
95+ - --config
96+ - {{ printf "/etc/sheaft/%s" .Values.sheaft.config.fileNames.serve | quote }}
97+ {{- range .Values.sheaft.extraArgs }}
98+ - {{ . | quote }}
99+ {{- end }}
100+ ports :
101+ - name : sheaft-http
102+ containerPort : {{ .Values.sheaft.service.port }}
103+ protocol : TCP
104+ livenessProbe :
105+ httpGet :
106+ path : /healthz
107+ port : sheaft-http
108+ readinessProbe :
109+ httpGet :
110+ path : /readyz
111+ port : sheaft-http
112+ {{- with .Values.sheaft.securityContext }}
113+ securityContext :
40114 {{- toYaml . | nindent 12 }}
41115 {{- end }}
42- {{- with .Values.bering.env }}
116+ volumeMounts :
117+ - name : sheaft-config
118+ mountPath : /etc/sheaft
119+ readOnly : true
120+ - name : shared-artifacts
121+ mountPath : /var/lib/mb3r
122+ {{- with .Values.sheaft.env }}
43123 env :
44124 {{- toYaml . | nindent 12 }}
45125 {{- end }}
126+ {{- with .Values.sheaft.envFrom }}
127+ envFrom :
128+ {{- toYaml . | nindent 12 }}
129+ {{- end }}
46130 resources :
47- {{- toYaml .Values.bering.resources | nindent 12 }}
131+ {{- toYaml .Values.sheaft.resources | nindent 12 }}
132+ {{- end }}
133+ volumes :
134+ - name : bering-config
135+ configMap :
136+ name : {{ include "mb3r-otel-addon.beringConfigMapName" . }}
137+ - name : shared-artifacts
138+ {{ include "mb3r-otel-addon.artifactVolumeSource" . | nindent 10 }}
139+ {{- if and .Values.sheaft.enabled .Values.sheaft.coLocateWithBering }}
140+ - name : sheaft-config
141+ configMap :
142+ name : {{ include "mb3r-otel-addon.sheaftConfigMapName" . }}
143+ {{- end }}
48144{{- end }}
0 commit comments