mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-19 03:29:55 +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) */}}
|
{{/* Computes the container image name for all components (if they are not overridden) */}}
|
||||||
{{- define "common.image" -}}
|
{{- define "common.image" -}}
|
||||||
{{- $registryName := default .Values.image.registry .Values.global.registry | toString -}}
|
{{- $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 -}}
|
{{- $name := .Values.global.imageName | toString -}}
|
||||||
{{- $tag := default .Chart.AppVersion .Values.image.tag | toString -}}
|
{{- $tag := default .Chart.AppVersion .Values.image.tag | toString -}}
|
||||||
|
{{- if $repositoryName -}}
|
||||||
|
{{- $name = printf "%s/%s" (trimSuffix "/" $repositoryName) (base $name) -}}
|
||||||
|
{{- end -}}
|
||||||
{{- if $registryName -}}
|
{{- if $registryName -}}
|
||||||
{{- printf "%s/%s%s:%s" $registryName $repositoryName $name $tag -}}
|
{{- printf "%s/%s:%s" $registryName $name $tag -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- printf "%s%s:%s" $repositoryName $name $tag -}}
|
{{- printf "%s:%s" $name $tag -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
@@ -3,6 +3,7 @@
|
|||||||
global:
|
global:
|
||||||
createClusterRole: true
|
createClusterRole: true
|
||||||
registry: ""
|
registry: ""
|
||||||
|
# if repository is set, it overrides the namespace part of imageName
|
||||||
repository: ""
|
repository: ""
|
||||||
imageName: chrislusf/seaweedfs
|
imageName: chrislusf/seaweedfs
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
|
Reference in New Issue
Block a user