diff options
author | Bartek Grzybowski <b.grzybowski@partner.samsung.com> | 2021-06-02 12:31:27 +0200 |
---|---|---|
committer | Bartek Grzybowski <b.grzybowski@partner.samsung.com> | 2021-06-08 11:38:01 +0200 |
commit | 86722b84d8dec4a671d7fcb86f54be6197ffdff8 (patch) | |
tree | eab298aa3efc43f7556aa5687ac45610dea4b0b3 | |
parent | bc9ddc3d9940e32c29a0488b11e05dc853aeb88a (diff) |
[ANSIBLE] Setup kube-prometheus-stack role
Change-Id: I687fa1743cd2b778a0b07ed9e51a4a2e2d142934
Issue-ID: INT-1926
Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
4 files changed, 19 insertions, 6 deletions
diff --git a/ansible/roles/kube-prometheus-stack/defaults/main.yml b/ansible/roles/kube-prometheus-stack/defaults/main.yml index ccb68039..e9bcc6aa 100644 --- a/ansible/roles/kube-prometheus-stack/defaults/main.yml +++ b/ansible/roles/kube-prometheus-stack/defaults/main.yml @@ -1,2 +1,5 @@ --- -# defaults file for kube-prometheus-stack +kube_prometheus_stack: + k8s_namespace: kube-prometheus + helm_release_name: kube-prometheus-stack + helm_timeout: "60s" diff --git a/ansible/roles/kube-prometheus-stack/handlers/main.yml b/ansible/roles/kube-prometheus-stack/handlers/main.yml deleted file mode 100644 index a201a218..00000000 --- a/ansible/roles/kube-prometheus-stack/handlers/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# handlers file for kube-prometheus-stack diff --git a/ansible/roles/kube-prometheus-stack/tasks/main.yml b/ansible/roles/kube-prometheus-stack/tasks/main.yml index cf52b66f..b7f314e0 100644 --- a/ansible/roles/kube-prometheus-stack/tasks/main.yml +++ b/ansible/roles/kube-prometheus-stack/tasks/main.yml @@ -1,2 +1,16 @@ --- -# tasks file for kube-prometheus-stack +- name: Check {{ kube_prometheus_stack.helm_release_name }} helm package exists + stat: + path: "{{ app_data_path }}/downloads/kube-prometheus-stack-{{ kube_prometheus_stack_version }}.tgz" + register: kube_prometheus_package_stat + failed_when: not kube_prometheus_package_stat.stat.exists + +- name: "Install Helm release {{ kube_prometheus_stack.helm_release_name }}" + community.kubernetes.helm: + release_name: "{{ kube_prometheus_stack.helm_release_name }}" + release_namespace: "{{ kube_prometheus_stack.k8s_namespace }}" + create_namespace: True + chart_ref: "{{ app_data_path }}/downloads/kube-prometheus-stack-{{ kube_prometheus_stack_version }}.tgz" + wait: True + wait_timeout: "{{ kube_prometheus_stack.helm_timeout }}" + tags: molecule-notest diff --git a/ansible/roles/kube-prometheus-stack/vars/main.yml b/ansible/roles/kube-prometheus-stack/vars/main.yml deleted file mode 100644 index cfc8e1a5..00000000 --- a/ansible/roles/kube-prometheus-stack/vars/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# vars file for kube-prometheus-stack |