diff --git a/doc/source/deployment-guide.rst b/doc/source/deployment-guide.rst index 8af4d5e53..f0b40616c 100644 --- a/doc/source/deployment-guide.rst +++ b/doc/source/deployment-guide.rst @@ -48,9 +48,9 @@ Dependencies:: docker == 1.12.6 helm >= 2.4.1 - kubectl >= 1.6.4 - kubeadm >= 1.6.4 - kubelet >= 1.6.4 + kubectl >= 1.8.0 + kubeadm >= 1.8.0 + kubelet >= 1.8.0 kubernetes-cni >= 0.5.1 .. note:: @@ -489,10 +489,6 @@ Create and register the Kolla config maps:: cinder-scheduler cinder-volume iscsid tgtd keepalived \ placement-api placement-api-haproxy -Enable resolv.conf workaround:: - - kolla-kubernetes/tools/setup-resolv-conf.sh kolla - Build all Helm microcharts, service charts, and metacharts:: kolla-kubernetes/tools/helm_build_all.sh . @@ -514,7 +510,6 @@ Create a local cloud.yaml file for the deployment of the charts:: base_distro: "centos" install_type: "source" tunnel_interface: "docker0" - resolve_conf_net_host_workaround: true keystone: all: admin_port_external: "true" diff --git a/etc/kolla-kubernetes/kolla-kubernetes.yml b/etc/kolla-kubernetes/kolla-kubernetes.yml index b543f7a66..e61a34b95 100755 --- a/etc/kolla-kubernetes/kolla-kubernetes.yml +++ b/etc/kolla-kubernetes/kolla-kubernetes.yml @@ -227,7 +227,6 @@ storage_interface: "eth0" ######################## kolla_kubernetes_ovs_setup_bridge: "yes" kolla_kubernetes_ovs_add_port: "yes" -enable_resolve_conf_net_host_workaround: "yes" ######################## # Ceph variables diff --git a/helm/all_values.yaml b/helm/all_values.yaml index e568fadc6..aff68ba8b 100755 --- a/helm/all_values.yaml +++ b/helm/all_values.yaml @@ -18,7 +18,6 @@ common: image_pull_policy: IfNotPresent container_config_directory: /var/lib/kolla/config_files kubernetes_entrypoint: false - resolve_conf_net_host_workaround: true kolla_kubernetes_external_vip: 172.18.0.1 kolla_kubernetes_external_subnet: 24 kube_logger: true diff --git a/helm/kolla-common/templates/_common_lib.yaml b/helm/kolla-common/templates/_common_lib.yaml index 281d7cd30..1760d27d1 100644 --- a/helm/kolla-common/templates/_common_lib.yaml +++ b/helm/kolla-common/templates/_common_lib.yaml @@ -1,20 +1,9 @@ {{- define "common_volume_mounts" }} -{{- $localVals := dict }} -{{- $c1 := dict "searchPath" .searchPath "Values" .Values }} -{{- $_ := set $c1 "key" "resolve_conf_net_host_workaround" }} -{{- $_ := set $c1 "retDict" $localVals }} -{{- $_ := set $c1 "retKey" "resolve_conf_net_host_workaround" }} -{{- $_ := include "kolla_val_get_raw" $c1 }} - mountPath: /var/log/kolla/ name: kolla-logs - mountPath: /etc/localtime name: host-etc-localtime readOnly: true -{{- if and .netHostTrue $localVals.resolve_conf_net_host_workaround }} -- mountPath: /etc/resolv.conf - name: resolv-conf - subPath: resolv.conf -{{- end }} {{- end }} {{- define "common_containers" }} @@ -47,11 +36,6 @@ {{- $_ := set $c1 "retDict" $localVals }} {{- $_ := set $c1 "retKey" "kube_logger" }} {{- $_ := include "kolla_val_get_raw" $c1 }} -{{- $c2 := dict "searchPath" .searchPath "Values" .Values }} -{{- $_ := set $c2 "key" "resolve_conf_net_host_workaround" }} -{{- $_ := set $c2 "retDict" $localVals }} -{{- $_ := set $c2 "retKey" "resolve_conf_net_host_workaround" }} -{{- $_ := include "kolla_val_get_raw" $c2 }} {{- $loggerConfigmapName := include "kolla_val_get_str" (dict "key" "logger_configmap_name" "searchPath" .searchPath "Values" .Values ) }} - name: host-etc-localtime hostPath: @@ -65,11 +49,6 @@ {{- $loggerConfigmapNameDefault := printf "%s-logging" .resourceName }} name: {{ $loggerConfigmapName | default $loggerConfigmapNameDefault }} {{- end }} -{{- if and .netHostTrue $localVals.resolve_conf_net_host_workaround }} -- name: resolv-conf - configMap: - name: resolv-conf -{{- end }} {{- end }} {{- define "common_bootstrap_env_vars" }} diff --git a/helm/microservice/ceph-admin-pod/templates/ceph-admin-pod.yaml b/helm/microservice/ceph-admin-pod/templates/ceph-admin-pod.yaml index 6a66d2f29..4dfa88b16 100644 --- a/helm/microservice/ceph-admin-pod/templates/ceph-admin-pod.yaml +++ b/helm/microservice/ceph-admin-pod/templates/ceph-admin-pod.yaml @@ -16,6 +16,7 @@ kind: Pod metadata: name: ceph-admin spec: + dnsPolicy: ClusterFirstWithHostNet hostNetwork: True hostPID: True nodeSelector: diff --git a/helm/microservice/ceph-rbd-daemonset/templates/ceph-rbd-daemonset.yaml b/helm/microservice/ceph-rbd-daemonset/templates/ceph-rbd-daemonset.yaml index cead33ef2..921702f3d 100644 --- a/helm/microservice/ceph-rbd-daemonset/templates/ceph-rbd-daemonset.yaml +++ b/helm/microservice/ceph-rbd-daemonset/templates/ceph-rbd-daemonset.yaml @@ -25,6 +25,7 @@ spec: component: ceph system: rbd spec: + dnsPolicy: ClusterFirstWithHostNet hostNetwork: True hostPID: True nodeSelector: diff --git a/helm/microservice/cinder-volume-lvm-daemonset/templates/cinder-volume-lvm-daemonset.yaml b/helm/microservice/cinder-volume-lvm-daemonset/templates/cinder-volume-lvm-daemonset.yaml index f15ea7898..0e86744b5 100644 --- a/helm/microservice/cinder-volume-lvm-daemonset/templates/cinder-volume-lvm-daemonset.yaml +++ b/helm/microservice/cinder-volume-lvm-daemonset/templates/cinder-volume-lvm-daemonset.yaml @@ -37,6 +37,7 @@ spec: component: {{ $resourceName }} system: {{ $elementName }} spec: + dnsPolicy: ClusterFirstWithHostNet hostNetwork: True hostIPC: True nodeSelector: diff --git a/helm/microservice/ironic-conductor-daemonset/templates/ironic-conductor.yaml b/helm/microservice/ironic-conductor-daemonset/templates/ironic-conductor.yaml index 6d4a6a72d..83e4e93e7 100644 --- a/helm/microservice/ironic-conductor-daemonset/templates/ironic-conductor.yaml +++ b/helm/microservice/ironic-conductor-daemonset/templates/ironic-conductor.yaml @@ -37,6 +37,7 @@ spec: component: {{ $serviceName }} system: {{ $elementName }} spec: + dnsPolicy: ClusterFirstWithHostNet hostNetwork: True hostIPC: True nodeSelector: diff --git a/helm/microservice/ironic-inspector-deployment/templates/ironic-inspector.yaml b/helm/microservice/ironic-inspector-deployment/templates/ironic-inspector.yaml index 032df62c7..63e11de8a 100644 --- a/helm/microservice/ironic-inspector-deployment/templates/ironic-inspector.yaml +++ b/helm/microservice/ironic-inspector-deployment/templates/ironic-inspector.yaml @@ -51,6 +51,7 @@ spec: service: {{ $serviceName }} type: {{ $serviceType }} spec: + dnsPolicy: ClusterFirstWithHostNet hostNetwork: True nodeSelector: {{ $selectorKey }}: {{ $selectorValue | quote }} diff --git a/helm/microservice/iscsi-target-daemonset/templates/iscsi-target-daemonset.yaml b/helm/microservice/iscsi-target-daemonset/templates/iscsi-target-daemonset.yaml index 489af92db..25a2749be 100644 --- a/helm/microservice/iscsi-target-daemonset/templates/iscsi-target-daemonset.yaml +++ b/helm/microservice/iscsi-target-daemonset/templates/iscsi-target-daemonset.yaml @@ -28,6 +28,7 @@ spec: component: iscsi-target system: iscsi-target spec: + dnsPolicy: ClusterFirstWithHostNet hostNetwork: True hostIPC: True hostPID: True diff --git a/helm/microservice/iscsid-daemonset/templates/iscsid-daemonset.yaml b/helm/microservice/iscsid-daemonset/templates/iscsid-daemonset.yaml index f1dba5eea..ca10c31b1 100644 --- a/helm/microservice/iscsid-daemonset/templates/iscsid-daemonset.yaml +++ b/helm/microservice/iscsid-daemonset/templates/iscsid-daemonset.yaml @@ -27,6 +27,7 @@ spec: component: iscsid system: iscsid spec: + dnsPolicy: ClusterFirstWithHostNet hostNetwork: True hostIPC: True nodeSelector: diff --git a/helm/microservice/keepalived-daemonset/templates/keepalived-daemonset.yaml b/helm/microservice/keepalived-daemonset/templates/keepalived-daemonset.yaml index ccf8177e6..88174cb63 100644 --- a/helm/microservice/keepalived-daemonset/templates/keepalived-daemonset.yaml +++ b/helm/microservice/keepalived-daemonset/templates/keepalived-daemonset.yaml @@ -29,6 +29,7 @@ spec: component: keepalived system: keepalived spec: + dnsPolicy: ClusterFirstWithHostNet hostNetwork: True nodeSelector: {{ $selectorKey }}: {{ $selectorValue | quote }} diff --git a/helm/microservice/neutron-dhcp-agent-daemonset/templates/dhcp-agent-daemonset.yaml b/helm/microservice/neutron-dhcp-agent-daemonset/templates/dhcp-agent-daemonset.yaml index b9ea047e4..a4d7fdd8a 100644 --- a/helm/microservice/neutron-dhcp-agent-daemonset/templates/dhcp-agent-daemonset.yaml +++ b/helm/microservice/neutron-dhcp-agent-daemonset/templates/dhcp-agent-daemonset.yaml @@ -32,6 +32,7 @@ spec: component: neutron system: dhcp-agent spec: + dnsPolicy: ClusterFirstWithHostNet hostNetwork: True hostIPC: True hostPID: True diff --git a/helm/microservice/neutron-l3-agent-daemonset/templates/l3-agent-daemonset.yaml b/helm/microservice/neutron-l3-agent-daemonset/templates/l3-agent-daemonset.yaml index 661f277e7..23d7a615c 100644 --- a/helm/microservice/neutron-l3-agent-daemonset/templates/l3-agent-daemonset.yaml +++ b/helm/microservice/neutron-l3-agent-daemonset/templates/l3-agent-daemonset.yaml @@ -37,6 +37,7 @@ spec: component: neutron system: l3-agent-{{ $restype }} spec: + dnsPolicy: ClusterFirstWithHostNet hostNetwork: True hostIPC: True hostPID: True diff --git a/helm/microservice/neutron-metadata-agent-daemonset/templates/metadata-agent-daemonset.yaml b/helm/microservice/neutron-metadata-agent-daemonset/templates/metadata-agent-daemonset.yaml index 0e83ce5e5..9fdeda1c6 100644 --- a/helm/microservice/neutron-metadata-agent-daemonset/templates/metadata-agent-daemonset.yaml +++ b/helm/microservice/neutron-metadata-agent-daemonset/templates/metadata-agent-daemonset.yaml @@ -27,6 +27,7 @@ spec: component: neutron system: metadata-agent-{{ $restype }} spec: + dnsPolicy: ClusterFirstWithHostNet hostNetwork: True nodeSelector: {{ $selectorKey }}: {{ $selectorValue | quote }} diff --git a/helm/microservice/neutron-openvswitch-agent-daemonset/templates/openvswitch-agent-daemonset.yaml b/helm/microservice/neutron-openvswitch-agent-daemonset/templates/openvswitch-agent-daemonset.yaml index 217205ffd..e7800988f 100644 --- a/helm/microservice/neutron-openvswitch-agent-daemonset/templates/openvswitch-agent-daemonset.yaml +++ b/helm/microservice/neutron-openvswitch-agent-daemonset/templates/openvswitch-agent-daemonset.yaml @@ -37,6 +37,7 @@ spec: component: neutron system: openvswitch-agent-{{ $restype }} spec: + dnsPolicy: ClusterFirstWithHostNet hostNetwork: True hostIPC: True hostPID: True #needed for openvswitch pid file diff --git a/helm/microservice/nova-compute-daemonset/templates/nova-compute.yaml b/helm/microservice/nova-compute-daemonset/templates/nova-compute.yaml index 0ae1d717b..e1586b128 100644 --- a/helm/microservice/nova-compute-daemonset/templates/nova-compute.yaml +++ b/helm/microservice/nova-compute-daemonset/templates/nova-compute.yaml @@ -48,6 +48,7 @@ spec: component: {{ $serviceName }} system: {{ $elementName }} spec: + dnsPolicy: ClusterFirstWithHostNet hostNetwork: True nodeSelector: {{ $selectorKey }}: {{ $selectorValue | quote }} diff --git a/helm/microservice/nova-libvirt-daemonset/templates/nova-libvirt.yaml b/helm/microservice/nova-libvirt-daemonset/templates/nova-libvirt.yaml index ec0e577ad..58caaaf58 100644 --- a/helm/microservice/nova-libvirt-daemonset/templates/nova-libvirt.yaml +++ b/helm/microservice/nova-libvirt-daemonset/templates/nova-libvirt.yaml @@ -39,6 +39,7 @@ spec: component: {{ $serviceName }} system: {{ $elementName }} spec: + dnsPolicy: ClusterFirstWithHostNet hostNetwork: True hostPID: True nodeSelector: diff --git a/helm/microservice/openvswitch-ovsdb-daemonset/templates/openvswitch-ovsdb-daemonset.yaml b/helm/microservice/openvswitch-ovsdb-daemonset/templates/openvswitch-ovsdb-daemonset.yaml index 5c1e85850..cb5ebc171 100644 --- a/helm/microservice/openvswitch-ovsdb-daemonset/templates/openvswitch-ovsdb-daemonset.yaml +++ b/helm/microservice/openvswitch-ovsdb-daemonset/templates/openvswitch-ovsdb-daemonset.yaml @@ -27,6 +27,7 @@ spec: component: openvswitch system: openvswitch-db-{{ $restype }} spec: + dnsPolicy: ClusterFirstWithHostNet hostNetwork: True hostIPC: True nodeSelector: diff --git a/helm/microservice/openvswitch-vswitchd-daemonset/templates/openvswitch-vswitchd-daemonset.yaml b/helm/microservice/openvswitch-vswitchd-daemonset/templates/openvswitch-vswitchd-daemonset.yaml index f8c536060..73946035a 100644 --- a/helm/microservice/openvswitch-vswitchd-daemonset/templates/openvswitch-vswitchd-daemonset.yaml +++ b/helm/microservice/openvswitch-vswitchd-daemonset/templates/openvswitch-vswitchd-daemonset.yaml @@ -43,6 +43,7 @@ spec: component: openvswitch system: openvswitch-vswitchd-{{ $restype }} spec: + dnsPolicy: ClusterFirstWithHostNet hostNetwork: True hostIPC: True hostPID: True #Needed for pidfile. diff --git a/helm/microservice/test-ceph-init-mon-job/templates/test_ceph_init_mon_job.yaml b/helm/microservice/test-ceph-init-mon-job/templates/test_ceph_init_mon_job.yaml index b99190d3d..bdfe9acb0 100644 --- a/helm/microservice/test-ceph-init-mon-job/templates/test_ceph_init_mon_job.yaml +++ b/helm/microservice/test-ceph-init-mon-job/templates/test_ceph_init_mon_job.yaml @@ -21,6 +21,7 @@ metadata: spec: template: spec: + dnsPolicy: ClusterFirstWithHostNet hostNetwork: True hostPID: True nodeSelector: diff --git a/helm/microservice/test-ceph-init-osd-job/templates/test-ceph-init-osd-job.yaml b/helm/microservice/test-ceph-init-osd-job/templates/test-ceph-init-osd-job.yaml index 79bcea488..f12d08219 100644 --- a/helm/microservice/test-ceph-init-osd-job/templates/test-ceph-init-osd-job.yaml +++ b/helm/microservice/test-ceph-init-osd-job/templates/test-ceph-init-osd-job.yaml @@ -19,6 +19,7 @@ kind: Pod metadata: name: ceph-bootstrap-osd{{ $index }} spec: + dnsPolicy: ClusterFirstWithHostNet hostNetwork: True hostPID: True nodeSelector: diff --git a/helm/microservice/test-ceph-mon-daemonset/templates/test_ceph_mon_daemonset.yaml b/helm/microservice/test-ceph-mon-daemonset/templates/test_ceph_mon_daemonset.yaml index d030551db..d0bf84b2f 100644 --- a/helm/microservice/test-ceph-mon-daemonset/templates/test_ceph_mon_daemonset.yaml +++ b/helm/microservice/test-ceph-mon-daemonset/templates/test_ceph_mon_daemonset.yaml @@ -34,6 +34,7 @@ spec: component: ceph system: mon spec: + dnsPolicy: ClusterFirstWithHostNet hostNetwork: True hostPID: True nodeSelector: diff --git a/helm/microservice/test-ceph-osd-pod/templates/test-ceph-osd-pod.yaml b/helm/microservice/test-ceph-osd-pod/templates/test-ceph-osd-pod.yaml index 18dbb9dbc..1b0a8b489 100644 --- a/helm/microservice/test-ceph-osd-pod/templates/test-ceph-osd-pod.yaml +++ b/helm/microservice/test-ceph-osd-pod/templates/test-ceph-osd-pod.yaml @@ -19,6 +19,7 @@ kind: Pod metadata: name: ceph-osd{{ $index }} spec: + dnsPolicy: ClusterFirstWithHostNet hostNetwork: True hostPID: True nodeSelector: diff --git a/helm/microservice/tgtd-daemonset/templates/tgtd-daemonset.yaml b/helm/microservice/tgtd-daemonset/templates/tgtd-daemonset.yaml index f33fb97c5..fc27fdeb6 100644 --- a/helm/microservice/tgtd-daemonset/templates/tgtd-daemonset.yaml +++ b/helm/microservice/tgtd-daemonset/templates/tgtd-daemonset.yaml @@ -28,6 +28,7 @@ spec: component: tgtd system: tgtd spec: + dnsPolicy: ClusterFirstWithHostNet hostNetwork: True hostIPC: True nodeSelector: diff --git a/tests/conf/ceph-all-in-one/kolla_kubernetes_config b/tests/conf/ceph-all-in-one/kolla_kubernetes_config index 65ddd0369..115553f12 100644 --- a/tests/conf/ceph-all-in-one/kolla_kubernetes_config +++ b/tests/conf/ceph-all-in-one/kolla_kubernetes_config @@ -1,6 +1,5 @@ kolla_kubernetes_ovs_setup_bridge: "yes" kolla_kubernetes_ovs_add_port: "no" -enable_resolve_conf_net_host_workaround: "yes" rabbitmq_management_external: "yes" kolla_kubernetes_external_bridge_ip: "172.18.0.1" diff --git a/tests/conf/iscsi-all-in-one/kolla_kubernetes_config b/tests/conf/iscsi-all-in-one/kolla_kubernetes_config index 3fa5d3227..699766b11 100644 --- a/tests/conf/iscsi-all-in-one/kolla_kubernetes_config +++ b/tests/conf/iscsi-all-in-one/kolla_kubernetes_config @@ -1,6 +1,5 @@ kolla_kubernetes_ovs_setup_bridge: "yes" kolla_kubernetes_ovs_add_port: "no" -enable_resolve_conf_net_host_workaround: "yes" rabbitmq_management_external: "yes" kolla_kubernetes_external_bridge_ip: "172.18.0.1" diff --git a/tools/setup-resolv-conf.sh b/tools/setup-resolv-conf.sh deleted file mode 100755 index 59fb3bc2d..000000000 --- a/tools/setup-resolv-conf.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash -e - -NAMESPACE=$1 - -function finish { -DNS_IP=`kubectl get svc --namespace=kube-system -l k8s-app=kube-dns -o \ - jsonpath='{.items[*].spec.clusterIP}'` -DOMAIN_NAME=$(kubectl get pod --namespace=kube-system -l k8s-app=kube-dns -o \ - jsonpath={..args} | grep "\-\-domain=" | awk -F '=' '{print $2}' | awk '{print $1}') -DOMAIN_NAME=${DOMAIN_NAME%%.} -cat > /tmp/$$ <