mirror of
https://github.com/truenas/charts.git
synced 2024-04-21 15:21:45 +00:00
dnspolicy
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
{{/* Returns dnsPolicy */}}
|
||||
{{- define "ix.v1.common.dnsPolicy" -}}
|
||||
{{- $policy := "ClusterFirst" -}}
|
||||
{{- if .Values.dnsPolicy -}}
|
||||
{{- if and (ne .Values.dnsPolicy "Default") (ne .Values.dnsPolicy "ClusterFirst") (ne .Values.dnsPolicy "ClusterFirstWithHostNet") (ne .Values.dnsPolicy "None") -}}
|
||||
{{- fail "Not valid dnsPolicy. Valid options are ClusterFirst, Default, ClusterFirstWithHostNet, None" -}}
|
||||
{{- end -}}
|
||||
{{- $policy = .Values.dnsPolicy -}}
|
||||
{{- else if .Values.hostNetwork -}}
|
||||
{{- $policy = "ClusterFirstWithHostNet" -}}
|
||||
{{- end -}}
|
||||
{{- $policy -}}
|
||||
{{- end -}}
|
||||
@@ -1,7 +1,7 @@
|
||||
{{/* Common labels shared across objects */}}
|
||||
{{- define "ix.v1.common.labels" -}}
|
||||
helm.sh/chart: {{ include "ix.v1.common.names.chart" . }}
|
||||
{{- include "ix.v1.common.labels.selectorLabels" . }}
|
||||
{{ include "ix.v1.common.labels.selectorLabels" . }}
|
||||
{{- if .Chart.AppVersion }}
|
||||
helm-revision: {{ .Release.Revision | quote }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||
|
||||
@@ -10,6 +10,9 @@ hostNetwork: {{ .Values.hostNetwork }}
|
||||
{{- with .Values.hostname }}
|
||||
hostname: {{ tpl . $ }}
|
||||
{{- end -}}
|
||||
{{- with (include "ix.v1.common.dnsPolicy" . | trim ) }}
|
||||
dnsPolicy: {{ . }}
|
||||
{{- end -}}
|
||||
{{- with .Values.termination.gracePeriodSeconds }}
|
||||
terminationGracePeriodSeconds: {{ . }}
|
||||
{{- end }}
|
||||
|
||||
@@ -49,6 +49,8 @@ schedulerName: ""
|
||||
|
||||
priorityClassName: ""
|
||||
|
||||
dnsPolicy: ""
|
||||
|
||||
# TODO: docs
|
||||
podSecurityContext:
|
||||
runAsUser: 568
|
||||
|
||||
Reference in New Issue
Block a user