From 568a6f9a7b57b6e45340f83f311683ff4d81cebb Mon Sep 17 00:00:00 2001 From: Sebastian Mark Date: Mon, 11 Apr 2022 22:34:03 +0200 Subject: [PATCH] FEAT: force prometheus crds to sync first * introduce sync_wave parameter --- _templates/argo_base.template | 2 ++ k8s-manifests/monitoring/prometheus-stack.jsonnet | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/_templates/argo_base.template b/_templates/argo_base.template index c0fb85a..62c900f 100644 --- a/_templates/argo_base.template +++ b/_templates/argo_base.template @@ -4,12 +4,14 @@ namespace:: $.name, syncOptions:: ["CreateNamespace=true"], retryLimit:: 5, + sync_wave:: 0, apiVersion: "argoproj.io/v1alpha1", kind: "Application", metadata: { name: $.name, namespace: "argocd", + annotations: { "argocd.argoproj.io/sync-wave": std.toString($.sync_wave) }, finalizers: ["resources-finalizer.argocd.argoproj.io"], }, spec: { diff --git a/k8s-manifests/monitoring/prometheus-stack.jsonnet b/k8s-manifests/monitoring/prometheus-stack.jsonnet index 7a8c356..8b4dfb5 100644 --- a/k8s-manifests/monitoring/prometheus-stack.jsonnet +++ b/k8s-manifests/monitoring/prometheus-stack.jsonnet @@ -15,7 +15,8 @@ argoapp + { repo:: "https://github.com/prometheus-community/helm-charts.git", path:: "charts/kube-prometheus-stack/crds/", version:: "kube-prometheus-stack-" + vars.version, - syncOptions:: ["CreateNamespace=true", "Replace=true"] + syncOptions:: ["CreateNamespace=true", "Replace=true"], + sync_wave:: -1, }, helmapp + { name:: "prometheus-grafana",