Skip to content

Commit

Permalink
Use app-version as default tag instead of latest in graphscope-store …
Browse files Browse the repository at this point in the history
…charts (#406)
  • Loading branch information
siyuan0322 committed Jun 11, 2021
1 parent 8a08729 commit 5686805
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
21 changes: 10 additions & 11 deletions charts/graphscope-store/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ app.kubernetes.io/instance: {{ .Release.Name }}
Return the proper graphscope-store image name
*/}}
{{- define "graphscope-store.image" -}}
{{ include "graphscope-store.images.image" .Values.image }}
{{ include "graphscope-store.images.image" . }}
{{- end -}}

{{/*
Expand Down Expand Up @@ -105,12 +105,6 @@ Return true if a configmap object should be created for graphscope-service
{{- end -}}
{{- end -}}

{{/*
Return the proper image name (for the init container volume-permissions image)
*/}}
{{- define "graphscope-store.volumePermissions.image" -}}
{{ include "graphscope-store.images.image" .Values.volumePermissions.image }}
{{- end -}}

{{/*
Renders a value that contains template.
Expand All @@ -128,16 +122,21 @@ Usage:

{{/*
Return the proper image name
{{ include "graphscope-store.images.image" .Values.path.to.the.image }}
{{ include "graphscope-store.images.image" . }}
*/}}
{{- define "graphscope-store.images.image" -}}
{{- $tag := .tag | toString -}}
{{- if .registry }}
{{- $tag := .Chart.AppVersion | toString -}}
{{- with .Values.image -}}
{{- if .tag -}}
{{- $tag = .tag | toString -}}
{{- end -}}
{{- if .registry -}}
{{- printf "%s/%s:%s" .registry .repository $tag -}}
{{- else -}}
{{- printf "%s:%s" .repository $tag -}}
{{- end -}}
{{- end -}}
{{- end -}}


{{/*
Expand Down Expand Up @@ -181,4 +180,4 @@ Get full broker list.
{{- $brokerList = append $brokerList (printf "%s-%d.%s-headless.%s.svc.%s:%d" $fullname $i $fullname $releaseNamespace $clusterDomain $servicePort) }}
{{- end }}
{{- join "," $brokerList | printf "%s" -}}
{{- end -}}
{{- end -}}
3 changes: 2 additions & 1 deletion charts/graphscope-store/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
image:
registry: registry.cn-hongkong.aliyuncs.com
repository: graphscope/graphscope-store
tag: latest
# Overrides the image tag whose default is the chart appVersion.
tag: ""
## Specify a imagePullPolicy
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
Expand Down
File renamed without changes.

0 comments on commit 5686805

Please sign in to comment.