From c3c919875dfd958c2e6d7ffdd3043dc7310289ab Mon Sep 17 00:00:00 2001 From: Maciej Wereski Date: Wed, 28 Jul 2021 13:38:43 +0000 Subject: noheat: deploy MetalLB, cert-manager and prometheus Issue-ID: INT-1601 Signed-off-by: Maciej Wereski Change-Id: Ia23b7ec2f5dbe3ecc1845f245f6377401daebbf0 --- .../ansible/roles/deps/defaults/main.yml | 6 +++ .../cluster-rke/ansible/roles/deps/tasks/main.yml | 44 ++++++++++++++++++++++ .../roles/deps/templates/metallb-values.yaml.j2 | 6 +++ 3 files changed, 56 insertions(+) create mode 100644 deployment/noheat/cluster-rke/ansible/roles/deps/defaults/main.yml create mode 100644 deployment/noheat/cluster-rke/ansible/roles/deps/tasks/main.yml create mode 100644 deployment/noheat/cluster-rke/ansible/roles/deps/templates/metallb-values.yaml.j2 (limited to 'deployment/noheat/cluster-rke/ansible/roles/deps') diff --git a/deployment/noheat/cluster-rke/ansible/roles/deps/defaults/main.yml b/deployment/noheat/cluster-rke/ansible/roles/deps/defaults/main.yml new file mode 100644 index 000000000..28ddadfa0 --- /dev/null +++ b/deployment/noheat/cluster-rke/ansible/roles/deps/defaults/main.yml @@ -0,0 +1,6 @@ +--- +cert_manager_version: "1.2.0" +prometheus_version: "13.13.1" +metallb_version: "0.10.2" +metallb_protocol: "layer2" +metallb_addresses: "192.168.1.240-192.168.1.255" diff --git a/deployment/noheat/cluster-rke/ansible/roles/deps/tasks/main.yml b/deployment/noheat/cluster-rke/ansible/roles/deps/tasks/main.yml new file mode 100644 index 000000000..022867d0b --- /dev/null +++ b/deployment/noheat/cluster-rke/ansible/roles/deps/tasks/main.yml @@ -0,0 +1,44 @@ +- name: Download cert-manager + get_url: + url: "https://github.com/jetstack/cert-manager/releases/download/v{{ cert_manager_version }}/cert-manager.yaml" + dest: "/tmp" + mode: '0400' + +- name: Deploy cert-manager + kubernetes.core.k8s: + src: /tmp/cert-manager.yaml + state: present + +- name: Add MetalLB Helm repository + kubernetes.core.helm_repository: + name: metallb + repo_url: https://metallb.github.io/metallb + +- name: Add prometheus Helm repository + kubernetes.core.helm_repository: + name: prometheus + repo_url: https://prometheus-community.github.io/helm-charts + +- name: Copy MetalLB override file + template: + src: "metallb-values.yaml.j2" + dest: "/tmp/metallb-values.yaml" + mode: '0400' + +- name: Deploy MetalLB charts + kubernetes.core.helm: + name: metallb + chart_version: "{{ metallb_version }}" + chart_ref: metallb/metallb + release_namespace: metallb + create_namespace: true + values_files: + - /tmp/metallb-values.yaml + +- name: Deploy Prometheus charts + kubernetes.core.helm: + name: prometheus + chart_version: "{{ prometheus_version }}" + chart_ref: prometheus/kube-prometheus-stack + release_namespace: prometheus + create_namespace: true diff --git a/deployment/noheat/cluster-rke/ansible/roles/deps/templates/metallb-values.yaml.j2 b/deployment/noheat/cluster-rke/ansible/roles/deps/templates/metallb-values.yaml.j2 new file mode 100644 index 000000000..d86d505df --- /dev/null +++ b/deployment/noheat/cluster-rke/ansible/roles/deps/templates/metallb-values.yaml.j2 @@ -0,0 +1,6 @@ +configInline: + address-pools: + - name: default + protocol: "{{ metallb_protocol }}" + addresses: + - "{{ metallb_addresses }}" -- cgit 1.2.3-korg