Add helm installation option as docker and host type
helm_deployment_type: docker helm_deployment_type: host
This commit is contained in:
parent
586d2a41ce
commit
62ef4db61b
5 changed files with 35 additions and 6 deletions
|
@ -123,6 +123,7 @@ etcd_deployment_type: docker
|
|||
kubelet_deployment_type: docker
|
||||
cert_management: script
|
||||
vault_deployment_type: docker
|
||||
helm_deployment_type: docker
|
||||
|
||||
# K8s image pull policy (imagePullPolicy)
|
||||
k8s_image_pull_policy: IfNotPresent
|
||||
|
|
|
@ -31,6 +31,7 @@ pod_infra_version: 3.0
|
|||
|
||||
# Download URL's
|
||||
etcd_download_url: "https://storage.googleapis.com/kargo/{{etcd_version}}_etcd"
|
||||
helm_download_url: "https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get"
|
||||
|
||||
# Checksums
|
||||
etcd_checksum: "385afd518f93e3005510b7aaa04d38ee4a39f06f5152cd33bb86d4f0c94c7485"
|
||||
|
@ -92,7 +93,9 @@ kibana_version: "v4.6.1"
|
|||
kibana_image_repo: "gcr.io/google_containers/kibana"
|
||||
kibana_image_tag: "{{ kibana_version }}"
|
||||
|
||||
helm_version: "v2.2.2"
|
||||
helm_version: "v2.5.0"
|
||||
# Possible values: host, docker
|
||||
helm_deployment_type: "docker"
|
||||
helm_image_repo: "lachlanevenson/k8s-helm"
|
||||
helm_image_tag: "{{ helm_version }}"
|
||||
tiller_version: "{{ helm_version }}"
|
||||
|
@ -229,9 +232,16 @@ downloads:
|
|||
tag: "{{ kibana_image_tag }}"
|
||||
sha256: "{{ kibana_digest_checksum|default(None) }}"
|
||||
helm:
|
||||
container: true
|
||||
container: >-
|
||||
{%- if helm_deployment_type == 'docker' -%}true{%- else -%}false{%- endif -%}
|
||||
repo: "{{ helm_image_repo }}"
|
||||
tag: "{{ helm_image_tag }}"
|
||||
version: "{{helm_version}}"
|
||||
dest: "get_helm.sh"
|
||||
source_url: "{{ helm_download_url }}"
|
||||
url: "{{ helm_download_url }}"
|
||||
owner: "root"
|
||||
mode: "0755"
|
||||
sha256: "{{ helm_digest_checksum|default(None) }}"
|
||||
tiller:
|
||||
container: true
|
||||
|
|
|
@ -109,6 +109,7 @@ etcd_deployment_type: docker
|
|||
kubelet_deployment_type: docker
|
||||
cert_management: script
|
||||
vault_deployment_type: docker
|
||||
helm_deployment_type: docker
|
||||
|
||||
# K8s image pull policy (imagePullPolicy)
|
||||
k8s_image_pull_policy: IfNotPresent
|
||||
|
|
|
@ -2,18 +2,34 @@
|
|||
- name: Helm | Make sure HELM_HOME directory exists
|
||||
file: path={{ helm_home_dir }} state=directory
|
||||
|
||||
- name: Helm | Set up helm launcher
|
||||
- name: Helm | Remove helm
|
||||
file:
|
||||
path: "{{ bin_dir }}/helm"
|
||||
state: absent
|
||||
|
||||
- name: Helm | Set up docker helm launcher
|
||||
template:
|
||||
src: helm-container.j2
|
||||
dest: "{{ bin_dir }}/helm"
|
||||
owner: root
|
||||
mode: 0755
|
||||
register: helm_container
|
||||
when: helm_deployment_type == "docker"
|
||||
|
||||
- name: Helm | Set up binary helm launcher
|
||||
shell: "{{local_release_dir}}/{{downloads.helm.dest}} --version {{ helm_version }}"
|
||||
when: helm_deployment_type == "host"
|
||||
|
||||
- name: Helm | Install/upgrade helm
|
||||
command: "{{ bin_dir }}/helm init --upgrade --tiller-image={{ tiller_image_repo }}:{{ tiller_image_tag }}"
|
||||
when: helm_container.changed
|
||||
when: inventory_hostname == groups['kube-master'][0]
|
||||
|
||||
- name: Helm | Set up bash completion
|
||||
shell: "umask 022 && {{ bin_dir }}/helm completion >/etc/bash_completion.d/helm.sh"
|
||||
when: ( not ansible_os_family in ["CoreOS", "Container Linux by CoreOS"]
|
||||
and helm_version < "v2.4.0" )
|
||||
|
||||
- name: Helm | Set up bash completion
|
||||
shell: "umask 022 && {{ bin_dir }}/helm completion bash >/etc/bash_completion.d/helm.sh"
|
||||
when: ( helm_container.changed and not ansible_os_family in ["CoreOS", "Container Linux by CoreOS"] )
|
||||
when: ( not ansible_os_family in ["CoreOS", "Container Linux by CoreOS"]
|
||||
and helm_version >= "v2.4.0" )
|
||||
|
||||
|
|
|
@ -9,3 +9,4 @@
|
|||
{% endfor -%}
|
||||
{{ helm_image_repo }}:{{ helm_image_tag}} \
|
||||
"$@"
|
||||
|
||||
|
|
Loading…
Reference in a new issue