diff --git a/roles/download/defaults/main.yml b/roles/download/defaults/main.yml index 25a33591501c4029ae4f6ca5a9c1b1c2084366ea..2c4000866c8bfa8abd84f3f59f2141f4982090fd 100644 --- a/roles/download/defaults/main.yml +++ b/roles/download/defaults/main.yml @@ -60,6 +60,8 @@ hyperkube_image_repo: "quay.io/coreos/hyperkube" hyperkube_image_tag: "{{ kube_version }}_coreos.0" pod_infra_image_repo: "gcr.io/google_containers/pause-amd64" pod_infra_image_tag: "{{ pod_infra_version }}" +install_socat_image_repo: "xueshanf/install-socat" +install_socat_image_tag: "latest" netcheck_version: "v1.0" netcheck_agent_img_repo: "quay.io/l23network/k8s-netchecker-agent" netcheck_agent_tag: "{{ netcheck_version }}" @@ -194,6 +196,11 @@ downloads: repo: "{{ pod_infra_image_repo }}" tag: "{{ pod_infra_image_tag }}" sha256: "{{ pod_infra_digest_checksum|default(None) }}" + install_socat: + container: true + repo: "{{ install_socat_image_repo }}" + tag: "{{ install_socat_image_tag }}" + sha256: "{{ install_socat_digest_checksum|default(None) }}" nginx: container: true repo: "{{ nginx_image_repo }}" diff --git a/roles/kubernetes/node/meta/main.yml b/roles/kubernetes/node/meta/main.yml index 12a7d73b7b8ed91c4434617e7dadb2e04d58b940..f0656e5716904333f8e15bbe61c618899ac15671 100644 --- a/roles/kubernetes/node/meta/main.yml +++ b/roles/kubernetes/node/meta/main.yml @@ -6,6 +6,10 @@ dependencies: - role: download file: "{{ downloads.pod_infra }}" tags: [download, kubelet] + - role: download + file: "{{ downloads.install_socat }}" + tags: [download, kubelet] + when: ansible_os_family in ['CoreOS', 'Container Linux by CoreOS'] - role: kubernetes/secrets tags: k8s-secrets - role: download @@ -33,4 +37,4 @@ dependencies: tags: [download, dnsmasq] - role: download file: "{{ downloads.kubednsautoscaler }}" - tags: [download, dnsmasq] \ No newline at end of file + tags: [download, dnsmasq] diff --git a/roles/kubernetes/node/tasks/install_host.yml b/roles/kubernetes/node/tasks/install_host.yml index e80b204986cb4a8bf5d16f34ab401e9b8e327d52..9f1523ffe9fe43a4f6d0ec52e87ac2bd74eff441 100644 --- a/roles/kubernetes/node/tasks/install_host.yml +++ b/roles/kubernetes/node/tasks/install_host.yml @@ -8,3 +8,9 @@ changed_when: false tags: [hyperkube, upgrade] notify: restart kubelet + +- name: install | Copy socat wrapper for Container Linux + command: "{{ docker_bin_dir }}/docker run --rm -v {{ bin_dir }}:/opt/bin {{ install_socat_image_repo }}:{{ install_socat_image_tag }}" + args: + creates: "{{ bin_dir }}/socat" + when: ansible_os_family in ['CoreOS', 'Container Linux by CoreOS']