1+ {{- if .Values.enableStandaloneCompactors }}
2+ apiVersion : apps/v1
3+ kind : Deployment
4+ metadata :
5+ name : {{ include "quickwit.fullname" . }}-compactor
6+ labels :
7+ {{- include "quickwit.labels" . | nindent 4 }}
8+ annotations :
9+ {{- with .Values.annotations }}
10+ {{- toYaml . | nindent 4 }}
11+ {{- end }}
12+ {{- with .Values.compactor.annotations }}
13+ {{- toYaml . | nindent 4 }}
14+ {{- end }}
15+ spec :
16+ replicas : {{ .Values.compactor.replicaCount }}
17+ selector :
18+ matchLabels :
19+ {{- include "quickwit.compactor.selectorLabels" . | nindent 6 }}
20+ strategy : {{- toYaml .Values.compactor.strategy | nindent 4 }}
21+ template :
22+ metadata :
23+ annotations :
24+ checksum/config : {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
25+ {{- with .Values.podAnnotations }}
26+ {{- toYaml . | nindent 8 }}
27+ {{- end }}
28+ {{- with .Values.compactor.podAnnotations }}
29+ {{- toYaml . | nindent 8 }}
30+ {{- end }}
31+ labels :
32+ {{- include "quickwit.additionalLabels" . | nindent 8 }}
33+ {{- include "quickwit.compactor.selectorLabels" . | nindent 8 }}
34+ spec :
35+ {{- with .Values.imagePullSecrets }}
36+ imagePullSecrets :
37+ {{- toYaml . | nindent 8 }}
38+ {{- end }}
39+ serviceAccountName : {{ include "quickwit.serviceAccountName" . }}
40+ securityContext :
41+ {{- toYaml .Values.podSecurityContext | nindent 8 }}
42+ {{- with .Values.compactor.initContainers }}
43+ initContainers :
44+ {{- toYaml . | nindent 8 }}
45+ {{ end }}
46+ containers :
47+ - name : {{ .Chart.Name }}
48+ securityContext :
49+ {{- toYaml .Values.securityContext | nindent 12 }}
50+ image : " {{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
51+ imagePullPolicy : {{ .Values.image.pullPolicy }}
52+ {{- if $.Values.compactor.args }}
53+ args : {{- toYaml $.Values.compactor.args | nindent 10 }}
54+ {{- else }}
55+ args : ["run", "--service", "compactor"]
56+ {{- end }}
57+ env :
58+ {{- include "quickwit.environment" . | nindent 12 }}
59+ {{- with (include "quickwit.extraEnv" .Values.compactor.extraEnv) }}
60+ {{- . | nindent 12 }}
61+ {{- end }}
62+ {{- if or (.Values.environmentFrom) (.Values.compactor.extraEnvFrom) }}
63+ envFrom :
64+ {{- with .Values.environmentFrom }}
65+ {{- toYaml . | nindent 12 }}
66+ {{- end }}
67+ {{- with .Values.compactor.extraEnvFrom }}
68+ {{- toYaml . | nindent 12 }}
69+ {{- end }}
70+ {{- end }}
71+ ports :
72+ {{- include "quickwit.ports" . | nindent 12 }}
73+ startupProbe :
74+ {{- toYaml .Values.compactor.startupProbe | nindent 12 }}
75+ livenessProbe :
76+ {{- toYaml .Values.compactor.livenessProbe | nindent 12 }}
77+ readinessProbe :
78+ {{- toYaml .Values.compactor.readinessProbe | nindent 12 }}
79+ volumeMounts :
80+ - name : config
81+ mountPath : /quickwit/node.yaml
82+ subPath : node.yaml
83+ - name : data
84+ mountPath : /quickwit/qwdata
85+ {{- range .Values.configMaps }}
86+ - name : {{ .name }}
87+ mountPath : {{ .mountPath }}
88+ {{- end }}
89+ {{- with concat (.Values.volumeMounts | default list) (.Values.compactor.extraVolumeMounts | default list) }}
90+ {{- toYaml . | nindent 12 }}
91+ {{- end }}
92+ resources :
93+ {{- toYaml .Values.compactor.resources | nindent 12 }}
94+ {{- if .Values.compactor.lifecycleHooks }}
95+ lifecycle :
96+ {{- toYaml .Values.compactor.lifecycleHooks | nindent 12 }}
97+ {{- end }}
98+ terminationGracePeriodSeconds : {{ .Values.compactor.terminationGracePeriodSeconds }}
99+ volumes :
100+ - name : config
101+ configMap :
102+ name : {{ template "quickwit.fullname" . }}
103+ items :
104+ - key : node.yaml
105+ path : node.yaml
106+ - name : data
107+ emptyDir : {}
108+ {{- range .Values.configMaps }}
109+ - name : {{ .name }}
110+ configMap :
111+ name : {{ .name }}
112+ {{- end }}
113+ {{- with concat (.Values.volumes | default list) (.Values.compactor.extraVolumes | default list) }}
114+ {{- toYaml . | nindent 8 }}
115+ {{- end }}
116+ {{- with .Values.compactor.nodeSelector }}
117+ nodeSelector :
118+ {{- toYaml . | nindent 8 }}
119+ {{- end }}
120+ {{- with merge (dict) .Values.compactor.affinity .Values.affinity }}
121+ affinity :
122+ {{- toYaml . | nindent 8 }}
123+ {{- end }}
124+ {{- $tolerations := concat .Values.tolerations .Values.compactor.tolerations | compact | uniq }}
125+ tolerations :
126+ {{- toYaml $tolerations | nindent 8 }}
127+ {{- if .Values.compactor.runtimeClassName }}
128+ runtimeClassName : {{ .Values.compactor.runtimeClassName | quote }}
129+ {{- end }}
130+ {{- $tsc := concat .Values.topologySpreadConstraints .Values.compactor.topologySpreadConstraints | compact }}
131+ {{- if $tsc }}
132+ topologySpreadConstraints :
133+ {{- toYaml $tsc | nindent 8 }}
134+ {{- end }}
135+ {{- end }}
0 commit comments