Add common implementation for networking/storage

This commit is contained in:
Waqar Ahmed
2021-01-28 22:31:35 +05:00
parent 4f2ef3691a
commit 49a08334e0
2 changed files with 21 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
{{/*
DNS Configuration
*/}}
{{- define "dnsConfiguration" }}
dnsPolicy: {{ .Values.dnsPolicy }}
{{- if .Values.dnsConfig }}
dnsConfig:
{{- toYaml .Values.dnsConfig | nindent 2 }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,11 @@
{{/*
Retrieve host path from ix volumes based on dataset name
*/}}
{{- define "retrieveHostPathFromiXVolume" -}}
{{- range $index, $hostPathConfiguration := $.ixVolumes }}
{{- $dsName := base $hostPathConfiguration.hostPath -}}
{{- if eq $.datasetName $dsName -}}
{{- $hostPathConfiguration.hostPath -}}
{{- end -}}
{{- end }}
{{- end -}}