File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ apiVersion: v2
22name : network-bootstrapper
33description : A Helm chart for Kubernetes
44type : application
5- version : 0.1.0
5+ version : 0.1.1
66appVersion : " 0.1.0"
77maintainers :
88 - name : SettleMint
Original file line number Diff line number Diff line change 11# network-bootstrapper
22
3- ![ Version: 0.1.0 ] ( https://img.shields.io/badge/Version-0.1.0 -informational?style=flat-square ) ![ Type: application] ( https://img.shields.io/badge/Type-application-informational?style=flat-square ) ![ AppVersion: 0.1.0] ( https://img.shields.io/badge/AppVersion-0.1.0-informational?style=flat-square )
3+ ![ Version: 0.1.1 ] ( https://img.shields.io/badge/Version-0.1.1 -informational?style=flat-square ) ![ Type: application] ( https://img.shields.io/badge/Type-application-informational?style=flat-square ) ![ AppVersion: 0.1.0] ( https://img.shields.io/badge/AppVersion-0.1.0-informational?style=flat-square )
44
55A Helm chart for Kubernetes
66
Original file line number Diff line number Diff line change @@ -60,3 +60,20 @@ Create the name of the service account to use
6060{{- default " default" .Values.serviceAccount.name }}
6161{{- end }}
6262{{- end }}
63+
64+ {{/*
65+ Render init container specifications provided via values.
66+ Accepts either a YAML string or a list of init container maps and indents output appropriately.
67+ */ }}
68+ {{- define " network-bootstrapper.renderInitContainers" -}}
69+ {{- $ctx := .context -}}
70+ {{- $containers := .containers -}}
71+ {{- $indent := .indent | default 2 -}}
72+ {{- if $containers -}}
73+ {{- if kindIs " string" $containers -}}
74+ {{ tpl $containers $ctx | nindent $indent }}
75+ {{- else -}}
76+ {{ tpl (toYaml $containers ) $ctx | nindent $indent }}
77+ {{- end -}}
78+ {{- end -}}
79+ {{- end -}}
Original file line number Diff line number Diff line change 3131 {{- end }}
3232 {{- with .Values.initContainers }}
3333 initContainers :
34- {{- if kindIs "string" . -}}
35- {{ tpl . $ | nindent 8 }}
36- {{- else -}}
37- {{ tpl (toYaml .) $ | nindent 8 }}
38- {{- end }}
34+ {{- include "network-bootstrapper.renderInitContainers" (dict "context" $ "containers" . "indent" 8) }}
3935 {{- end }}
4036 containers :
4137 - name : {{ .Chart.Name }}
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ apiVersion: v2
22name : network-nodes
33description : A Helm chart for Kubernetes
44type : application
5- version : 0.1.0
5+ version : 0.1.1
66appVersion : " 0.1.0"
77maintainers :
88 - name : SettleMint
Original file line number Diff line number Diff line change 11# network-nodes
22
3- ![ Version: 0.1.0 ] ( https://img.shields.io/badge/Version-0.1.0 -informational?style=flat-square ) ![ Type: application] ( https://img.shields.io/badge/Type-application-informational?style=flat-square ) ![ AppVersion: 0.1.0] ( https://img.shields.io/badge/AppVersion-0.1.0-informational?style=flat-square )
3+ ![ Version: 0.1.1 ] ( https://img.shields.io/badge/Version-0.1.1 -informational?style=flat-square ) ![ Type: application] ( https://img.shields.io/badge/Type-application-informational?style=flat-square ) ![ AppVersion: 0.1.0] ( https://img.shields.io/badge/AppVersion-0.1.0-informational?style=flat-square )
44
55A Helm chart for Kubernetes
66
Original file line number Diff line number Diff line change @@ -69,11 +69,11 @@ Accepts either a YAML string or a list of init container maps and indents output
6969{{- $ctx := .context -}}
7070{{- $containers := .containers -}}
7171{{- $indent := .indent | default 2 -}}
72- {{- if $containers }}
73- {{- if kindIs " string" $containers -}}
72+ {{- if $containers - }}
73+ {{- if kindIs " string" $containers -}}
7474{{ tpl $containers $ctx | nindent $indent }}
75- {{- else -}}
75+ {{- else -}}
7676{{ tpl (toYaml $containers ) $ctx | nindent $indent }}
77- {{- end -}}
7877{{- end -}}
79- {{- end }}
78+ {{- end -}}
79+ {{- end -}}
You can’t perform that action at this time.
0 commit comments