Browse Source
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
pull/7199/head
Benjamin Reed
4 weeks ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
7 additions and
3 deletions
k8s/charts/seaweedfs/templates/shared/_helpers.tpl
k8s/charts/seaweedfs/values.yaml
@ -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