mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-19 05:27:58 +08:00
fix missing support for .Values.global.repository (#7195)
* fix missing support for .Values.global.repository * rework based on gemini feedback to handle repository+imageName more cleanly * use base rather than last + splitList
This commit is contained in:
@@ -96,13 +96,16 @@ Inject extra environment vars in the format key:value, if populated
|
||||
{{/* Computes the container image name for all components (if they are not overridden) */}}
|
||||
{{- define "common.image" -}}
|
||||
{{- $registryName := default .Values.image.registry .Values.global.registry | toString -}}
|
||||
{{- $repositoryName := .Values.image.repository | toString -}}
|
||||
{{- $repositoryName := default .Values.image.repository .Values.global.repository | toString -}}
|
||||
{{- $name := .Values.global.imageName | toString -}}
|
||||
{{- $tag := default .Chart.AppVersion .Values.image.tag | toString -}}
|
||||
{{- if $repositoryName -}}
|
||||
{{- $name = printf "%s/%s" (trimSuffix "/" $repositoryName) (base $name) -}}
|
||||
{{- end -}}
|
||||
{{- if $registryName -}}
|
||||
{{- printf "%s/%s%s:%s" $registryName $repositoryName $name $tag -}}
|
||||
{{- printf "%s/%s:%s" $registryName $name $tag -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s%s:%s" $repositoryName $name $tag -}}
|
||||
{{- printf "%s:%s" $name $tag -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
|
@@ -3,6 +3,7 @@
|
||||
global:
|
||||
createClusterRole: true
|
||||
registry: ""
|
||||
# if repository is set, it overrides the namespace part of imageName
|
||||
repository: ""
|
||||
imageName: chrislusf/seaweedfs
|
||||
imagePullPolicy: IfNotPresent
|
||||
|
Reference in New Issue
Block a user