Skip to content

Commit c76fde9

Browse files
authored
Support immutable image digests (#187)
1 parent 95fd5bb commit c76fde9

11 files changed

Lines changed: 24 additions & 10 deletions

charts/quickwit/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: quickwit
33
description: Sub-second search & analytics engine on cloud storage.
44
type: application
5-
version: 0.8.14
5+
version: 0.8.15
66
appVersion: v0.8.2
77
keywords:
88
- quickwit

charts/quickwit/templates/_helpers.tpl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,18 @@ Expand the name of the chart.
55
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
66
{{- end }}
77

8+
{{/*
9+
Create the Quickwit image reference. An immutable digest takes precedence over
10+
the configured tag and the chart appVersion.
11+
*/}}
12+
{{- define "quickwit.image" -}}
13+
{{- if .Values.image.digest -}}
14+
{{- printf "%s@%s" .Values.image.repository .Values.image.digest -}}
15+
{{- else -}}
16+
{{- printf "%s:%s" .Values.image.repository (.Values.image.tag | default .Chart.AppVersion) -}}
17+
{{- end -}}
18+
{{- end }}
19+
820
{{/*
921
Create a default fully qualified app name.
1022
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).

charts/quickwit/templates/_metastore-deployment.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ spec:
6262
- name: {{ $root.Chart.Name }}
6363
securityContext:
6464
{{- toYaml $root.Values.securityContext | nindent 12 }}
65-
image: "{{ $root.Values.image.repository }}:{{ $root.Values.image.tag | default $root.Chart.AppVersion }}"
65+
image: {{ include "quickwit.image" $root | quote }}
6666
imagePullPolicy: {{ $root.Values.image.pullPolicy }}
6767
{{- if $values.args }}
6868
args: {{- toYaml $values.args | nindent 10 }}

charts/quickwit/templates/compactor-deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ spec:
4949
- name: {{ .Chart.Name }}
5050
securityContext:
5151
{{- toYaml .Values.securityContext | nindent 12 }}
52-
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
52+
image: {{ include "quickwit.image" . | quote }}
5353
imagePullPolicy: {{ .Values.image.pullPolicy }}
5454
{{- if $.Values.compactor.args }}
5555
args: {{- toYaml $.Values.compactor.args | nindent 10 }}

charts/quickwit/templates/control-plane-deployment.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ spec:
4848
- name: {{ .Chart.Name }}
4949
securityContext:
5050
{{- toYaml .Values.securityContext | nindent 12 }}
51-
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
51+
image: {{ include "quickwit.image" . | quote }}
5252
imagePullPolicy: {{ .Values.image.pullPolicy }}
5353
{{- if $.Values.control_plane.args }}
5454
args: {{- toYaml $.Values.control_plane.args | nindent 10 }}
@@ -128,4 +128,4 @@ spec:
128128
topologySpreadConstraints:
129129
{{- toYaml $tsc | nindent 8 }}
130130
{{- end }}
131-
{{- end }}
131+
{{- end }}

charts/quickwit/templates/indexer-statefulset.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ spec:
5454
- name: {{ .Chart.Name }}
5555
securityContext:
5656
{{- toYaml .Values.securityContext | nindent 12 }}
57-
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
57+
image: {{ include "quickwit.image" . | quote }}
5858
imagePullPolicy: {{ .Values.image.pullPolicy }}
5959
{{- if $.Values.indexer.args }}
6060
args: {{- toYaml $.Values.indexer.args | nindent 10 }}

charts/quickwit/templates/janitor-deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ spec:
4848
- name: {{ .Chart.Name }}
4949
securityContext:
5050
{{- toYaml .Values.securityContext | nindent 12 }}
51-
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
51+
image: {{ include "quickwit.image" . | quote }}
5252
imagePullPolicy: {{ .Values.image.pullPolicy }}
5353
{{- if $.Values.janitor.args }}
5454
args: {{- toYaml $.Values.janitor.args | nindent 10 }}

charts/quickwit/templates/job-create-indices.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ spec:
4343
- name: {{ $.Chart.Name }}
4444
securityContext:
4545
{{- toYaml $.Values.securityContext | nindent 10 }}
46-
image: "{{ $.Values.image.repository }}:{{ $.Values.image.tag | default $.Chart.AppVersion }}"
46+
image: {{ include "quickwit.image" $ | quote }}
4747
imagePullPolicy: {{ $.Values.image.pullPolicy }}
4848
{{- if $.Values.bootstrap.indexes.command }}
4949
command: {{- toYaml $.Values.bootstrap.indexes.command | nindent 8 }}

charts/quickwit/templates/job-create-sources.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ spec:
4343
- name: {{ $.Chart.Name }}
4444
securityContext:
4545
{{- toYaml $.Values.securityContext | nindent 10 }}
46-
image: "{{ $.Values.image.repository }}:{{ $.Values.image.tag | default $.Chart.AppVersion }}"
46+
image: {{ include "quickwit.image" $ | quote }}
4747
imagePullPolicy: {{ $.Values.image.pullPolicy }}
4848
{{- if $.Values.bootstrap.sources.command }}
4949
command: {{- toYaml $.Values.bootstrap.sources.command | nindent 8 }}

charts/quickwit/templates/searcher-statefulset.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ spec:
5454
- name: {{ .Chart.Name }}
5555
securityContext:
5656
{{- toYaml .Values.securityContext | nindent 12 }}
57-
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
57+
image: {{ include "quickwit.image" . | quote }}
5858
imagePullPolicy: {{ .Values.image.pullPolicy }}
5959
{{- if $.Values.searcher.args }}
6060
args: {{- toYaml $.Values.searcher.args | nindent 10 }}

0 commit comments

Comments
 (0)