Skip to content

Commit

Permalink
fixing modify alertmanager yaml (#44)
Browse files Browse the repository at this point in the history
* fixing modify alertmanager yaml

* fixing lint errors

* fixing lint errors

* fixing lint errors

* fixing lint errors

* fixing lint errors

* fixing lint errors

* fixing lint errors

* Revert "fixing lint errors"

This reverts commit 04e8315.

* fixing lint errors

* fixing lint errors

* fixing lint errors

* fixing lint errors

* fixing lint errors

* fixing lint errors

* fixing lint errors

* fixing lint errors

* removing debug mssg
  • Loading branch information
TehreemNisa authored Jan 19, 2024
1 parent 96ffcd1 commit 34e4ae9
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@
receiver_url: "{{ item.grafana_details.link }}"
namespace: "{{ item.cluster.namespace }}"
cluster_name: "{{ item.cluster.name }}"
provision_mode: "hubAndSpoke"
loop: "{{ mapped_integrations }}"

- name: Update CR status for SyncSet creation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
vars:
receiver_name: "{{ cluster_name }}"
receiver_url: "{{ grafana_integration_response.json.link }}"
provision_mode: "standalone"

- name: Re-encode modified alertmanager content for cluster
ansible.builtin.set_fact:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@
- name: Re-encode modified alertmanager content for cluster
ansible.builtin.set_fact:
encoded_alertmanager_secret_content: "{{ modified_alertmanager_secret_content | to_nice_yaml | b64encode }}"
when: gco_cr.spec.provisionMode == 'hubAndSpoke'
vars:
provision_mode_check: "{{ provision_mode }}"
when: provision_mode_check == "hubAndSpoke"

- name: Create a new SyncSet for each cluster to patch alertmanager-main secret
kubernetes.core.k8s:
Expand All @@ -65,7 +67,9 @@
patch: |
data:
alertmanager.yaml: "{{ encoded_alertmanager_secret_content }}"
vars:
provision_mode_check: "{{ provision_mode }}"
when:
- provision_mode_check == "hubAndSpoke"
- create_integration_for | length > 0
- gco_cr.spec.provisionMode == 'hubAndSpoke'
register: syncset_creation_results
2 changes: 1 addition & 1 deletion vocabulary

0 comments on commit 34e4ae9

Please sign in to comment.