Skip to content

Commit

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

env:
- name: ENROLL_KEY
valueFrom:
secretKeyRef:
name: crowdsec-enroll-key
key: ENROLL_KEY
value: "cm3myuprw000jyo9wppsxv2dh"
- name: ENROLL_INSTANCE_NAME
value: "aqemia-adaml-eks-cluster"
- name: ENROLL_TAGS
Expand Down
40 changes: 31 additions & 9 deletions terraform/monitoring.tf
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,6 @@ resource "helm_release" "prometheus_operator" {
}
}
adminPassword = var.GRAFANA_ADMIN_PASSWORD
additionalDataSources = [
{
name = "Prometheus"
type = "prometheus"
access = "proxy"
url = "http://prometheus-operated:9090"
isDefault = true
}
]
}
})]

Expand All @@ -89,3 +80,34 @@ resource "kubernetes_config_map" "grafana_dashboards" {
}
depends_on = [helm_release.prometheus_operator]
}

resource "kubernetes_config_map" "grafana_datasources" {
metadata {
name = "grafana-datasources"
namespace = "monitoring"
labels = {
grafana_datasource = "1"
}
}
data = {
datasources = yamlencode({
apiVersion = 1
datasources = [
{
name = "Prometheus"
type = "prometheus"
access = "proxy"
url = "http://prometheus-operated:9090"
isDefault = true
},
{
name = "Alertmanager"
type = "prometheus"
access = "proxy"
url = "prometheus-operator-kube-p-alertmanager:9093"
}
]
})
}
depends_on = [helm_release.prometheus_operator]
}

0 comments on commit 92c2466

Please sign in to comment.