c12s-kubespray/roles/kubernetes-apps/helm/templates/helm-container.j2
mervynzhang a8dfcbbfc7 Switch /root references to ansible_env.HOME (#4842)
* kube config dir for current/ansible become user

* remove extra /

* fix default value
2019-06-06 02:06:11 -07:00

17 lines
570 B
Django/Jinja

#!/bin/bash
{{ docker_bin_dir }}/docker run --rm \
--net=host \
--name=helm \
-v {{ ansible_env.HOME | default('/root') }}/.kube:/root/.kube:ro \
-v /etc/ssl:/etc/ssl:ro \
-v {{ helm_home_dir }}:{{ helm_home_dir }}:rw \
{% for dir in ssl_ca_dirs -%}
-v {{ dir }}:{{ dir }}:ro \
{% endfor -%}
{% if http_proxy is defined or https_proxy is defined -%}
-e http_proxy="{{proxy_env.http_proxy}}" \
-e https_proxy="{{proxy_env.https_proxy}}" \
-e no_proxy="{{proxy_env.no_proxy}}" \
{% endif -%}
{{ helm_image_repo }}:{{ helm_image_tag}} \
"$@"