Take dnsPolicy from .Values.pod.dns_policy variable

Change-Id: Iae7caa5bdefe7749231c031c6003591a6251fa97
This commit is contained in:
Alexander Noskov 2019-07-10 14:13:53 -05:00
parent 769d0980f0
commit 3b5a1c7909
23 changed files with 23 additions and 14 deletions

View File

@ -91,7 +91,7 @@ spec:
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }} configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }}
spec: spec:
hostNetwork: true hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet dnsPolicy: {{ .Values.pod.dns_policy }}
serviceAccountName: {{ $serviceAccountName }} serviceAccountName: {{ $serviceAccountName }}
{{ if $envAll.Values.pod.tolerations.metricbeat.enabled }} {{ if $envAll.Values.pod.tolerations.metricbeat.enabled }}
{{ tuple $envAll "metricbeat" | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 6 }} {{ tuple $envAll "metricbeat" | include "helm-toolkit.snippets.kubernetes_tolerations" | indent 6 }}

View File

@ -221,6 +221,7 @@ pod:
enabled: true enabled: true
min_ready_seconds: 0 min_ready_seconds: 0
max_unavailable: 1 max_unavailable: 1
dns_policy: "ClusterFirstWithHostNet"
replicas: replicas:
metricbeat: 1 metricbeat: 1
resources: resources:

View File

