aboutsummaryrefslogtreecommitdiffstats
path: root/deployment/noheat/cluster-rke/ansible/roles
diff options
context:
space:
mode:
Diffstat (limited to 'deployment/noheat/cluster-rke/ansible/roles')
-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
3 files changed, 56 insertions, 0 deletions
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 }}"