Skip to content

Commit

Permalink
fix: use the stable chart appVersion as image tag by default (opensea…
Browse files Browse the repository at this point in the history
…rch-project#17)

Using :latest by default is going to lead to clusters with version skew
as pods schedule onto new nodes. So use a stable tag instead.

Signed-off-by: Scott Leggett <[email protected]>
  • Loading branch information
smlx authored Jul 29, 2021
1 parent c1eac61 commit a2a2d8b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Helm/opensearch/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ spec:
initContainers:
{{ if .Values.keystore }}
- name: keystore
image: "{{ .Values.image }}:{{ .Values.imageTag }}"
image: "{{ .Values.image }}:{{ .Values.imageTag | default .Chart.AppVersion }}"
imagePullPolicy: "{{ .Values.imagePullPolicy }}"
command:
- sh
Expand Down Expand Up @@ -217,7 +217,7 @@ spec:
- name: "{{ template "opensearch.name" . }}"
securityContext:
{{ toYaml .Values.securityContext | indent 10 }}
image: "{{ .Values.image }}:{{ .Values.imageTag }}"
image: "{{ .Values.image }}:{{ .Values.imageTag | default .Chart.AppVersion }}"
imagePullPolicy: "{{ .Values.imagePullPolicy }}"
ports:
- name: http
Expand Down Expand Up @@ -336,7 +336,7 @@ spec:
{{- if eq .Values.roles.master "true" }}
# This sidecar will prevent slow master re-election
- name: opensearch-master-graceful-termination-handler
image: "{{ .Values.image }}:{{ .Values.imageTag }}"
image: "{{ .Values.image }}:{{ .Values.imageTag | default .Chart.AppVersion }}"
imagePullPolicy: "{{ .Values.imagePullPolicy }}"
command:
- "sh"
Expand Down
3 changes: 2 additions & 1 deletion Helm/opensearch/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ hostAliases: []
# - "bar.local"

image: "opensearchproject/opensearch"
imageTag: "latest"
# override image tag, which is .Chart.AppVersion by default
imageTag: ""
imagePullPolicy: "IfNotPresent"

podAnnotations: {}
Expand Down

0 comments on commit a2a2d8b

Please sign in to comment.