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

Adds initContainer option to the helmcharts and allows default QW_CONFIG to be overridden by chart values. #92

Merged
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
2 changes: 1 addition & 1 deletion charts/quickwit/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: quickwit
description: Sub-second search & analytics engine on cloud storage.
type: application
version: 0.6.1
version: 0.6.2
appVersion: "v0.8.1"
keywords:
- quickwit
Expand Down
2 changes: 1 addition & 1 deletion charts/quickwit/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ Quickwit environment
fieldRef:
fieldPath: status.podIP
- name: QW_CONFIG
value: node.yaml
value: {{ .Values.configLocation }}
- name: QW_CLUSTER_ID
value: {{ .Release.Namespace }}-{{ include "quickwit.fullname" . }}
- name: QW_NODE_ID
Expand Down
14 changes: 14 additions & 0 deletions charts/quickwit/templates/control-plane-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,21 @@ spec:
serviceAccountName: {{ include "quickwit.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- with .Values.control_plane.initContainers }}
initContainers:
{{- toYaml . | nindent 8 }}
{{ end }}
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if $.Values.control_plane.args }}
args: {{- toYaml $.Values.control_plane.args | nindent 10 }}
{{- else }}
args: ["run", "--service", "control_plane"]
{{- end }}
env:
{{- include "quickwit.environment" . | nindent 12 }}
{{- range $key, $value := .Values.control_plane.extraEnv }}
Expand Down Expand Up @@ -79,6 +87,9 @@ spec:
- name: {{ .name }}
mountPath: {{ .mountPath }}
{{- end }}
{{- with .Values.indexer.extraVolumeMounts }}
{{- toYaml . | nindent 12 }}
{{- end }}
resources:
{{- toYaml .Values.control_plane.resources | nindent 14 }}
volumes:
Expand All @@ -95,6 +106,9 @@ spec:
configMap:
name: {{ .name }}
{{- end }}
{{- with .Values.indexer.extraVolumes }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.control_plane.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
16 changes: 15 additions & 1 deletion charts/quickwit/templates/indexer-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,21 @@ spec:
serviceAccountName: {{ include "quickwit.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- with .Values.indexer.initContainers }}
initContainers:
{{- toYaml . | nindent 8 }}
{{ end }}
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if $.Values.indexer.args }}
args: {{- toYaml $.Values.indexer.args | nindent 10 }}
{{- else }}
args: ["run", "--service", "indexer"]
{{- end }}
env:
{{- include "quickwit.environment" . | nindent 12 }}
{{- range $key, $value := .Values.indexer.extraEnv }}
Expand All @@ -64,7 +73,6 @@ spec:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- end }}
args: ["run", "--service", "indexer"]
ports:
{{- include "quickwit.ports" . | nindent 12 }}
startupProbe:
Expand All @@ -83,6 +91,9 @@ spec:
- name: {{ .name }}
mountPath: {{ .mountPath }}
{{- end }}
{{- with .Values.indexer.extraVolumeMounts }}
{{- toYaml . | nindent 12 }}
{{- end }}
resources:
{{- toYaml .Values.indexer.resources | nindent 12 }}
volumes:
Expand All @@ -101,6 +112,9 @@ spec:
configMap:
name: {{ .name }}
{{- end }}
{{- with .Values.indexer.extraVolumes }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.indexer.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
14 changes: 14 additions & 0 deletions charts/quickwit/templates/janitor-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,21 @@ spec:
serviceAccountName: {{ include "quickwit.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- with .Values.janitor.initContainers }}
initContainers:
{{ toYaml . | nindent 8 }}
{{ end }}
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if $.Values.janitor.args }}
args: {{- toYaml $.Values.janitor.args | nindent 10 }}
{{- else }}
args: ["run", "--service", "janitor"]
{{- end }}
env:
{{- include "quickwit.environment" . | nindent 12 }}
{{- range $key, $value := .Values.janitor.extraEnv }}
Expand Down Expand Up @@ -80,6 +88,9 @@ spec:
- name: {{ .name }}
mountPath: {{ .mountPath }}
{{- end }}
{{- with .Values.indexer.extraVolumeMounts }}
{{- toYaml . | nindent 12 }}
{{- end }}
resources:
{{- toYaml .Values.janitor.resources | nindent 14 }}
volumes:
Expand All @@ -96,6 +107,9 @@ spec:
configMap:
name: {{ .name }}
{{- end }}
{{- with .Values.indexer.extraVolumes }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.janitor.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
27 changes: 27 additions & 0 deletions charts/quickwit/templates/job-create-indices.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,25 @@ spec:
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "quickwit.serviceAccountName" $ }}
securityContext:
{{- toYaml $.Values.podSecurityContext | nindent 8 }}
restartPolicy: Never
{{- with $.Values.jobs.indexes.initContainers }}
initContainers:
{{- toYaml . | nindent 8 }}
{{ end }}
containers:
- name: {{ $.Chart.Name }}
securityContext:
{{- toYaml $.Values.securityContext | nindent 10 }}
image: "{{ $.Values.image.repository }}:{{ $.Values.image.tag | default $.Chart.AppVersion }}"
imagePullPolicy: {{ $.Values.image.pullPolicy }}
{{- if $.Values.jobs.indexes.command }}
command: {{- toYaml $.Values.jobs.sources.command | nindent 8 }}
{{- else }}
command: ["/bin/bash","-c","quickwit index describe --index {{ .index_id }} --endpoint ${QW_CLUSTER_ENDPOINT} || quickwit index create --index-config {{ .index_id }}.yaml --endpoint ${QW_CLUSTER_ENDPOINT}"]
{{- end }}
env:
{{- include "quickwit.environment" $ | nindent 10 }}
{{- range $key, $value := $.Values.bootstrap.extraEnv }}
Expand All @@ -56,6 +65,9 @@ spec:
- name: index
mountPath: /quickwit/{{ .index_id }}.yaml
subPath: {{ .index_id }}.yaml
{{- with $.Values.jobs.indexes.extraVolumeMounts }}
{{- toYaml . | nindent 10 }}
{{- end }}
resources:
{{- toYaml $.Values.bootstrap.resources | nindent 10 }}
volumes:
Expand All @@ -71,5 +83,20 @@ spec:
items:
- key: {{ .index_id }}.yaml
path: {{ .index_id }}.yaml
{{- with $.Values.jobs.indexes.extraVolumes }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with $.Values.bootstrap.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with $.Values.bootstrap.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with $.Values.bootstrap.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- end }}
29 changes: 28 additions & 1 deletion charts/quickwit/templates/job-create-sources.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,25 @@ spec:
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "quickwit.serviceAccountName" $ }}
securityContext:
{{- toYaml $.Values.podSecurityContext | nindent 8 }}
restartPolicy: Never
{{- with $.Values.jobs.sources.initContainers }}
initContainers:
{{- toYaml . | nindent 8 }}
{{ end }}
containers:
- name: {{ $.Chart.Name }}
securityContext:
{{- toYaml $.Values.securityContext | nindent 10 }}
image: "{{ $.Values.image.repository }}:{{ $.Values.image.tag | default $.Chart.AppVersion }}"
imagePullPolicy: {{ $.Values.image.pullPolicy }}
command: ["/bin/bash","-c","quickwit source describe --index {{ .index }} --source {{ .source.source_id }} --endpoint ${QW_CLUSTER_ENDPOINT}|| quickwit source create --index {{ .index }} --source-config {{ .source.source_id }}.yaml --endpoint ${QW_CLUSTER_ENDPOINT}"]
{{- if $.Values.jobs.sources.command }}
command: {{- toYaml $.Values.jobs.sources.command | nindent 8 }}
{{- else }}
command: ["/bin/bash","-c","quickwit source describe --index {{ .index }} --source {{ .source.source_id }} --endpoint ${QW_CLUSTER_ENDPOINT} || quickwit source create --index {{ .index }} --source-config {{ .source.source_id }}.yaml --endpoint ${QW_CLUSTER_ENDPOINT}"]
{{- end }}
env:
{{- include "quickwit.environment" $ | nindent 10 }}
{{- range $key, $value := $.Values.bootstrap.extraEnv }}
Expand All @@ -58,6 +67,9 @@ spec:
mountPath: /quickwit/{{ .source.source_id }}.yaml
subPath: {{ .source.source_id }}.yaml
{{- end }}
{{- with $.Values.jobs.sources.extraVolumeMounts }}
{{- toYaml . | nindent 10 }}
{{- end }}
resources:
{{- toYaml $.Values.bootstrap.resources | nindent 10 }}
volumes:
Expand All @@ -73,5 +85,20 @@ spec:
items:
- key: {{ .source.source_id }}.yaml
path: {{ .source.source_id }}.yaml
{{- with $.Values.jobs.sources.extraVolumes }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with $.Values.bootstrap.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with $.Values.bootstrap.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with $.Values.bootstrap.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- end }}
16 changes: 15 additions & 1 deletion charts/quickwit/templates/metastore-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,21 @@ spec:
serviceAccountName: {{ include "quickwit.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- with .Values.metastore.initContainers }}
initContainers:
{{- toYaml . | nindent 8 }}
{{ end }}
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if $.Values.metastore.args }}
args: {{- toYaml $.Values.metastore.args | nindent 10 }}
{{- else }}
args: ["run", "--service", "metastore"]
{{- end }}
env:
{{- include "quickwit.environment" . | nindent 12 }}
{{- range $key, $value := .Values.metastore.extraEnv }}
Expand Down Expand Up @@ -78,6 +86,9 @@ spec:
- name: {{ .name }}
mountPath: {{ .mountPath }}
{{- end }}
{{- with .Values.metastore.extraVolumeMounts }}
{{- toYaml . | nindent 12 }}
{{- end }}
resources:
{{- toYaml .Values.metastore.resources | nindent 14 }}
volumes:
Expand All @@ -94,6 +105,9 @@ spec:
configMap:
name: {{ .name }}
{{- end }}
{{- with .Values.metastore.extraVolumes }}
{{- toYaml . | nindent 10 }}
{{- end }}
{{- with .Values.metastore.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
16 changes: 15 additions & 1 deletion charts/quickwit/templates/searcher-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,21 @@ spec:
serviceAccountName: {{ include "quickwit.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- with .Values.searcher.initContainers }}
initContainers:
{{- toYaml . | nindent 8 }}
{{ end }}
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if $.Values.searcher.args }}
args: {{- toYaml $.Values.searcher.args | nindent 10 }}
{{- else }}
args: ["run", "--service", "searcher"]
{{- end }}
env:
{{- include "quickwit.environment" . | nindent 12 }}
{{- range $key, $value := .Values.searcher.extraEnv }}
Expand All @@ -64,7 +73,6 @@ spec:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- end }}
args: ["run", "--service", "searcher"]
ports:
{{- include "quickwit.ports" . | nindent 12 }}
startupProbe:
Expand All @@ -83,6 +91,9 @@ spec:
- name: {{ .name }}
mountPath: {{ .mountPath }}
{{- end }}
{{- with .Values.searcher.extraVolumeMounts }}
{{- toYaml . | nindent 12 }}
{{- end }}
resources:
{{- toYaml .Values.searcher.resources | nindent 14 }}
volumes:
Expand All @@ -101,6 +112,9 @@ spec:
configMap:
name: {{ .name }}
{{- end }}
{{- with .Values.searcher.extraVolumes }}
{{- toYaml . | nindent 10 }}
{{- end }}
{{- with .Values.searcher.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
Loading
Loading