From 5caeac68c5ae7e04c2cffcdd8cf80b4b8a6ab265 Mon Sep 17 00:00:00 2001 From: Kevin Lefevre Date: Mon, 19 Sep 2022 19:13:17 +0200 Subject: [PATCH] fix: remove dependencies on kube-prometheus-chart and use crds instead Signed-off-by: Kevin Lefevre --- cert-manager.tf | 2 +- flux.tf | 2 +- karma.tf | 2 +- keda.tf | 2 +- keycloak.tf | 2 +- kong.tf | 2 +- loki-stack.tf | 2 +- modules/aws/cert-manager.tf | 2 +- modules/aws/cluster-autoscaler.tf | 2 +- modules/aws/external-dns.tf | 2 +- modules/aws/loki-stack.tf | 2 +- modules/aws/prometheus-cloudwatch-exporter.tf | 2 +- modules/aws/tigera-operator.tf | 2 +- modules/scaleway/cert-manager.tf | 4 ++-- modules/scaleway/external-dns.tf | 2 +- modules/scaleway/loki-stack.tf | 2 +- prometheus-blackbox-exporter.tf | 2 +- promtail.tf | 2 +- rabbitmq-operator.tf | 2 +- tigera-operator.tf | 2 +- traefik.tf | 2 +- 21 files changed, 22 insertions(+), 22 deletions(-) diff --git a/cert-manager.tf b/cert-manager.tf index 25fa6d4af..103835cfb 100644 --- a/cert-manager.tf +++ b/cert-manager.tf @@ -79,7 +79,7 @@ resource "helm_release" "cert-manager" { namespace = kubernetes_namespace.cert-manager.*.metadata.0.name[count.index] depends_on = [ - helm_release.kube-prometheus-stack + kubectl_manifest.prometheus-operator_crds ] } diff --git a/flux.tf b/flux.tf index 907fa6836..084befae3 100644 --- a/flux.tf +++ b/flux.tf @@ -104,7 +104,7 @@ resource "helm_release" "flux" { namespace = kubernetes_namespace.flux.*.metadata.0.name[count.index] depends_on = [ - helm_release.kube-prometheus-stack + kubectl_manifest.prometheus-operator_crds ] } diff --git a/karma.tf b/karma.tf index e9059f5b7..a99690d59 100644 --- a/karma.tf +++ b/karma.tf @@ -60,7 +60,7 @@ resource "helm_release" "karma" { namespace = local.karma["create_ns"] ? kubernetes_namespace.karma.*.metadata.0.name[count.index] : local.karma["namespace"] depends_on = [ - helm_release.kube-prometheus-stack + kubectl_manifest.prometheus-operator_crds ] } diff --git a/keda.tf b/keda.tf index 0eb45e952..32319b60b 100644 --- a/keda.tf +++ b/keda.tf @@ -59,7 +59,7 @@ resource "helm_release" "keda" { namespace = local.keda["create_ns"] ? kubernetes_namespace.keda.*.metadata.0.name[count.index] : local.keda["namespace"] depends_on = [ - helm_release.kube-prometheus-stack + kubectl_manifest.prometheus-operator_crds ] } diff --git a/keycloak.tf b/keycloak.tf index bf3b84158..96b386f64 100644 --- a/keycloak.tf +++ b/keycloak.tf @@ -60,7 +60,7 @@ resource "helm_release" "keycloak" { namespace = kubernetes_namespace.keycloak.*.metadata.0.name[count.index] depends_on = [ - helm_release.kube-prometheus-stack + kubectl_manifest.prometheus-operator_crds ] } diff --git a/kong.tf b/kong.tf index f3eb54cc1..a2a3d4096 100644 --- a/kong.tf +++ b/kong.tf @@ -83,7 +83,7 @@ resource "helm_release" "kong" { namespace = kubernetes_namespace.kong.*.metadata.0.name[count.index] depends_on = [ - helm_release.kube-prometheus-stack + kubectl_manifest.prometheus-operator_crds ] } diff --git a/loki-stack.tf b/loki-stack.tf index 26348f748..66abfe752 100644 --- a/loki-stack.tf +++ b/loki-stack.tf @@ -91,7 +91,7 @@ resource "helm_release" "loki-stack" { namespace = local.loki-stack["create_ns"] ? kubernetes_namespace.loki-stack.*.metadata.0.name[count.index] : local.loki-stack["namespace"] depends_on = [ - helm_release.kube-prometheus-stack + kubectl_manifest.prometheus-operator_crds ] } diff --git a/modules/aws/cert-manager.tf b/modules/aws/cert-manager.tf index 8dad4109a..215bcbe5c 100644 --- a/modules/aws/cert-manager.tf +++ b/modules/aws/cert-manager.tf @@ -139,7 +139,7 @@ resource "helm_release" "cert-manager" { namespace = kubernetes_namespace.cert-manager.*.metadata.0.name[count.index] depends_on = [ - helm_release.kube-prometheus-stack + kubectl_manifest.prometheus-operator_crds ] } diff --git a/modules/aws/cluster-autoscaler.tf b/modules/aws/cluster-autoscaler.tf index f802f6428..458da3ff2 100644 --- a/modules/aws/cluster-autoscaler.tf +++ b/modules/aws/cluster-autoscaler.tf @@ -150,7 +150,7 @@ resource "helm_release" "cluster-autoscaler" { namespace = kubernetes_namespace.cluster-autoscaler.*.metadata.0.name[count.index] depends_on = [ - helm_release.kube-prometheus-stack + kubectl_manifest.prometheus-operator_crds ] } diff --git a/modules/aws/external-dns.tf b/modules/aws/external-dns.tf index 1b5313bd8..5c6fe144a 100644 --- a/modules/aws/external-dns.tf +++ b/modules/aws/external-dns.tf @@ -123,7 +123,7 @@ resource "helm_release" "external-dns" { namespace = kubernetes_namespace.external-dns[each.key].metadata.0.name depends_on = [ - helm_release.kube-prometheus-stack + kubectl_manifest.prometheus-operator_crds ] } diff --git a/modules/aws/loki-stack.tf b/modules/aws/loki-stack.tf index 217226d25..d0dafcbeb 100644 --- a/modules/aws/loki-stack.tf +++ b/modules/aws/loki-stack.tf @@ -161,7 +161,7 @@ resource "helm_release" "loki-stack" { namespace = local.loki-stack["create_ns"] ? kubernetes_namespace.loki-stack.*.metadata.0.name[count.index] : local.loki-stack["namespace"] depends_on = [ - helm_release.kube-prometheus-stack + kubectl_manifest.prometheus-operator_crds ] } diff --git a/modules/aws/prometheus-cloudwatch-exporter.tf b/modules/aws/prometheus-cloudwatch-exporter.tf index 6fce04361..3b8964d90 100644 --- a/modules/aws/prometheus-cloudwatch-exporter.tf +++ b/modules/aws/prometheus-cloudwatch-exporter.tf @@ -104,7 +104,7 @@ resource "helm_release" "prometheus-cloudwatch-exporter" { namespace = local.prometheus-cloudwatch-exporter["create_ns"] ? kubernetes_namespace.prometheus-cloudwatch-exporter.*.metadata.0.name[count.index] : local.prometheus-cloudwatch-exporter["namespace"] depends_on = [ - helm_release.kube-prometheus-stack + kubectl_manifest.prometheus-operator_crds ] } diff --git a/modules/aws/tigera-operator.tf b/modules/aws/tigera-operator.tf index 73bd3b3ad..532caf5b4 100644 --- a/modules/aws/tigera-operator.tf +++ b/modules/aws/tigera-operator.tf @@ -61,7 +61,7 @@ resource "helm_release" "tigera-operator" { namespace = local.tigera-operator["create_ns"] ? kubernetes_namespace.tigera-operator.*.metadata.0.name[count.index] : local.tigera-operator["namespace"] depends_on = [ - helm_release.kube-prometheus-stack + kubectl_manifest.prometheus-operator_crds ] } diff --git a/modules/scaleway/cert-manager.tf b/modules/scaleway/cert-manager.tf index 88c1abac8..54337f83f 100644 --- a/modules/scaleway/cert-manager.tf +++ b/modules/scaleway/cert-manager.tf @@ -93,7 +93,7 @@ resource "helm_release" "cert-manager" { namespace = kubernetes_namespace.cert-manager.*.metadata.0.name[count.index] depends_on = [ - helm_release.kube-prometheus-stack + kubectl_manifest.prometheus-operator_crds ] } @@ -122,7 +122,7 @@ resource "helm_release" "scaleway-webhook-dns" { namespace = kubernetes_namespace.cert-manager.*.metadata.0.name[count.index] depends_on = [ - helm_release.kube-prometheus-stack, + kubectl_manifest.prometheus-operator_crds, helm_release.cert-manager, time_sleep.cert-manager_sleep ] diff --git a/modules/scaleway/external-dns.tf b/modules/scaleway/external-dns.tf index ce8d2851b..9ccde4341 100644 --- a/modules/scaleway/external-dns.tf +++ b/modules/scaleway/external-dns.tf @@ -85,7 +85,7 @@ resource "helm_release" "external-dns" { namespace = kubernetes_namespace.external-dns.*.metadata.0.name[count.index] depends_on = [ - helm_release.kube-prometheus-stack + kubectl_manifest.prometheus-operator_crds ] } diff --git a/modules/scaleway/loki-stack.tf b/modules/scaleway/loki-stack.tf index 8d9d022d9..bd689c97d 100644 --- a/modules/scaleway/loki-stack.tf +++ b/modules/scaleway/loki-stack.tf @@ -118,7 +118,7 @@ resource "helm_release" "loki-stack" { namespace = local.loki-stack["create_ns"] ? kubernetes_namespace.loki-stack.*.metadata.0.name[count.index] : local.loki-stack["namespace"] depends_on = [ - helm_release.kube-prometheus-stack + kubectl_manifest.prometheus-operator_crds ] } diff --git a/prometheus-blackbox-exporter.tf b/prometheus-blackbox-exporter.tf index b02838ea1..31a464fc3 100644 --- a/prometheus-blackbox-exporter.tf +++ b/prometheus-blackbox-exporter.tf @@ -62,7 +62,7 @@ resource "helm_release" "prometheus-blackbox-exporter" { namespace = local.prometheus-blackbox-exporter["create_ns"] ? kubernetes_namespace.prometheus-blackbox-exporter.*.metadata.0.name[count.index] : local.prometheus-blackbox-exporter["namespace"] depends_on = [ - helm_release.kube-prometheus-stack + kubectl_manifest.prometheus-operator_crds ] } diff --git a/promtail.tf b/promtail.tf index 992fa5549..71472c8b9 100644 --- a/promtail.tf +++ b/promtail.tf @@ -114,7 +114,7 @@ resource "helm_release" "promtail" { namespace = local.promtail["namespace"] depends_on = [ - helm_release.kube-prometheus-stack, + kubectl_manifest.prometheus-operator_crds, helm_release.loki-stack, kubernetes_secret.loki-stack-ca, kubernetes_secret.promtail-tls diff --git a/rabbitmq-operator.tf b/rabbitmq-operator.tf index 9ee66b259..38db67969 100644 --- a/rabbitmq-operator.tf +++ b/rabbitmq-operator.tf @@ -59,7 +59,7 @@ resource "helm_release" "rabbitmq-operator" { namespace = local.rabbitmq-operator["create_ns"] ? kubernetes_namespace.rabbitmq-operator.*.metadata.0.name[count.index] : local.rabbitmq-operator["namespace"] depends_on = [ - helm_release.kube-prometheus-stack + kubectl_manifest.prometheus-operator_crds ] } diff --git a/tigera-operator.tf b/tigera-operator.tf index c60969c33..08238ccde 100644 --- a/tigera-operator.tf +++ b/tigera-operator.tf @@ -59,7 +59,7 @@ resource "helm_release" "tigera-operator" { namespace = local.tigera-operator["create_ns"] ? kubernetes_namespace.tigera-operator.*.metadata.0.name[count.index] : local.tigera-operator["namespace"] depends_on = [ - helm_release.kube-prometheus-stack + kubectl_manifest.prometheus-operator_crds ] } diff --git a/traefik.tf b/traefik.tf index e6d2761e9..51a48d864 100644 --- a/traefik.tf +++ b/traefik.tf @@ -62,7 +62,7 @@ resource "helm_release" "traefik" { namespace = kubernetes_namespace.traefik.*.metadata.0.name[count.index] depends_on = [ - helm_release.kube-prometheus-stack, + kubectl_manifest.prometheus-operator_crds ] }