mirror of
https://github.com/bitnami/charts.git
synced 2026-03-01 06:58:20 +08:00
[bitnami/common] fix: wrong use of append function (#3566)
* [bitnami/common] fix: wrong use of append function Signed-off-by: darteaga <darteaga@vmware.com> * fix: indentation Signed-off-by: darteaga <darteaga@vmware.com>
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
apiVersion: v1
|
||||
name: common
|
||||
# Please make sure that version and appVersion are always the same.
|
||||
version: 0.6.1
|
||||
appVersion: 0.6.1
|
||||
version: 0.6.2
|
||||
appVersion: 0.6.2
|
||||
description: A Library Helm Chart for grouping common logic between bitnami charts. This chart is not deployable by itself.
|
||||
keywords:
|
||||
- common
|
||||
|
||||
@@ -52,7 +52,7 @@ The following table lists the helpers available in the library which are scoped
|
||||
| Helper identifier | Description | Expected Input |
|
||||
|--------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `common.images.image` | Return the proper and full image name | `dict "imageRoot" .Values.path.to.the.image "global" $`, see [ImageRoot](#imageroot) for the structure. |
|
||||
| `common.images.pullSecrets` | Return the proper Docker Image Registry Secret Names | `dict "images" (list .Values.path.to.the.image1, .Values.path.to.the.image2) "global" $` |
|
||||
| `common.images.pullSecrets` | Return the proper Docker Image Registry Secret Names | `dict "images" (list .Values.path.to.the.image1, .Values.path.to.the.image2) "global" .Values.global` |
|
||||
|
||||
**Labels**
|
||||
|
||||
|
||||
@@ -17,28 +17,27 @@ Return the proper image name
|
||||
|
||||
{{/*
|
||||
Return the proper Docker Image Registry Secret Names
|
||||
{{ include "common.images.pullSecrets" ( dict "images" (list .Values.path.to.the.image1, .Values.path.to.the.image2) "global" $) }}
|
||||
{{ include "common.images.pullSecrets" ( dict "images" (list .Values.path.to.the.image1, .Values.path.to.the.image2) "global" .Values.global) }}
|
||||
*/}}
|
||||
{{- define "common.images.pullSecrets" -}}
|
||||
{{- if .global }}
|
||||
{{- if .global.imagePullSecrets }}
|
||||
{{- $pullSecrets := list }}
|
||||
|
||||
{{- if .global }}
|
||||
{{- range .global.imagePullSecrets -}}
|
||||
{{- $pullSecrets = append $pullSecrets . -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- range .images -}}
|
||||
{{- range .pullSecrets -}}
|
||||
{{- $pullSecrets = append $pullSecrets . -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if (not (empty $pullSecrets)) }}
|
||||
imagePullSecrets:
|
||||
{{- range .global.imagePullSecrets }}
|
||||
{{- range $pullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
{{- $pullSecrets := list }}
|
||||
{{- range .images }}
|
||||
{{- if .pullSecrets }}
|
||||
{{- $pullSecrets = append $pullSecrets .pullSecrets }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if $pullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- range $pullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
Reference in New Issue
Block a user