feat(common): add support for a, renovate compatible, image selector (#1627)
This commit is contained in:
@@ -15,4 +15,4 @@ maintainers:
|
|||||||
name: common
|
name: common
|
||||||
sources: null
|
sources: null
|
||||||
type: library
|
type: library
|
||||||
version: 8.9.27
|
version: 8.10.0
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{{- /* The main container included in the controller */ -}}
|
{{- /* The main container included in the controller */ -}}
|
||||||
{{- define "common.controller.mainContainer" -}}
|
{{- define "common.controller.mainContainer" -}}
|
||||||
- name: {{ include "common.names.fullname" . }}
|
- name: {{ include "common.names.fullname" . }}
|
||||||
image: {{ printf "%s:%s" .Values.image.repository (default .Chart.AppVersion .Values.image.tag) | quote }}
|
image: {{ include "common.images.selector" . }}
|
||||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||||
{{- with .Values.command }}
|
{{- with .Values.command }}
|
||||||
command:
|
command:
|
||||||
|
|||||||
@@ -9,6 +9,21 @@ Return the proper image name
|
|||||||
{{- printf "%s:%s" $repositoryName $tag -}}
|
{{- printf "%s:%s" $repositoryName $tag -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Return the image name using the selector
|
||||||
|
{{ include "common.images.selector" . }}
|
||||||
|
*/}}
|
||||||
|
{{- define "common.images.selector" -}}
|
||||||
|
{{- $imageDict := get .Values "image" }}
|
||||||
|
{{- $selected := .Values.imageSelector }}
|
||||||
|
{{- if hasKey .Values $selected }}
|
||||||
|
{{- $imageDict = get .Values $selected }}
|
||||||
|
{{- end }}
|
||||||
|
{{- $repositoryName := $imageDict.repository -}}
|
||||||
|
{{- $tag :=$imageDict.tag | toString -}}
|
||||||
|
{{- printf "%s:%s" $repositoryName $tag -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
{{/*
|
{{/*
|
||||||
Return the proper Docker Image Registry Secret Names (deprecated: use common.images.renderPullSecrets instead)
|
Return the proper Docker Image Registry Secret Names (deprecated: use common.images.renderPullSecrets instead)
|
||||||
{{ include "common.images.pullSecrets" ( dict "images" (list .Values.path.to.the.image1, .Values.path.to.the.image2) "global" .Values.global) }}
|
{{ include "common.images.pullSecrets" ( dict "images" (list .Values.path.to.the.image1, .Values.path.to.the.image2) "global" .Values.global) }}
|
||||||
|
|||||||
@@ -119,6 +119,10 @@ image:
|
|||||||
# -- image pull policy
|
# -- image pull policy
|
||||||
pullPolicy:
|
pullPolicy:
|
||||||
|
|
||||||
|
# -- Image Selector allows for easy picking a different image dict, important for the SCALE GUI
|
||||||
|
imageSelector: "image"
|
||||||
|
|
||||||
|
|
||||||
# -- Override the command(s) for the default container
|
# -- Override the command(s) for the default container
|
||||||
command: []
|
command: []
|
||||||
# -- Override the args for the default container
|
# -- Override the args for the default container
|
||||||
|
|||||||
Reference in New Issue
Block a user