blob: 3c8e70cfe6d67678a0b52398c45faade276d5d13 [file] [log] [blame]
{%- set source_engine = salt['pillar.get']('helm:client:source:engine') %}
{%- load_yaml as base_defaults %}
{%- if source_engine == 'git' %}
Debian:
pkgs:
- python-psycopg2
dir:
base: /srv/helm/venv
home: /var/lib/helm
workspace: /srv/helm/workspace
RedHat:
pkgs:
- python-psycopg2
dir:
base: /srv/helm/venv
home: /var/lib/helm
workspace: /srv/helm/workspace
{%- else %}
Debian:
pkgs:
- helm
dir:
base: /usr/lib/helm
{%- endif %}
{%- endload %}
{%- load_yaml as base_config %}
helm:
client:
version: 2.6.2
download_hash: sha256=ba807d6017b612a0c63c093a954c7d63918d3e324bdba335d67b7948439dbca8
# TODO: add parameter for binary installation flavor
#
# flavor: linux-amd64
tiller:
install: true
namespace: kube-system
kubectl:
install: false
version: 1.6.7
download_hash: sha256=54947ef84181e89f9dbacedd54717cbed5cc7f9c36cb37bc8afc9097648e2c91
config:
gce_service_token:
{%- endload %}
{%- set config = salt['pillar.get']('helm:client', base_config.helm.client, merge=true) %}
{%- set client = salt['grains.filter_by'](base_defaults, merge=config) %}
{%- set constants = {
"helm": {
"home": "/srv/helm/helm",
"bin": "/usr/bin/helm-v" + config.version,
"tmp": "/tmp/helm-v" + config.version,
"cmd": "helm --tiller-namespace '{}'".format(config.tiller.namespace),
"tiller_arg": "- tiller_namespace: \"{}\"".format(config.tiller.namespace),
"gce_state_arg": "",
},
"tiller": {
"gce_env_var": "",
},
"kubectl": {
"bin": "/usr/bin/kubectl",
"config": "/srv/helm/kubeconfig.yaml",
"gce_service_token_path": "/srv/helm/gce_token.json",
}
}
%}
{%- if "host" in config.tiller %}
{%- do constants.update({
"helm": {
"cmd": "helm --host '{}'".format(config.tiller.host),
"tiller_arg": "- tiller_host: \"{}\"".format(config.tiller.host)
}
})
%}
{%- endif %}
{%- if config.kubectl.config.gce_service_token %}
{%- do constants.update({
"helm": {
"gce_state_arg": "- gce_service_token: \"{}\"".format(constants.gce_service_token_path),
},
"tiller": {
"gce_env_var": "- GOOGLE_APPLICATION_CREDENTIALS: \"{}\"".format(gce_service_token_path)
}
})
%}
{%- endif %}