aboutsummaryrefslogtreecommitdiffstats
path: root/deployment/noheat
diff options
context:
space:
mode:
Diffstat (limited to 'deployment/noheat')
-rw-r--r--deployment/noheat/cluster-rke/ansible/create.yml5
-rw-r--r--deployment/noheat/cluster-rke/ansible/roles/deps/defaults/main.yml6
-rw-r--r--deployment/noheat/cluster-rke/ansible/roles/deps/tasks/main.yml44
-rw-r--r--deployment/noheat/cluster-rke/ansible/roles/deps/templates/metallb-values.yaml.j26
4 files changed, 61 insertions, 0 deletions
diff --git a/deployment/noheat/cluster-rke/ansible/create.yml b/deployment/noheat/cluster-rke/ansible/create.yml
index c2eca98dc..9a2943b12 100644
--- a/deployment/noheat/cluster-rke/ansible/create.yml
+++ b/deployment/noheat/cluster-rke/ansible/create.yml
@@ -41,3 +41,8 @@
hosts: operator0
roles:
- role: setup_helm
+- name: Install metallb, cert-manager and prometheus
+ hosts: operator0
+ gather_facts: false
+ roles:
+ - role: 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 }}"