Skip to content

Commit

Permalink
[Helm] add affinity (#1131)
Browse files Browse the repository at this point in the history
add affinity for ingest nodes also
  • Loading branch information
AdheipSingh authored Jan 23, 2025
1 parent cdfe4a0 commit c5964fc
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
8 changes: 7 additions & 1 deletion helm/templates/ingestor-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ metadata:
name: {{ include "parseable.fullname" . }}-ingestor
namespace: {{ .Release.Namespace }}
labels:
{{- include "parseable.ingestorLabels" . | nindent 4 }}
{{- with .Values.parseable.highAvailability.ingestor.extraLabels }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
selector:
matchLabels:
Expand All @@ -32,6 +34,10 @@ spec:
{{- .Values.parseable.highAvailability.ingestor.labels | toYaml | nindent 8 }}
{{- include "parseable.ingestorLabelsSelector" . | nindent 8 }}
spec:
{{- with .Values.parseable.highAvailability.ingestor.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
initContainers:
- name: wait-for-query-service
image: curlimages/curl:latest # Lightweight image with curl
Expand Down
4 changes: 4 additions & 0 deletions helm/templates/querier-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ spec:
tolerations:
{{ toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.parseable.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
securityContext:
Expand Down
13 changes: 12 additions & 1 deletion helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,17 @@ parseable:
highAvailability:
enabled: false
ingestor:
affinity: {}
# podAntiAffinity:
# requiredDuringSchedulingIgnoredDuringExecution:
# - labelSelector:
# matchLabels:
# app: parseable
# component: ingestor
# topologyKey: kubernetes.io/hostname
port: 8000
extraLabels:
app: parseable
podAnnotations: {}
nodeSelector: {}
tolerations: []
Expand Down Expand Up @@ -61,7 +71,7 @@ parseable:
## Note that Data directory is needed only for local mode
persistence:
staging:
enabled: false
enabled: true
storageClass: ""
accessMode: ReadWriteOnce
size: 5Gi
Expand Down Expand Up @@ -146,6 +156,7 @@ parseable:
create: true
name: "parseable"
annotations: {}
nodeSelector: {}
service:
type: ClusterIP
port: 80
Expand Down

0 comments on commit c5964fc

Please sign in to comment.