Skip to content

Commit

Permalink
Fix missing newline in string slice flags (#629)
Browse files Browse the repository at this point in the history
```
 helm template charts/kubedb \
   --namespace kubedb --create-namespace \
   --set kubedb-provisioner.enabled=true \
   --set kubedb-ops-manager.enabled=true \
   --set kubedb-autoscaler.enabled=true \
   --set kubedb-dashboard.enabled=true \
   --set kubedb-schema-manager.enabled=true \
   --set global.imagePullSecrets[0].name=regcred \
   --set global.imagePullSecrets[1].name=regcred2 \
   --set global.insecureRegistries[0]=registry.tools.example.com \
   --set global.insecureRegistries[1]=harbor.tools.example.com
```
Signed-off-by: Tamal Saha <[email protected]>
  • Loading branch information
tamalsaha committed Apr 13, 2023
1 parent 01ae0db commit 0320be8
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions charts/kubedb-one/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@ imagePullSecrets:
{{- end }}

{{- define "docker.imagePullSecretFlags" -}}
{{- range .Values.global.imagePullSecrets -}}
{{- range .Values.global.imagePullSecrets }}
- --image-pull-secrets={{- .name -}}
{{- else -}}
{{- range $.Values.imagePullSecrets -}}
{{- range $.Values.imagePullSecrets }}
- --image-pull-secrets={{- .name -}}
{{- end }}
{{- end }}
Expand All @@ -116,7 +116,7 @@ imagePullSecrets:
Returns the --insecure-registries flags
*/}}
{{- define "docker.insecureRegistries" -}}
{{- range (concat .Values.global.insecureRegistries .Values.insecureRegistries | uniq | sortAlpha) -}}
{{- range (concat .Values.global.insecureRegistries .Values.insecureRegistries | uniq | sortAlpha) }}
- --insecure-registries={{.}}
{{- end }}
{{- end }}
Expand Down
4 changes: 2 additions & 2 deletions charts/kubedb-ops-manager/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ imagePullSecrets:
{{- end }}

{{- define "docker.imagePullSecretFlags" -}}
{{- range .Values.imagePullSecrets -}}
{{- range .Values.imagePullSecrets }}
- --image-pull-secrets={{- .name -}}
{{- end }}
{{- end }}
Expand All @@ -93,7 +93,7 @@ imagePullSecrets:
Returns the --insecure-registries flags
*/}}
{{- define "docker.insecureRegistries" -}}
{{- range (.Values.insecureRegistries | uniq | sortAlpha) -}}
{{- range (.Values.insecureRegistries | uniq | sortAlpha) }}
- --insecure-registries={{.}}
{{- end }}
{{- end }}
Expand Down
4 changes: 2 additions & 2 deletions charts/kubedb-provisioner/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,13 @@ imagePullSecrets:
Returns the --insecure-registries flags
*/}}
{{- define "docker.insecureRegistries" -}}
{{- range (.Values.insecureRegistries | uniq | sortAlpha) -}}
{{- range (.Values.insecureRegistries | uniq | sortAlpha) }}
- --insecure-registries={{.}}
{{- end }}
{{- end }}

{{- define "docker.imagePullSecretFlags" -}}
{{- range .Values.imagePullSecrets -}}
{{- range .Values.imagePullSecrets }}
- --image-pull-secrets={{- .name -}}
{{- end }}
{{- end }}
Expand Down
8 changes: 4 additions & 4 deletions charts/kubedb/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@ imagePullSecrets:
{{- end }}

{{- define "docker.imagePullSecretFlags" -}}
{{- range .Values.global.imagePullSecrets -}}
{{- range .Values.global.imagePullSecrets }}
- --image-pull-secrets={{- .name -}}
{{- else -}}
{{- range $.Values.imagePullSecrets -}}
{{- range $.Values.imagePullSecrets }}
- --image-pull-secrets={{- .name -}}
{{- end }}
{{- end }}
Expand All @@ -116,9 +116,9 @@ imagePullSecrets:
Returns the --insecure-registries flags
*/}}
{{- define "docker.insecureRegistries" -}}
{{- range (concat .Values.global.insecureRegistries .Values.insecureRegistries | uniq | sortAlpha) -}}
{{- range (concat .Values.global.insecureRegistries .Values.insecureRegistries | uniq | sortAlpha) }}
- --insecure-registries={{.}}
{{- end }}
{{- end -}}
{{- end }}

{{/*
Expand Down

0 comments on commit 0320be8

Please sign in to comment.