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:

View File

@@ -34,6 +34,7 @@ spec:
{% endif %}
serviceAccountName: cloud-controller-manager
hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet
nodeSelector:
node-role.kubernetes.io/master: ""
tolerations:

View File

@@ -65,6 +65,7 @@ spec:
volumes:
- '*'
hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet
hostPorts:
- min: 0
max: 65535

View File

@@ -29,6 +29,7 @@ spec:
- operator: "Exists"
effect: "NoSchedule"
hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet
hostPID: true
volumes:
- name: device-plugin

View File

@@ -36,6 +36,7 @@ spec:
effect: "NoSchedule"
operator: "Exists"
hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet
hostPID: true
volumes:
- name: dev

View File

@@ -24,6 +24,7 @@ spec:
serviceAccountName: ingress-nginx
{% if ingress_nginx_host_network %}
hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet
{% endif %}
{% if ingress_nginx_nodeselector %}
nodeSelector:

View File

@@ -26,6 +26,9 @@ spec:
- 'downwardAPI'
- 'persistentVolumeClaim'
hostNetwork: {{ ingress_nginx_host_network|bool }}
{%% if ingress_nginx_host_network %}
dnsPolicy: ClusterFirstWithHostNet
{% endif %}
hostPorts:
- min: 0
max: 65535

View File

@@ -25,6 +25,7 @@ spec:
nodeSelector:
beta.kubernetes.io/os: linux
hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet
serviceAccountName: calico-kube-controllers
tolerations:
- key: CriticalAddonsOnly

View File

@@ -35,6 +35,7 @@ spec:
- 'downwardAPI'
- 'persistentVolumeClaim'
hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet
hostPorts:
- min: 5000
max: 5000