Merge pull request #1155 from mattymo/helm

Add helm deployment
pull/1163/head
Matthew Mosesohn 2017-03-20 17:00:06 +03:00 committed by GitHub
commit 0f64f8db90
7 changed files with 54 additions and 2 deletions

View File

@ -138,3 +138,6 @@ k8s_image_pull_policy: IfNotPresent
# Monitoring apps for k8s # Monitoring apps for k8s
efk_enabled: false efk_enabled: false
# Helm deployment
helm_enabled: false

View File

@ -92,6 +92,13 @@ kibana_version: "v4.6.1"
kibana_image_repo: "gcr.io/google_containers/kibana" kibana_image_repo: "gcr.io/google_containers/kibana"
kibana_image_tag: "{{ kibana_version }}" kibana_image_tag: "{{ kibana_version }}"
helm_version: "v2.2.2"
helm_image_repo: "lachlanevenson/k8s-helm"
helm_image_tag: "{{ helm_version }}"
tiller_version: "{{ helm_version }}"
tiller_image_repo: "gcr.io/kubernetes-helm/tiller"
tiller_image_tag: "{{ tiller_version }}"
downloads: downloads:
netcheck_server: netcheck_server:
container: true container: true
@ -221,6 +228,16 @@ downloads:
repo: "{{ kibana_image_repo }}" repo: "{{ kibana_image_repo }}"
tag: "{{ kibana_image_tag }}" tag: "{{ kibana_image_tag }}"
sha256: "{{ kibana_digest_checksum|default(None) }}" sha256: "{{ kibana_digest_checksum|default(None) }}"
helm:
container: true
repo: "{{ helm_image_repo }}"
tag: "{{ helm_image_tag }}"
sha256: "{{ helm_digest_checksum|default(None) }}"
tiller:
container: true
repo: "{{ tiller_image_repo }}"
tag: "{{ tiller_image_tag }}"
sha256: "{{ tiller_digest_checksum|default(None) }}"
download: download:
container: "{{ file.container|default('false') }}" container: "{{ file.container|default('false') }}"

View File

@ -0,0 +1 @@
helm_enabled: false

View File

@ -0,0 +1,5 @@
dependencies:
- role: download
file: "{{ downloads.helm }}"
- role: download
file: "{{ downloads.tiller }}"

View File

@ -1,3 +1,16 @@
--- ---
- debug: - name: Helm | Set up helm launcher
msg: "No helm charts" template:
src: helm-container.j2
dest: "{{ bin_dir }}/helm"
owner: root
mode: 0755
register: helm_container
- name: Helm | Install/upgrade helm
command: "helm init --upgrade --tiller-image={{ tiller_image_repo }}:{{ tiller_image_tag }}"
when: helm_container.changed
- name: Helm | Set up bash completion
shell: "umask 022 && {{ bin_dir }}/helm completion >/etc/bash_completion.d/helm.sh"
when: helm_container.changed

View File

@ -0,0 +1,10 @@
#!/bin/bash
{{ docker_bin_dir }}/docker run --rm \
--net=host \
--name=helm \
-v /etc/ssl:/etc/ssl:ro \
{% for dir in ssl_ca_dirs -%}
-v {{ dir }}:{{ dir }}:ro \
{% endfor -%}
{{ helm_image_repo }}:{{ helm_image_tag}} \
"$@"

View File

@ -12,3 +12,6 @@ dependencies:
- role: kubernetes-apps/efk - role: kubernetes-apps/efk
when: efk_enabled when: efk_enabled
tags: [ apps, efk ] tags: [ apps, efk ]
- role: kubernetes-apps/helm
when: helm_enabled
tags: [ apps, helm ]