Skip to content

Commit

Permalink
Refactor crowdsec-values.yaml to use secretKeyRef for ENROLL_KEY value
Browse files Browse the repository at this point in the history
  • Loading branch information
adamlahbib committed Nov 18, 2024
1 parent e63428b commit f1d6b0f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
5 changes: 4 additions & 1 deletion terraform/assets/crowdsec-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ lapi:

env:
- name: ENROLL_KEY
value: "cm3myuprw000jyo9wppsxv2dh"
valueFrom:
secretKeyRef:
name: crowdsec-enroll-key
key: ENROLL_KEY
- name: ENROLL_INSTANCE_NAME
value: "aqemia-adaml-eks-cluster"
- name: ENROLL_TAGS
Expand Down
11 changes: 9 additions & 2 deletions terraform/monitoring.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
resource "kubernetes_namespace" "monitoring" {
metadata {
name = "monitoring"
}
depends_on = [aws_eks_cluster.eks_cluster]
}

resource "helm_release" "loki" {
name = "loki"
repository = "https://grafana.github.io/helm-charts"
Expand Down Expand Up @@ -61,7 +68,7 @@ resource "kubernetes_config_map" "grafana_datasources" {
]
})
}
depends_on = [aws_eks_cluster.eks_cluster]
depends_on = [aws_eks_cluster.eks_cluster, kubernetes_namespace.monitoring]
}

resource "kubernetes_config_map" "grafana_dashboards" {
Expand All @@ -75,7 +82,7 @@ resource "kubernetes_config_map" "grafana_dashboards" {
data = {
"21419.json" = file("./assets/21419.json")
}
depends_on = [aws_eks_cluster.eks_cluster]
depends_on = [aws_eks_cluster.eks_cluster, kubernetes_namespace.monitoring]
}

resource "helm_release" "prometheus_operator" {
Expand Down

0 comments on commit f1d6b0f

Please sign in to comment.