Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixing modify alertmanager yaml #44

Merged
merged 18 commits into from
Jan 19, 2024
Merged
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
Loading