@ -92,7 +92,7 @@ spec:
securityContext: securityContext:
runAsUser: 0 runAsUser: 0
hostNetwork: true hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet dnsPolicy: {{ .Values.pod.dns_policy }}
serviceAccountName: {{ $serviceAccountName }} serviceAccountName: {{ $serviceAccountName }}
initContainers: initContainers:
{{ tuple $envAll "packetbeat" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} {{ tuple $envAll "packetbeat" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}

View File

@ -159,6 +159,7 @@ pod:
enabled: true enabled: true
min_ready_seconds: 0 min_ready_seconds: 0
max_unavailable: 1 max_unavailable: 1
dns_policy: "ClusterFirstWithHostNet"
replicas: replicas:
packetbeat: 1 packetbeat: 1
resources: resources:

View File

@ -105,7 +105,7 @@ spec:
{{ end }} {{ end }}
hostNetwork: true hostNetwork: true
hostPID: true hostPID: true
dnsPolicy: ClusterFirstWithHostNet dnsPolicy: {{ .Values.pod.dns_policy }}
initContainers: initContainers:
{{ tuple $envAll "fluentbit" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} {{ tuple $envAll "fluentbit" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
containers: containers:

View File

@ -220,6 +220,7 @@ pod:
default: preferredDuringSchedulingIgnoredDuringExecution default: preferredDuringSchedulingIgnoredDuringExecution
topologyKey: topologyKey:
default: kubernetes.io/hostname default: kubernetes.io/hostname
dns_policy: "ClusterFirstWithHostNet"
lifecycle: lifecycle:
upgrades: upgrades:
daemonsets: daemonsets:

View File

@ -191,7 +191,7 @@ spec:
{{- if .Values.network.host_namespace }} {{- if .Values.network.host_namespace }}
hostNetwork: true hostNetwork: true
{{- end }} {{- end }}
dnsPolicy: "ClusterFirstWithHostNet" dnsPolicy: {{ .Values.pod.dns_policy }}
terminationGracePeriodSeconds: {{ .Values.pod.lifecycle.termination_grace_period.server.timeout | default "60" }} terminationGracePeriodSeconds: {{ .Values.pod.lifecycle.termination_grace_period.server.timeout | default "60" }}
initContainers: initContainers:
{{ tuple $envAll "ingress" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} {{ tuple $envAll "ingress" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}

View File

@ -82,6 +82,7 @@ pod:
default: kubernetes.io/hostname default: kubernetes.io/hostname
weight: weight:
default: 10 default: 10
dns_policy: "ClusterFirstWithHostNet"
replicas: replicas:
ingress: 1 ingress: 1
error_page: 1 error_page: 1

View File

@ -178,7 +178,7 @@ spec:
memory: 20Mi memory: 20Mi
terminationMessagePath: /dev/termination-log terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File terminationMessagePolicy: File
dnsPolicy: Default dnsPolicy: {{ .Values.pod.dns_policy }}
restartPolicy: Always restartPolicy: Always
schedulerName: default-scheduler schedulerName: default-scheduler
securityContext: {} securityContext: {}

View File

@ -34,6 +34,7 @@ images:
- image_repo_sync - image_repo_sync
pod: pod:
dns_policy: "Default"
resources: resources:
enabled: false enabled: false
jobs: jobs:

View File

@ -55,7 +55,7 @@ spec:
hostNetwork: true hostNetwork: true
hostPID: true hostPID: true
hostIPC: true hostIPC: true
dnsPolicy: ClusterFirstWithHostNet dnsPolicy: {{ .Values.pod.dns_policy }}
initContainers: initContainers:
{{ tuple $envAll "pod_dependency" $mounts_libvirt_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} {{ tuple $envAll "pod_dependency" $mounts_libvirt_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
{{ dict "envAll" $envAll | include "helm-toolkit.snippets.kubernetes_apparmor_loader_init_container" | indent 8 }} {{ dict "envAll" $envAll | include "helm-toolkit.snippets.kubernetes_apparmor_loader_init_container" | indent 8 }}

View File

@ -111,6 +111,7 @@ pod:
default: kubernetes.io/hostname default: kubernetes.io/hostname
weight: weight:
default: 10 default: 10
dns_policy: "ClusterFirstWithHostNet"
mounts: mounts:
libvirt: libvirt:
init_container: null init_container: null

View File

@ -47,7 +47,7 @@ spec:
{{ dict "envAll" $envAll "application" "openvswitch_db_server" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }} {{ dict "envAll" $envAll "application" "openvswitch_db_server" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }}
nodeSelector: nodeSelector:
{{ .Values.labels.ovs.node_selector_key }}: {{ .Values.labels.ovs.node_selector_value }} {{ .Values.labels.ovs.node_selector_key }}: {{ .Values.labels.ovs.node_selector_value }}
dnsPolicy: ClusterFirstWithHostNet dnsPolicy: {{ .Values.pod.dns_policy }}
hostNetwork: true hostNetwork: true
initContainers: initContainers:
{{ tuple $envAll "db" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} {{ tuple $envAll "db" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}

View File

@ -47,7 +47,7 @@ spec:
{{ dict "envAll" $envAll "application" "openvswitch_vswitchd" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }} {{ dict "envAll" $envAll "application" "openvswitch_vswitchd" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }}
nodeSelector: nodeSelector:
{{ .Values.labels.ovs.node_selector_key }}: {{ .Values.labels.ovs.node_selector_value }} {{ .Values.labels.ovs.node_selector_key }}: {{ .Values.labels.ovs.node_selector_value }}
dnsPolicy: ClusterFirstWithHostNet dnsPolicy: {{ .Values.pod.dns_policy }}
hostNetwork: true hostNetwork: true
initContainers: initContainers:
{{ tuple $envAll "vswitchd" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} {{ tuple $envAll "vswitchd" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}

View File

@ -67,6 +67,7 @@ pod:
add: add:
- NET_ADMIN - NET_ADMIN
readOnlyRootFilesystem: true readOnlyRootFilesystem: true
dns_policy: "ClusterFirstWithHostNet"
lifecycle: lifecycle:
upgrades: upgrades:
daemonsets: daemonsets:

View File

@ -45,7 +45,7 @@ spec:
serviceAccountName: {{ $serviceAccountName }} serviceAccountName: {{ $serviceAccountName }}
nodeSelector: nodeSelector:
{{ .Values.labels.registry.node_selector_key }}: {{ .Values.labels.registry.node_selector_value | quote }} {{ .Values.labels.registry.node_selector_key }}: {{ .Values.labels.registry.node_selector_value | quote }}
dnsPolicy: ClusterFirstWithHostNet dnsPolicy: {{ .Values.pod.dns_policy }}
hostNetwork: true hostNetwork: true
initContainers: initContainers:
{{ tuple $envAll "registry_proxy" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} {{ tuple $envAll "registry_proxy" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}

View File

@ -98,6 +98,7 @@ pod:
default: kubernetes.io/hostname default: kubernetes.io/hostname
weight: weight:
default: 10 default: 10
dns_policy: "ClusterFirstWithHostNet"
replicas: replicas:
registry: 1 registry: 1
lifecycle: lifecycle:

View File

@ -104,7 +104,7 @@ spec:
resources: {} resources: {}
terminationMessagePath: /dev/termination-log terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File terminationMessagePolicy: File
dnsPolicy: ClusterFirst dnsPolicy: {{ .Values.pod.dns_policy }}
restartPolicy: Always restartPolicy: Always
schedulerName: default-scheduler schedulerName: default-scheduler
securityContext: {} securityContext: {}

View File

@ -37,6 +37,7 @@ images:
- image_repo_sync - image_repo_sync
pod: pod:
dns_policy: "ClusterFirst"
security_context: security_context:
tiller: tiller:
pod: pod: