From 7e15253ad0335e65176c3a43e66f8cf4517ccf02 Mon Sep 17 00:00:00 2001 From: AdheipSingh Date: Sun, 20 Oct 2024 12:02:51 +0530 Subject: [PATCH 1/5] aks helm distributed --- helm/templates/ingestor-statefulset.yaml | 13 ++++++++++- helm/templates/querier-statefulset.yaml | 23 ++++++++++++++----- helm/templates/standalone-deployment.yaml | 27 ++++++++++++++++------- helm/values.yaml | 15 +++++++++++++ 4 files changed, 63 insertions(+), 15 deletions(-) diff --git a/helm/templates/ingestor-statefulset.yaml b/helm/templates/ingestor-statefulset.yaml index 48b69d960..9628717fd 100644 --- a/helm/templates/ingestor-statefulset.yaml +++ b/helm/templates/ingestor-statefulset.yaml @@ -42,7 +42,7 @@ spec: imagePullPolicy: {{ .Values.parseable.image.pullPolicy }} args: - /usr/bin/parseable - - s3-store + - {{ .Values.parseable.objectStore }} - --ingestor-endpoint=$(HOSTNAME).{{ include "parseable.fullname" . }}-ingestor-headless.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.parseable.highAvailability.ingestor.port }} env: {{- range $key, $value := .Values.parseable.highAvailability.ingestor.env }} @@ -65,6 +65,17 @@ spec: key: {{ $key }} {{- end }} {{- end }} + {{- range $secret := .Values.parseable.blobModeSecret }} + {{- range $key := $secret.keys }} + {{- $envPrefix := $secret.prefix | default "" | upper }} + {{- $envKey := $key | upper | replace "." "_" | replace "-" "_" }} + - name: {{ $envPrefix }}{{ $envKey }} + valueFrom: + secretKeyRef: + name: {{ $secret.name }} + key: {{ $key }} + {{- end }} + {{- end }} - name: P_MODE value: "ingest" ports: diff --git a/helm/templates/querier-statefulset.yaml b/helm/templates/querier-statefulset.yaml index 4d6187548..ea4972874 100644 --- a/helm/templates/querier-statefulset.yaml +++ b/helm/templates/querier-statefulset.yaml @@ -45,8 +45,13 @@ spec: imagePullPolicy: {{ .Values.parseable.image.pullPolicy }} args: - /usr/bin/parseable - - s3-store + - {{ .Values.parseable.objectStore }} env: + - name: HOSTNAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.name {{- range $key, $value := .Values.parseable.env }} - name: {{ $key }} value: {{ tpl $value $ | quote }} @@ -60,11 +65,6 @@ spec: secretKeyRef: name: {{ $secret.name }} key: {{ $key }} - - name: HOSTNAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.name {{- end }} {{- end }} - name: P_MODE @@ -73,6 +73,17 @@ spec: - name: P_HOT_TIER_DIR value: "/parseable/hot-tier" {{- end }} + {{- range $secret := .Values.parseable.blobModeSecret }} + {{- range $key := $secret.keys }} + {{- $envPrefix := $secret.prefix | default "" | upper }} + {{- $envKey := $key | upper | replace "." "_" | replace "-" "_" }} + - name: {{ $envPrefix }}{{ $envKey }} + valueFrom: + secretKeyRef: + name: {{ $secret.name }} + key: {{ $key }} + {{- end }} + {{- end }} ports: - containerPort: 8000 {{- with .Values.readinessProbe }} diff --git a/helm/templates/standalone-deployment.yaml b/helm/templates/standalone-deployment.yaml index 860bf1712..d87267f52 100644 --- a/helm/templates/standalone-deployment.yaml +++ b/helm/templates/standalone-deployment.yaml @@ -39,9 +39,14 @@ spec: {{- if .Values.parseable.local }} args: ["/usr/bin/parseable", "local-store"] {{- else }} - args: ["/usr/bin/parseable", "s3-store"] + args: ["/usr/bin/parseable", {{ .Values.parseable.objectStore | quote }}] {{- end }} env: + - name: HOSTNAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.name {{- range $key, $value := .Values.parseable.env }} - name: {{ $key }} value: {{ tpl $value $ | quote }} @@ -56,14 +61,9 @@ spec: secretKeyRef: name: {{ $secret.name }} key: {{ $key }} - - name: HOSTNAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.name {{- end }} {{- end }} - {{- else}} + {{- else }} {{- range $secret := .Values.parseable.s3ModeSecret }} {{- range $key := $secret.keys }} {{- $envPrefix := $secret.prefix | default "" | upper }} @@ -76,6 +76,17 @@ spec: {{- end }} {{- end }} {{- end }} + {{- range $secret := .Values.parseable.blobModeSecret }} + {{- range $key := $secret.keys }} + {{- $envPrefix := $secret.prefix | default "" | upper }} + {{- $envKey := $key | upper | replace "." "_" | replace "-" "_" }} + - name: {{ $envPrefix }}{{ $envKey }} + valueFrom: + secretKeyRef: + name: {{ $secret.name }} + key: {{ $key }} + {{- end }} + {{- end }} ports: - containerPort: 8000 {{- with .Values.readinessProbe }} @@ -118,4 +129,4 @@ spec: tolerations: {{- toYaml . | nindent 8 }} {{- end }} -{{- end }} +{{- end }} # Closing for "if eq .Values.parseable.highAvailability.enabled false" diff --git a/helm/values.yaml b/helm/values.yaml index f8d91844d..9c8b49b81 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -6,6 +6,9 @@ parseable: ## Set to true if you want to deploy Parseable in local mode (store logs ## on local mount point instead of S3 bucket) local: false + ## object store can be s3, blob + ## local needs to be false if set to object store. + objectStore: s3-store ## Set to true if you want to deploy Parseable in a HA mode (multiple ingestors) ## Please note that highAvailability is not supported in local mode highAvailability: @@ -82,6 +85,18 @@ parseable: - password - staging.dir - fs.dir + # blobModeSecret: + # - type: env + # name: parseable-env-secret + # prefix: p_ + # keys: + # - addr + # - username + # - password + # - azr.access_key + # - azr.account + # - azr.container + # - azr.url s3ModeSecret: - type: env name: parseable-env-secret From 64712ed7ce87be97cdea2f13c45e67433849d32c Mon Sep 17 00:00:00 2001 From: AdheipSingh Date: Sun, 20 Oct 2024 13:52:39 +0530 Subject: [PATCH 2/5] objectStore to store, remove local flag --- helm/templates/ingestor-statefulset.yaml | 2 +- helm/templates/querier-statefulset.yaml | 2 +- helm/templates/standalone-deployment.yaml | 6 +-- helm/values.yaml | 49 ++++++++++++----------- 4 files changed, 28 insertions(+), 31 deletions(-) diff --git a/helm/templates/ingestor-statefulset.yaml b/helm/templates/ingestor-statefulset.yaml index 9628717fd..04e64794a 100644 --- a/helm/templates/ingestor-statefulset.yaml +++ b/helm/templates/ingestor-statefulset.yaml @@ -42,7 +42,7 @@ spec: imagePullPolicy: {{ .Values.parseable.image.pullPolicy }} args: - /usr/bin/parseable - - {{ .Values.parseable.objectStore }} + - {{ .Values.parseable.store }} - --ingestor-endpoint=$(HOSTNAME).{{ include "parseable.fullname" . }}-ingestor-headless.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.parseable.highAvailability.ingestor.port }} env: {{- range $key, $value := .Values.parseable.highAvailability.ingestor.env }} diff --git a/helm/templates/querier-statefulset.yaml b/helm/templates/querier-statefulset.yaml index ea4972874..5f68debc7 100644 --- a/helm/templates/querier-statefulset.yaml +++ b/helm/templates/querier-statefulset.yaml @@ -45,7 +45,7 @@ spec: imagePullPolicy: {{ .Values.parseable.image.pullPolicy }} args: - /usr/bin/parseable - - {{ .Values.parseable.objectStore }} + - {{ .Values.parseable.store }} env: - name: HOSTNAME valueFrom: diff --git a/helm/templates/standalone-deployment.yaml b/helm/templates/standalone-deployment.yaml index d87267f52..a70dc258c 100644 --- a/helm/templates/standalone-deployment.yaml +++ b/helm/templates/standalone-deployment.yaml @@ -36,11 +36,7 @@ spec: imagePullPolicy: {{ .Values.parseable.image.pullPolicy }} # Uncomment to debug # command: [ "/bin/sh", "-c", "sleep 1000000" ] - {{- if .Values.parseable.local }} - args: ["/usr/bin/parseable", "local-store"] - {{- else }} - args: ["/usr/bin/parseable", {{ .Values.parseable.objectStore | quote }}] - {{- end }} + args: ["/usr/bin/parseable", {{ .Values.parseable.store | quote }}] env: - name: HOSTNAME valueFrom: diff --git a/helm/values.yaml b/helm/values.yaml index 9c8b49b81..acee47c12 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -3,12 +3,9 @@ parseable: repository: containers.parseable.com/parseable/parseable tag: v1.5.5 pullPolicy: Always - ## Set to true if you want to deploy Parseable in local mode (store logs - ## on local mount point instead of S3 bucket) - local: false - ## object store can be s3, blob + ## object store can be local, s3 or blob. ## local needs to be false if set to object store. - objectStore: s3-store + store: local ## Set to true if you want to deploy Parseable in a HA mode (multiple ingestors) ## Please note that highAvailability is not supported in local mode highAvailability: @@ -75,6 +72,10 @@ parseable: storageClass: "" accessMode: ReadWriteOnce size: 1Gi + ## comment out the secrets depending upon deployment option + ## localModeSecret if store is set to local + ## blobModeSecret if store is set to blob-store + ## s3ModeSecret if store is set to s3-store localModeSecret: - type: env name: parseable-env-secret @@ -97,25 +98,25 @@ parseable: # - azr.account # - azr.container # - azr.url - s3ModeSecret: - - type: env - name: parseable-env-secret - prefix: P_ - keys: - ## Comment / uncomment the following lines as required - # - tls.cert.path - # - tls.key.path - # - storage.upload.interval - - addr - - username - - password - - staging.dir - - fs.dir - - s3.url - - s3.access.key - - s3.secret.key - - s3.bucket - - s3.region + # s3ModeSecret: + # - type: env + # name: parseable-env-secret + # prefix: P_ + # keys: + # ## Comment / uncomment the following lines as required + # # - tls.cert.path + # # - tls.key.path + # # - storage.upload.interval + # - addr + # - username + # - password + # - staging.dir + # - fs.dir + # - s3.url + # - s3.access.key + # - s3.secret.key + # - s3.bucket + # - s3.region serviceAccount: create: true name: "parseable" From 69c015d67bf4daff38a172f8a39dbc54087fbb7b Mon Sep 17 00:00:00 2001 From: AdheipSingh Date: Mon, 21 Oct 2024 13:00:11 +0530 Subject: [PATCH 3/5] add tolerations hardocde to azure --- helm/templates/ingestor-statefulset.yaml | 5 ++ helm/templates/querier-statefulset.yaml | 7 ++- helm/values.yaml | 60 ++++++++++++------------ 3 files changed, 41 insertions(+), 31 deletions(-) diff --git a/helm/templates/ingestor-statefulset.yaml b/helm/templates/ingestor-statefulset.yaml index 04e64794a..95176eeb7 100644 --- a/helm/templates/ingestor-statefulset.yaml +++ b/helm/templates/ingestor-statefulset.yaml @@ -33,6 +33,11 @@ spec: {{- include "parseable.ingestorLabelsSelector" . | nindent 8 }} spec: terminationGracePeriodSeconds: 10 + tolerations: + - key: "kubernetes.azure.com/scalesetpriority" + operator: "Equal" + value: "spot" + effect: "NoSchedule" serviceAccountName: {{ include "parseable.serviceAccountName" . }} containers: - name: {{ .Chart.Name }} diff --git a/helm/templates/querier-statefulset.yaml b/helm/templates/querier-statefulset.yaml index 5f68debc7..047bd505b 100644 --- a/helm/templates/querier-statefulset.yaml +++ b/helm/templates/querier-statefulset.yaml @@ -35,7 +35,12 @@ spec: {{- .Values.parseable.podLabels | toYaml | nindent 8 }} {{- include "parseable.querierLabelsSelector" . | nindent 8 }} spec: - terminationGracePeriodSeconds: 10 + terminationGracePeriodSeconds: 10 + tolerations: + - key: "kubernetes.azure.com/scalesetpriority" + operator: "Equal" + value: "spot" + effect: "NoSchedule" serviceAccountName: {{ include "parseable.serviceAccountName" . }} containers: - name: {{ .Chart.Name }} diff --git a/helm/values.yaml b/helm/values.yaml index acee47c12..2d3dbd484 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -5,11 +5,11 @@ parseable: pullPolicy: Always ## object store can be local, s3 or blob. ## local needs to be false if set to object store. - store: local + store: blob-store ## Set to true if you want to deploy Parseable in a HA mode (multiple ingestors) ## Please note that highAvailability is not supported in local mode highAvailability: - enabled: false + enabled: true ingestor: port: 8000 podAnnotations: {} @@ -53,51 +53,51 @@ parseable: ## Note that Data directory is needed only for local mode persistence: staging: - enabled: false - storageClass: "" + enabled: true + storageClass: "managed" accessMode: ReadWriteOnce - size: 1Gi + size: 10Gi ingestor: - enabled: false - storageClass: "" + enabled: true + storageClass: "managed" accessMode: ReadWriteOnce - size: 1Gi + size: 10Gi data: - enabled: false - storageClass: "" + enabled: true + storageClass: "managed" accessMode: ReadWriteOnce - size: 1Gi + size: 10Gi querier: - enabled: false - storageClass: "" + enabled: true + storageClass: "managed" accessMode: ReadWriteOnce - size: 1Gi + size: 10Gi ## comment out the secrets depending upon deployment option ## localModeSecret if store is set to local ## blobModeSecret if store is set to blob-store ## s3ModeSecret if store is set to s3-store - localModeSecret: - - type: env - name: parseable-env-secret - prefix: P_ - keys: - - addr - - username - - password - - staging.dir - - fs.dir - # blobModeSecret: + # localModeSecret: # - type: env # name: parseable-env-secret - # prefix: p_ + # prefix: P_ # keys: # - addr # - username # - password - # - azr.access_key - # - azr.account - # - azr.container - # - azr.url + # - staging.dir + # - fs.dir + blobModeSecret: + - type: env + name: parseable-env-secret + prefix: p_ + keys: + - addr + - username + - password + - azr.access_key + - azr.account + - azr.container + - azr.url # s3ModeSecret: # - type: env # name: parseable-env-secret From 15dbb12b92a9bc93805ed7c6fc4b96e7ff6f7519 Mon Sep 17 00:00:00 2001 From: AdheipSingh Date: Mon, 21 Oct 2024 23:13:10 +0530 Subject: [PATCH 4/5] test standalone --- helm/templates/ingestor-statefulset.yaml | 7 +-- helm/templates/querier-statefulset.yaml | 5 --- helm/templates/standalone-deployment.yaml | 2 +- helm/values.yaml | 52 +++++++++++------------ 4 files changed, 28 insertions(+), 38 deletions(-) diff --git a/helm/templates/ingestor-statefulset.yaml b/helm/templates/ingestor-statefulset.yaml index 95176eeb7..12e9303f9 100644 --- a/helm/templates/ingestor-statefulset.yaml +++ b/helm/templates/ingestor-statefulset.yaml @@ -32,12 +32,7 @@ spec: {{- .Values.parseable.highAvailability.ingestor.labels | toYaml | nindent 8 }} {{- include "parseable.ingestorLabelsSelector" . | nindent 8 }} spec: - terminationGracePeriodSeconds: 10 - tolerations: - - key: "kubernetes.azure.com/scalesetpriority" - operator: "Equal" - value: "spot" - effect: "NoSchedule" + terminationGracePeriodSeconds: 10 serviceAccountName: {{ include "parseable.serviceAccountName" . }} containers: - name: {{ .Chart.Name }} diff --git a/helm/templates/querier-statefulset.yaml b/helm/templates/querier-statefulset.yaml index 047bd505b..d48ce1035 100644 --- a/helm/templates/querier-statefulset.yaml +++ b/helm/templates/querier-statefulset.yaml @@ -36,11 +36,6 @@ spec: {{- include "parseable.querierLabelsSelector" . | nindent 8 }} spec: terminationGracePeriodSeconds: 10 - tolerations: - - key: "kubernetes.azure.com/scalesetpriority" - operator: "Equal" - value: "spot" - effect: "NoSchedule" serviceAccountName: {{ include "parseable.serviceAccountName" . }} containers: - name: {{ .Chart.Name }} diff --git a/helm/templates/standalone-deployment.yaml b/helm/templates/standalone-deployment.yaml index a70dc258c..dc0c8dbfc 100644 --- a/helm/templates/standalone-deployment.yaml +++ b/helm/templates/standalone-deployment.yaml @@ -47,7 +47,7 @@ spec: - name: {{ $key }} value: {{ tpl $value $ | quote }} {{- end }} - {{- if .Values.parseable.local }} + {{- if .Values.parseable.localModeSecret }} {{- range $secret := .Values.parseable.localModeSecret }} {{- range $key := $secret.keys }} {{- $envPrefix := $secret.prefix | default "" | upper }} diff --git a/helm/values.yaml b/helm/values.yaml index 2d3dbd484..0c78399e8 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -5,11 +5,11 @@ parseable: pullPolicy: Always ## object store can be local, s3 or blob. ## local needs to be false if set to object store. - store: blob-store + store: local-store ## Set to true if you want to deploy Parseable in a HA mode (multiple ingestors) ## Please note that highAvailability is not supported in local mode highAvailability: - enabled: true + enabled: false ingestor: port: 8000 podAnnotations: {} @@ -53,51 +53,51 @@ parseable: ## Note that Data directory is needed only for local mode persistence: staging: - enabled: true - storageClass: "managed" + enabled: false + storageClass: "" accessMode: ReadWriteOnce size: 10Gi ingestor: - enabled: true - storageClass: "managed" + enabled: false + storageClass: "" accessMode: ReadWriteOnce size: 10Gi data: - enabled: true - storageClass: "managed" + enabled: false + storageClass: "" accessMode: ReadWriteOnce size: 10Gi querier: - enabled: true - storageClass: "managed" + enabled: false + storageClass: "" accessMode: ReadWriteOnce size: 10Gi ## comment out the secrets depending upon deployment option ## localModeSecret if store is set to local ## blobModeSecret if store is set to blob-store ## s3ModeSecret if store is set to s3-store - # localModeSecret: - # - type: env - # name: parseable-env-secret - # prefix: P_ - # keys: - # - addr - # - username - # - password - # - staging.dir - # - fs.dir - blobModeSecret: + localModeSecret: - type: env name: parseable-env-secret - prefix: p_ + prefix: P_ keys: - addr - username - password - - azr.access_key - - azr.account - - azr.container - - azr.url + - staging.dir + - fs.dir + # blobModeSecret: + # - type: env + # name: parseable-env-secret + # prefix: p_ + # keys: + # - addr + # - username + # - password + # - azr.access_key + # - azr.account + # - azr.container + # - azr.url # s3ModeSecret: # - type: env # name: parseable-env-secret From 1c0dd49be71e8a9db39da1fce6cb5f35fe3dfa58 Mon Sep 17 00:00:00 2001 From: AdheipSingh Date: Mon, 21 Oct 2024 23:15:02 +0530 Subject: [PATCH 5/5] revert disk size --- helm/values.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/helm/values.yaml b/helm/values.yaml index 0c78399e8..a3448f749 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -56,22 +56,22 @@ parseable: enabled: false storageClass: "" accessMode: ReadWriteOnce - size: 10Gi + size: 1Gi ingestor: enabled: false storageClass: "" accessMode: ReadWriteOnce - size: 10Gi + size: 1Gi data: enabled: false storageClass: "" accessMode: ReadWriteOnce - size: 10Gi + size: 1Gi querier: enabled: false storageClass: "" accessMode: ReadWriteOnce - size: 10Gi + size: 1Gi ## comment out the secrets depending upon deployment option ## localModeSecret if store is set to local ## blobModeSecret if store is set to blob-store