magnum/playbooks/container-builder.yaml
Spyros Trigazis 0b5f4260d9 k8s_fedora: Deploy tiller
Add enable_tiller  label to install tiller in k8s_fedora_atomic
clusters. Defaults to false.

Add tiller_tag label to select the version of tiller. If the
tag is not set the tag that matches the helm client version in
the heat-agent will be picked.  The tiller image can be stored
in a private registry and the cluster can pull it using the
container_infra_prefix label.

Install tiller securely using helper container.

TODO:

*add instructions on how RBAC is designed
https://docs.helm.sh/using_helm/#example-deploy-tiller-in-a-namespace-restricted-to-deploying-resources-in-another-namespace
* add docs on how to install addon in the cluster using this tiller
* how users can get the creds to talk to tiller

NOTE:
The main goal of this tiller is internal usage!
Users can still deploy other tillers in other namespaces.

story: 2003902
task: 26780

Change-Id: I99d3a78085ba10030200f12bbfe58a72964e2326
Signed-off-by: dioguerra <dy090.guerra@gmail.com>
2019-02-11 11:18:08 +01:00

65 lines
2.3 KiB
YAML

- hosts: all
tasks:
- include_vars: container-builder-vars.yaml
- name: "Build magnum images"
block:
- name: "Build {{ magnum_repository }}/{{ item.name }}:{{ item.tag }} image"
docker_image:
path: "{{ magnum_src_dir }}/dockerfiles/{{ item.name }}"
name: "{{ magnum_repository }}/{{ item.name }}"
tag: "{{ item.tag }}"
push: no
with_items: "{{ magnum_images }}"
retries: 10
- name: "Build kubernetes images v1.11"
block:
- name: "Build {{ magnum_repository }}/{{ item.name }}:{{ item.tag }} image"
docker_image:
path: "{{ magnum_src_dir }}/dockerfiles/{{ item.name }}"
name: "{{ magnum_repository }}/{{ item.name }}"
tag: "{{kubernetes_version_v1_11}}"
buildargs:
KUBE_VERSION: "{{kubernetes_version_v1_11}}"
push: no
with_items: "{{ kubernetes_images }}"
retries: 10
- name: "Build kubernetes images v1.12"
block:
- name: "Build {{ magnum_repository }}/{{ item.name }}:{{ item.tag }} image"
docker_image:
path: "{{ magnum_src_dir }}/dockerfiles/{{ item.name }}"
name: "{{ magnum_repository }}/{{ item.name }}"
tag: "{{kubernetes_version_v1_12}}"
buildargs:
KUBE_VERSION: "{{kubernetes_version_v1_12}}"
push: no
with_items: "{{ kubernetes_images }}"
retries: 10
- name: "Build kubernetes images v1.13"
block:
- name: "Build {{ magnum_repository }}/{{ item.name }}:{{ item.tag }} image"
docker_image:
path: "{{ magnum_src_dir }}/dockerfiles/{{ item.name }}"
name: "{{ magnum_repository }}/{{ item.name }}"
tag: "{{kubernetes_version_v1_13}}"
buildargs:
KUBE_VERSION: "{{kubernetes_version_v1_13}}"
push: no
with_items: "{{ kubernetes_images }}"
retries: 10
- name: "Build helm-client image"
block:
- docker_image:
path: "{{ magnum_src_dir }}/dockerfiles/helm-client"
name: "{{ magnum_repository }}/helm-client"
tag: "{{ helm_version }}"
buildargs:
HELM_VERSION: "{{ helm_version }}"
push: no
retries: 10