Skip to content

Commit

Permalink
Fix for Helm on CoreOs using Docker
Browse files Browse the repository at this point in the history
Helm (tiller) requires socat to run. CoreOS doesnt supply socat
with their OS (See coreos/bugs#1114) hence
we have to add it to the system during Kubernetes Deployment.
While there is a solution for this issue when running Kubernetes on CoreOS with Rkt
(Kubelet Wrapper https://coreos.com/kubernetes/docs/latest/kubelet-wrapper.html)
there is no when running Kubernetes on CoreOS with
Docker. For this reason we compiled a static socat binary we copy
to /opt/bin or another directory and add the PATH to the Kubelet Docker
Container to run Helm (tiller) on the Kubernetes Cluster.
  • Loading branch information
VincentS committed Mar 2, 2017
1 parent 3256f4b commit 7347720
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 2 deletions.
4 changes: 4 additions & 0 deletions roles/kubernetes-apps/helm/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
socat_mode: 0700
socat_owner: kube
socat_dest: {{ bin_dir }}
Binary file added roles/kubernetes-apps/helm/files/socat
Binary file not shown.
10 changes: 8 additions & 2 deletions roles/kubernetes-apps/helm/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
---
- debug:
msg: "No helm charts"
- name: "Helm | Copy socat binary to {{ kube_binaries_dir }}"
copy:
src: "{{ role_path }}/files/socat"
dest: "{{ socat_dest }}"
owner: {{ socat_owner }}
mode: {{ socat_mode }}
when: ansible_os_family == "Container Linux by CoreOS" and
kubelet_deployment_type == "docker"
1 change: 1 addition & 0 deletions roles/kubernetes-apps/meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ dependencies:
- role: kubernetes-apps/efk
when: efk_enabled
tags: [ apps, efk ]
- {role: kubernetes-apps/helm, tags: [apps, helm]}
3 changes: 3 additions & 0 deletions roles/kubernetes/node/templates/kubelet-container.j2
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
-v /var/lib/kubelet:/var/lib/kubelet:shared \
-v /var/run:/var/run:rw \
-v {{kube_config_dir}}:{{kube_config_dir}}:ro \
{% if ansible_os_family == "Container Linux by CoreOS" and kubelet_deployment_type == "docker" %}
-e PATH="$PATH:{{ socat_dest }}" \
{% endif %}
{{ hyperkube_image_repo }}:{{ hyperkube_image_tag}} \
./hyperkube kubelet \
"$@"

0 comments on commit 7347720

Please sign in to comment.