Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add storage config. #55

Merged
merged 5 commits into from
Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,11 @@ To install the quickwit chart:
To uninstall the chart:

helm delete my-quickwit

## Upgrade helm chart from 0.4.0 to 0.5.0

The way storage config is defined changed and you have to update your helm values to upgrade to 0.5.0.

The changes are:
- the `config.s3` and `config.azure_blob` values are no more supported. You now have to use the storage config as defined in the [docs](https://quickwit.io/docs/configuration/storage-config).
- the keys of secrets have changed: `s3.secret_key` is replaced by `storage.s3.secret_access_key` and `azure_blob.access_key` is replace by `storage.azure.access_key`.
4 changes: 2 additions & 2 deletions charts/quickwit/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ apiVersion: v2
name: quickwit
description: Sub-second search & analytics engine on cloud storage.
type: application
version: 0.4.0
appVersion: "v0.6.1"
version: 0.5.0
appVersion: "v0.6.4"
keywords:
- quickwit
- search
Expand Down
26 changes: 9 additions & 17 deletions charts/quickwit/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -140,35 +140,27 @@ Quickwit environment
value: node.yaml
- name: QW_CLUSTER_ID
value: {{ .Release.Namespace }}-{{ include "quickwit.fullname" . }}
{{- with .Values.config.s3 }}
{{- if .endpoint }}
- name: QW_S3_ENDPOINT
value: {{ .endpoint }}
{{- end }}
{{- if .region }}
- name: AWS_REGION
value: {{ .region }}
{{- end }}
{{- if and .secret_key .access_key }}
{{- if ((.Values.config.storage).s3).access_key_id }}
- name: AWS_ACCESS_KEY_ID
value: {{ .access_key }}
value: {{ .Values.config.storage.s3.access_key_id }}
{{- end }}
{{- if ((.Values.config.storage).s3).secret_access_key }}
- name: AWS_SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
name: {{ include "quickwit.fullname" $ }}
key: s3.secret_key
{{- end }}
key: storage.s3.secret_access_key
{{- end }}
{{- if .Values.config.azure_blob.account_name }}
{{- if ((.Values.config.storage).azure).account }}
- name: QW_AZURE_STORAGE_ACCOUNT
value: {{ .Values.config.azure_blob.account_name }}
value: {{ .Values.config.storage.azure.account }}
{{- end }}
{{- if .Values.config.azure_blob.access_key }}
{{- if ((.Values.config.storage).azure).access_key }}
- name: QW_AZURE_STORAGE_ACCESS_KEY
valueFrom:
secretKeyRef:
name: {{ include "quickwit.fullname" $ }}
key: azure_blob.access_key
key: storage.azure.access_key
{{- end }}
- name: QW_NODE_ID
value: "$(POD_NAME)"
Expand Down
17 changes: 16 additions & 1 deletion charts/quickwit/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
{{- include "quickwit.labels" . | nindent 4 }}
data:
node.yaml: |-
version: 0.5
version: 0.6
listen_address: 0.0.0.0
gossip_listen_port: 7282
data_dir: /quickwit/qwdata
Expand All @@ -15,6 +15,21 @@ data:
indexer:
{{- toYaml . | nindent 6 }}
{{- end }}
{{- with .Values.config.storage }}
{{- $new_storage := . | deepCopy }}
{{- /* s3 access_key_id and secret_access_key are already set by env variables */}}
{{ if .s3 }}
{{- $_ := unset $new_storage.s3 "access_key_id" }}
{{- $_ := unset $new_storage.s3 "secret_access_key" }}
{{- end }}
{{- /* azure account and access_key are already set by env variables */}}
{{ if .azure }}
{{- $_ := unset $new_storage.azure "account" }}
{{- $_ := unset $new_storage.azure "access_key" }}
{{- end }}
storage:
{{- toYaml $new_storage | nindent 6 }}
{{- end }}
{{- with .Values.config.ingest_api }}
ingest_api:
{{- toYaml . | nindent 6 }}
Expand Down
8 changes: 4 additions & 4 deletions charts/quickwit/templates/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ data:
{{- if .Values.config.postgres }}
postgres.password: {{ required "A valid config.postgres.password is required!" .Values.config.postgres.password | b64enc | quote }}
{{- end }}
{{- if .Values.config.s3.secret_key }}
s3.secret_key: {{ .Values.config.s3.secret_key | b64enc | quote }}
{{- if ((.Values.config.storage).s3).secret_access_key }}
storage.s3.secret_access_key: {{ .Values.config.storage.s3.secret_access_key | b64enc | quote }}
{{- end }}
{{- if .Values.config.azure_blob.access_key }}
azure_blob.access_key: {{ .Values.config.azure_blob.access_key | b64enc | quote }}
{{- if ((.Values.config.storage).azure).access_key }}
storage.azure.access_key: {{ .Values.config.storage.azure.access_key | b64enc | quote }}
{{- end }}
29 changes: 17 additions & 12 deletions charts/quickwit/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ image:
repository: quickwit/quickwit
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
# tag: v0.6.1
# tag: v0.6.4

imagePullSecrets: []
nameOverride: ""
Expand Down Expand Up @@ -306,22 +306,27 @@ bootstrap:
# Quickwit configuration
config:
# Metastore configuration.
postgres: {}
# Could be set either with QW_METASTORE_URI or with the following config:
# - If on S3:
# metastore_uri: s3://quickwit-indexes
# - If on postgres-like db:
# postgres: {}
# host: ""
# port: 5432
# database: metastore
# username: quickwit
# password: ""

s3: {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I understand correctly, now the entire storage config is copy pasted into the quickwit.yaml of each node?
If so, can we put the config documentation link from our website?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's right, let's do this

# endpoint: "https://s3.eu-west-1.amazonaws.com"
# region: eu-west-1
# access_key: "my-access-key"
# secret_key: "my-secret-key"

azure_blob: {}
# account_name: "my-azure-blob-accout"
# access_key: "my-azure-blob-access-key"
storage: {}
# s3:
# flavor: gcs
# region: eu-west-1
# access_key_id: "my-access-key"
# secret_access_key: "my-secret-key"
# endpoint: https://storage.googleapis.com
# azure:
# account: your-azure-account-name
# access_key: your-azure-access-key

default_index_root_uri: s3://quickwit/indexes
# Indexer settings
Expand Down Expand Up @@ -364,7 +369,7 @@ config:
sources: []
# - index: my-index
# source:
# version: 0.5
# version: 0.6
# source_id: my-source
# source_type: kafka
# num_pipelines: 1
Expand Down
Loading