From bd668ef606f25a04963ba93a15579f770e7f0638 Mon Sep 17 00:00:00 2001
From: Varac <varac@varac.net>
Date: Thu, 19 Sep 2019 11:24:02 +0200
Subject: [PATCH] De-duplicate kubelet extra_args

---
 .../rke_configuration/templates/cluster.yml.j2     | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/ansible/roles/rke_configuration/templates/cluster.yml.j2 b/ansible/roles/rke_configuration/templates/cluster.yml.j2
index 087afa677..3d51d6f7c 100644
--- a/ansible/roles/rke_configuration/templates/cluster.yml.j2
+++ b/ansible/roles/rke_configuration/templates/cluster.yml.j2
@@ -46,22 +46,18 @@ services:
     image: ""
   kubelet:
     image: ""
-{% if flexvolume_plugins %}
     extra_args:
+      containerized: "true"
+{% if flexvolume_plugins %}
       volume-plugin-dir: /usr/libexec/kubernetes/kubelet-plugins/volume/exec
+{% endif %}
       containerized: "true"
     extra_binds:
+    - "/:/rootfs:rshared"
+{% if flexvolume_plugins %}
     - /usr/libexec/kubernetes/kubelet-plugins/volume/exec:/usr/libexec/kubernetes/kubelet-plugins/volume/exec
       # Make local storage work with persistant volumes that use `subpath`
       # see https://open.greenhost.net/openappstack/openappstack/issues/236
-      - "/:/rootfs:rshared"
-{% else %}
-    extra_args:
-      containerized: "true"
-    extra_binds:
-      # Make local storage work with persistant volumes that use `subpath`
-      # see https://open.greenhost.net/openappstack/openappstack/issues/236
-      - "/:/rootfs:rshared"
 {% endif %}
     cluster_domain: cluster.local
     infra_container_image: ""
-- 
GitLab