Skip to content

Commit c5964fc

Browse files
authored
[Helm] add affinity (#1131)
add affinity for ingest nodes also
1 parent cdfe4a0 commit c5964fc

File tree

3 files changed

+23
-2
lines changed

3 files changed

+23
-2
lines changed

helm/templates/ingestor-statefulset.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ metadata:
1818
name: {{ include "parseable.fullname" . }}-ingestor
1919
namespace: {{ .Release.Namespace }}
2020
labels:
21-
{{- include "parseable.ingestorLabels" . | nindent 4 }}
21+
{{- with .Values.parseable.highAvailability.ingestor.extraLabels }}
22+
{{- toYaml . | nindent 4 }}
23+
{{- end }}
2224
spec:
2325
selector:
2426
matchLabels:
@@ -32,6 +34,10 @@ spec:
3234
{{- .Values.parseable.highAvailability.ingestor.labels | toYaml | nindent 8 }}
3335
{{- include "parseable.ingestorLabelsSelector" . | nindent 8 }}
3436
spec:
37+
{{- with .Values.parseable.highAvailability.ingestor.affinity }}
38+
affinity:
39+
{{- toYaml . | nindent 8 }}
40+
{{- end }}
3541
initContainers:
3642
- name: wait-for-query-service
3743
image: curlimages/curl:latest # Lightweight image with curl

helm/templates/querier-statefulset.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ spec:
4141
tolerations:
4242
{{ toYaml . | nindent 8 }}
4343
{{- end }}
44+
{{- with .Values.parseable.nodeSelector }}
45+
nodeSelector:
46+
{{- toYaml . | nindent 8 }}
47+
{{- end }}
4448
containers:
4549
- name: {{ .Chart.Name }}
4650
securityContext:

helm/values.yaml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,17 @@ parseable:
1010
highAvailability:
1111
enabled: false
1212
ingestor:
13+
affinity: {}
14+
# podAntiAffinity:
15+
# requiredDuringSchedulingIgnoredDuringExecution:
16+
# - labelSelector:
17+
# matchLabels:
18+
# app: parseable
19+
# component: ingestor
20+
# topologyKey: kubernetes.io/hostname
1321
port: 8000
22+
extraLabels:
23+
app: parseable
1424
podAnnotations: {}
1525
nodeSelector: {}
1626
tolerations: []
@@ -61,7 +71,7 @@ parseable:
6171
## Note that Data directory is needed only for local mode
6272
persistence:
6373
staging:
64-
enabled: false
74+
enabled: true
6575
storageClass: ""
6676
accessMode: ReadWriteOnce
6777
size: 5Gi
@@ -146,6 +156,7 @@ parseable:
146156
create: true
147157
name: "parseable"
148158
annotations: {}
159+
nodeSelector: {}
149160
service:
150161
type: ClusterIP
151162
port: 80

0 commit comments

Comments
 (0)