update to safeguard against accidentally passing string instead of list
This commit is contained in:
parent
7656ae2887
commit
c1192b1154
4 changed files with 19 additions and 7 deletions
|
@ -81,9 +81,13 @@ spec:
|
||||||
{% if kube_api_anonymous_auth is defined and kube_version | version_compare('v1.5', '>=') %}
|
{% if kube_api_anonymous_auth is defined and kube_version | version_compare('v1.5', '>=') %}
|
||||||
- --anonymous-auth={{ kube_api_anonymous_auth }}
|
- --anonymous-auth={{ kube_api_anonymous_auth }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% for flag in apiserver_custom_flags %}
|
{% if apiserver_custom_flags is string %}
|
||||||
|
- {{ apiserver_custom_flags }}
|
||||||
|
{% else % }
|
||||||
|
{% for flag in apiserver_custom_flags %}
|
||||||
- {{ flag }}
|
- {{ flag }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
host: 127.0.0.1
|
host: 127.0.0.1
|
||||||
|
|
|
@ -46,9 +46,13 @@ spec:
|
||||||
- --configure-cloud-routes=true
|
- --configure-cloud-routes=true
|
||||||
- --cluster-cidr={{ kube_pods_subnet }}
|
- --cluster-cidr={{ kube_pods_subnet }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% for flag in controller_mgr_custom_flags %}
|
{% if controller_mgr_custom_flags is string %}
|
||||||
|
- {{ controller_mgr_custom_flags }}
|
||||||
|
{% else % }
|
||||||
|
{% for flag in controller_mgr_custom_flags %}
|
||||||
- {{ flag }}
|
- {{ flag }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
host: 127.0.0.1
|
host: 127.0.0.1
|
||||||
|
|
|
@ -27,9 +27,13 @@ spec:
|
||||||
- --leader-elect=true
|
- --leader-elect=true
|
||||||
- --master={{ kube_apiserver_endpoint }}
|
- --master={{ kube_apiserver_endpoint }}
|
||||||
- --v={{ kube_log_level }}
|
- --v={{ kube_log_level }}
|
||||||
{% for flag in scheduler_custom_flags %}
|
{% if scheduler_custom_flags is string %}
|
||||||
|
- {{ scheduler_custom_flags }}
|
||||||
|
{% else % }
|
||||||
|
{% for flag in scheduler_custom_flags %}
|
||||||
- {{ flag }}
|
- {{ flag }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
host: 127.0.0.1
|
host: 127.0.0.1
|
||||||
|
|
|
@ -44,7 +44,7 @@ KUBELET_HOSTNAME="--hostname-override={{ ansible_hostname }}"
|
||||||
{% set node_labels %}--node-labels=node-role.kubernetes.io/node=true{% endset %}
|
{% set node_labels %}--node-labels=node-role.kubernetes.io/node=true{% endset %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
KUBELET_ARGS="{{ kubelet_args_base }} {{ kubelet_args_dns }} {{ kubelet_args_kubeconfig }} {{ node_labels }} {% for flag in kubelet_custom_flags %} {{flag}} {% endfor %}"
|
KUBELET_ARGS="{{ kubelet_args_base }} {{ kubelet_args_dns }} {{ kubelet_args_kubeconfig }} {{ node_labels }} {% if kubelet_custom_flags is string %}{{kubelet_custom_flags}}{% else %}{% for flag in kubelet_custom_flags %} {{flag}} {% endfor %}{% endif %}"
|
||||||
{% if kube_network_plugin is defined and kube_network_plugin in ["calico", "weave", "canal"] %}
|
{% if kube_network_plugin is defined and kube_network_plugin in ["calico", "weave", "canal"] %}
|
||||||
KUBELET_NETWORK_PLUGIN="--network-plugin=cni --network-plugin-dir=/etc/cni/net.d --cni-bin-dir=/opt/cni/bin"
|
KUBELET_NETWORK_PLUGIN="--network-plugin=cni --network-plugin-dir=/etc/cni/net.d --cni-bin-dir=/opt/cni/bin"
|
||||||
{% elif kube_network_plugin is defined and kube_network_plugin == "weave" %}
|
{% elif kube_network_plugin is defined and kube_network_plugin == "weave" %}
|
||||||
|
|
Loading…
Reference in a new issue