Set dnsPolicy to ClusterFirstWithHostNet when hostNetwork is true (#4843)

This commit is contained in:
Andreas Krüger
2019-06-05 12:17:56 +02:00
committed by Kubernetes Prow Robot
parent 045acc724b
commit 818aa7aeb1
27 changed files with 30 additions and 4 deletions

View File

@@ -12,12 +12,10 @@ spec:
labels:
app: netchecker-agent-hostnet
spec:
hostNetwork: True
hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet
nodeSelector:
beta.kubernetes.io/os: linux
{% if kube_version is version('v1.6', '>=') %}
dnsPolicy: ClusterFirstWithHostNet
{% endif %}
{% if kube_version is version('v1.11.1', '>=') %}
priorityClassName: {% if netcheck_namespace == 'kube-system' %}system-node-critical{% else %}k8s-cluster-critical{% endif %}{{''}}
{% endif %}

View File

@@ -26,6 +26,7 @@ spec:
- 'downwardAPI'
- 'persistentVolumeClaim'
hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet
hostIPC: false
hostPID: false
runAsUser: