From fb7ae2af1e62b6ef6d60edf90566b317a2411675 Mon Sep 17 00:00:00 2001 From: Robert Choi Date: Sun, 27 Feb 2022 17:27:01 +0900 Subject: [PATCH] remove alertmanager too --- templates/argo-additional-rbac.yaml | 1 + templates/decapod-apps/remove-lma-uniformed-wftpl.yaml | 2 ++ 2 files changed, 3 insertions(+) diff --git a/templates/argo-additional-rbac.yaml b/templates/argo-additional-rbac.yaml index da089bd..00de6ab 100644 --- a/templates/argo-additional-rbac.yaml +++ b/templates/argo-additional-rbac.yaml @@ -69,6 +69,7 @@ rules: - monitoring.coreos.com resources: - prometheuses + - alertmanagers verbs: - create - get diff --git a/templates/decapod-apps/remove-lma-uniformed-wftpl.yaml b/templates/decapod-apps/remove-lma-uniformed-wftpl.yaml index 37dc860..4221cf8 100644 --- a/templates/decapod-apps/remove-lma-uniformed-wftpl.yaml +++ b/templates/decapod-apps/remove-lma-uniformed-wftpl.yaml @@ -92,9 +92,11 @@ spec: # Delete prometheus CR if [[ -z "{{workflow.parameters.cluster_id}}" ]]; then kubectl delete prometheus --all -n {{inputs.parameters.namespace}} + kubectl delete alertmanager --all -n {{inputs.parameters.namespace}} else cat <<< "$KUBE_CONFIG" > /etc/kubeconfig kubectl --kubeconfig=/etc/kubeconfig delete prometheus --all -n {{inputs.parameters.namespace}} + kubectl --kubeconfig=/etc/kubeconfig delete alertmanager --all -n {{inputs.parameters.namespace}} fi env: - name: KUBE_CONFIG