mirror of
https://github.com/truenas/charts.git
synced 2026-04-26 11:35:13 +08:00
Add common implementation for networking/storage
This commit is contained in:
10
library/common/templates/lib/networking/_dns.tpl
Normal file
10
library/common/templates/lib/networking/_dns.tpl
Normal file
@@ -0,0 +1,10 @@
|
||||
{{/*
|
||||
DNS Configuration
|
||||
*/}}
|
||||
{{- define "dnsConfiguration" }}
|
||||
dnsPolicy: {{ .Values.dnsPolicy }}
|
||||
{{- if .Values.dnsConfig }}
|
||||
dnsConfig:
|
||||
{{- toYaml .Values.dnsConfig | nindent 2 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
11
library/common/templates/lib/storage/_ixvolumes.tpl
Normal file
11
library/common/templates/lib/storage/_ixvolumes.tpl
Normal 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 -}}
|
||||
Reference in New Issue
Block a user