Skip to content

Commit

Permalink
[Bug Fix] Add default tag (.Chart.AppVersion) to graphscope-store (#2205
Browse files Browse the repository at this point in the history
)

* Add default tag to graphscope-store

Signed-off-by: dashanji <caoye.cao@alibaba-inc.com>
  • Loading branch information
dashanji committed Nov 8, 2022
1 parent 4279b8f commit 094e81d
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions charts/graphscope-store/templates/_helpers.tpl
Expand Up @@ -70,12 +70,12 @@ app.kubernetes.io/instance: {{ .Release.Name }}
Return the proper graphscope-store image name
*/}}
{{- define "graphscope-store.image" -}}
{{ include "graphscope-store.images.image" (dict "imageRoot" .Values.image "global" .Values.global) }}
{{ include "graphscope-store.images.image" (dict "imageRoot" .Values.image "global" .Values.global "DefaultTag" .Chart.AppVersion ) }}
{{- end -}}

{{/*
Return the proper image name
{{ include "graphscope-store.images.image" ( dict "imageRoot" .Values.path.to.the.image "global" $) }}
{{ include "graphscope-store.images.image" ( dict "imageRoot" .Values.path.to.the.image "global" $ "DefaultTag" .Chart.AppVersion ) }}
*/}}
{{- define "graphscope-store.images.image" -}}
{{- $registryName := .imageRoot.registry -}}
Expand All @@ -86,6 +86,13 @@ Return the proper image name
{{- $registryName = .global.imageRegistry -}}
{{- end -}}
{{- end -}}
{{- if not $tag }}
{{- if .imageRoot.DefaultTag }}
{{- $tag = .imageRoot.DefaultTag -}}
{{- else -}}
{{- $tag = "latest" -}}
{{- end -}}
{{- end -}}
{{- if $registryName }}
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
{{- else -}}
Expand Down

0 comments on commit 094e81d

Please sign in to comment.