Эх сурвалжийг харах

Add common implementation for networking/storage

Waqar Ahmed 4 жил өмнө
parent
commit
49a08334e0

+ 10 - 0
library/common/templates/lib/networking/_dns.tpl

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

+ 11 - 0
library/common/templates/lib/storage/_ixvolumes.tpl

@@ -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 -}}