1cfe0beac0
In kubernetes 1.6 ClusterFirstWithHostNet was added as an option. In accordance to it kubelet will generate resolv.conf based on own resolv.conf. However, this doesn't create 'options', thus the proper solution requires some investigation. This patch sets the same resolv.conf for kubelet as host Signed-off-by: Sergii Golovatiuk <sgolovatiuk@mirantis.com>
34 lines
1.4 KiB
YAML
34 lines
1.4 KiB
YAML
- name: Kubernetes Apps | Lay Down Netchecker Template
|
|
template:
|
|
src: "{{item.file}}"
|
|
dest: "{{kube_config_dir}}/{{item.file}}"
|
|
with_items:
|
|
- {file: netchecker-agent-ds.yml, type: ds, name: netchecker-agent}
|
|
- {file: netchecker-agent-hostnet-ds.j2, type: ds, name: netchecker-agent-hostnet}
|
|
- {file: netchecker-server-pod.yml, type: po, name: netchecker-server}
|
|
- {file: netchecker-server-svc.yml, type: svc, name: netchecker-service}
|
|
register: manifests
|
|
when: inventory_hostname == groups['kube-master'][0]
|
|
|
|
#FIXME: remove if kubernetes/features#124 is implemented
|
|
- name: Kubernetes Apps | Purge old Netchecker daemonsets
|
|
kube:
|
|
name: "{{item.item.name}}"
|
|
namespace: "{{netcheck_namespace}}"
|
|
kubectl: "{{bin_dir}}/kubectl"
|
|
resource: "{{item.item.type}}"
|
|
filename: "{{kube_config_dir}}/{{item.item.file}}"
|
|
state: absent
|
|
with_items: "{{ manifests.results }}"
|
|
when: inventory_hostname == groups['kube-master'][0] and item.item.type == "ds" and item.changed
|
|
|
|
- name: Kubernetes Apps | Start Netchecker Resources
|
|
kube:
|
|
name: "{{item.item.name}}"
|
|
namespace: "{{netcheck_namespace}}"
|
|
kubectl: "{{bin_dir}}/kubectl"
|
|
resource: "{{item.item.type}}"
|
|
filename: "{{kube_config_dir}}/{{item.item.file}}"
|
|
state: "{{item.changed | ternary('latest','present') }}"
|
|
with_items: "{{ manifests.results }}"
|
|
when: inventory_hostname == groups['kube-master'][0]
|