mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-04 00:47:04 +02:00
feat(common): Release version 2.0.0-beta.1 (#173)
This commit is contained in:
parent
19767d668c
commit
7b6ee00be6
189 changed files with 3110 additions and 3023 deletions
|
@ -0,0 +1,25 @@
|
|||
{{- /*
|
||||
Returns the value for dnsPolicy
|
||||
*/ -}}
|
||||
{{- define "bjw-s.common.lib.pod.field.dnsPolicy" -}}
|
||||
{{- $ctx := .ctx -}}
|
||||
{{- $controllerObject := $ctx.controllerObject -}}
|
||||
|
||||
{{- /* Default to "ClusterFirst" */ -}}
|
||||
{{- $dnsPolicy := "ClusterFirst" -}}
|
||||
|
||||
{{- /* Get hostNetwork value "" */ -}}
|
||||
{{- $hostNetwork:= get $controllerObject.pod "hostNetwork" -}}
|
||||
{{- if $hostNetwork -}}
|
||||
{{- $dnsPolicy = "ClusterFirstWithHostNet" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- /* See if an override is desired */ -}}
|
||||
{{- $override := get $controllerObject.pod "dnsPolicy" -}}
|
||||
|
||||
{{- if not (empty $override) -}}
|
||||
{{- $dnsPolicy = $override -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $dnsPolicy -}}
|
||||
{{- end -}}
|
Loading…
Add table
Add a link
Reference in a new issue