From 1c4a3c507372e6b118c0033016a19afeabbcde54 Mon Sep 17 00:00:00 2001 From: AdheipSingh Date: Wed, 22 Jan 2025 15:53:48 +0530 Subject: [PATCH] add affinity --- helm/templates/ingestor-statefulset.yaml | 8 +++++++- helm/templates/querier-statefulset.yaml | 4 ++++ helm/values.yaml | 13 ++++++++++++- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/helm/templates/ingestor-statefulset.yaml b/helm/templates/ingestor-statefulset.yaml index af6173189..9773a1242 100644 --- a/helm/templates/ingestor-statefulset.yaml +++ b/helm/templates/ingestor-statefulset.yaml @@ -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: @@ -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 diff --git a/helm/templates/querier-statefulset.yaml b/helm/templates/querier-statefulset.yaml index e6f9f336c..31333a189 100644 --- a/helm/templates/querier-statefulset.yaml +++ b/helm/templates/querier-statefulset.yaml @@ -41,6 +41,10 @@ spec: tolerations: {{ toYaml . | nindent 8 }} {{- end }} + {{- with .Values.parseable.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} containers: - name: {{ .Chart.Name }} securityContext: diff --git a/helm/values.yaml b/helm/values.yaml index b3b2afb63..2bbf90cf7 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -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: [] @@ -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 @@ -146,6 +156,7 @@ parseable: create: true name: "parseable" annotations: {} + nodeSelector: {} service: type: ClusterIP port: 80