Skip to content

Commit f4a09f3

Browse files
committed
fix(helm): address review feedback
1 parent f07f8d0 commit f4a09f3

7 files changed

Lines changed: 27 additions & 14 deletions

File tree

charts/network/charts/network-bootstrapper/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: network-bootstrapper
33
description: A Helm chart for Kubernetes
44
type: application
5-
version: 0.1.0
5+
version: 0.1.1
66
appVersion: "0.1.0"
77
maintainers:
88
- name: SettleMint

charts/network/charts/network-bootstrapper/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
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

55
A Helm chart for Kubernetes
66

charts/network/charts/network-bootstrapper/templates/_helpers.tpl

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff 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 -}}

charts/network/charts/network-bootstrapper/templates/job.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,7 @@ spec:
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 }}

charts/network/charts/network-nodes/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: network-nodes
33
description: A Helm chart for Kubernetes
44
type: application
5-
version: 0.1.0
5+
version: 0.1.1
66
appVersion: "0.1.0"
77
maintainers:
88
- name: SettleMint

charts/network/charts/network-nodes/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
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

55
A Helm chart for Kubernetes
66

charts/network/charts/network-nodes/templates/_helpers.tpl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff 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 -}}

0 commit comments

Comments
 (0)