File tree Expand file tree Collapse file tree 6 files changed +22
-7
lines changed
Expand file tree Collapse file tree 6 files changed +22
-7
lines changed Original file line number Diff line number Diff line change @@ -5,5 +5,4 @@ host_key_checking = False
55any_unparsed_is_failed = True
66
77[ssh_connection]
8- control_path = /root/.ansible-ssh/cp-%%h-%%p-%%r
98pipelining = True
Original file line number Diff line number Diff line change 1010 set_fact :
1111 k8s_manifest_template : " manifests"
1212 kubelet_conf_template : " default"
13+ kubeproxy_template : " default"
1314 delegate_facts : True
1415 delegate_to : " {{ item }}"
1516 with_inventory_hostnames :
4849 delegate_to : " {{ item }}"
4950 with_inventory_hostnames :
5051 - kubernetes_nodes
51- when : kube_release_version is defined and particular_kubelet.stat.isdir is defined and particular_kubelet.stat.isdir
52+ when : kube_release_version is defined and particular_kubelet.stat.isdir is defined and particular_kubelet.stat.isdir
53+
54+ - name : Check if the particular kubeproxy configuration for version {{ kube_release_version }} exists
55+ stat :
56+ path : " {{ playbook_dir }}/roles/kube-proxy/templates/{{ major_k8s_version }}"
57+ register : particular_kubeproxy
58+ when : kube_release_version is defined
59+
60+ - name : Set path of kubeproxy configuration
61+ set_fact :
62+ kubeproxy_template : " {{ major_k8s_version }}"
63+ delegate_facts : True
64+ delegate_to : " {{ item }}"
65+ with_inventory_hostnames :
66+ - kubernetes_nodes
67+ when : kube_release_version is defined and particular_kubeproxy.stat.isdir is defined and particular_kubeproxy.stat.isdir
Original file line number Diff line number Diff line change 1- # FIXME versioned manifest for KubeProxy
21- name : Replicate kube-proxy manifests
32 template :
4- src : kube-proxy.yml.j2
3+ src : " {{ kubeproxy_template }}/ kube-proxy.yml.j2"
54 dest : " /tmp/kube-proxy.yml"
65
76- name : Create SA for kube-proxy
Original file line number Diff line number Diff line change 5656 - /usr/local/bin/kube-proxy
5757 - --config=/var/lib/kube-proxy/config.conf
5858 - --cluster-cidr={{ pod_cidr }}
59- image: k8s. gcr.io/kube-proxy:{{kube_release_version}}
59+ image: gcr.io/google_containers /kube-proxy:{{kube_release_version}}
6060 imagePullPolicy: IfNotPresent
6161 name: kube-proxy
6262 securityContext:
Original file line number Diff line number Diff line change 11- name : Prepare network plugin
2- include_tasks : " {{ cni_plugin }}-prepare.yml"
2+ include_tasks : " {{ cni_plugin }}-prepare.yml"
3+ when : cni_plugin != ""
Original file line number Diff line number Diff line change 55
66docker run --name simple-kube --net=host -ti --rm \
77 -e http_proxy=" ${http_proxy} " -e https_proxy=" ${https_proxy} " -e no_proxy=" ${no_proxy} " \
8- --mount type=tmpfs,destination=/root/.ansible-ssh \
8+ --mount type=tmpfs,destination=/root/.ansible/cps \
99 -v /var/run/docker.sock:/var/run/docker.sock \
1010 kitt0hsu/simple-kube
You can’t perform that action at this time.
0 commit comments