add cronjob to monitor prometheus and init correct config for wireguard ui [CI SKIP]
This commit is contained in:
parent
7d6358cf53
commit
e918c6fdfd
1 changed files with 30 additions and 0 deletions
|
|
@ -143,6 +143,36 @@ resource "helm_release" "grafana" {
|
|||
values = [file("${path.module}/grafana_chart_values.yaml")]
|
||||
}
|
||||
|
||||
resource "kubernetes_cron_job" "monitor_prom" {
|
||||
metadata {
|
||||
name = "monitor-prometheus"
|
||||
}
|
||||
spec {
|
||||
concurrency_policy = "Replace"
|
||||
failed_jobs_history_limit = 5
|
||||
schedule = "*/30 * * * *"
|
||||
job_template {
|
||||
metadata {
|
||||
|
||||
}
|
||||
spec {
|
||||
template {
|
||||
metadata {
|
||||
|
||||
}
|
||||
spec {
|
||||
container {
|
||||
name = "monitor-prometheus"
|
||||
image = "alpine"
|
||||
command = ["/bin/sh", "-c", "apk add --update curl && curl --connect-timeout 2 prometheus-server.monitoring.svc.cluster.local || curl https://webhook.viktorbarzin.me/fb/message-viktor -d 'Prometheus is down!'"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
resource "kubernetes_ingress" "status" {
|
||||
metadata {
|
||||
name = "hetrix-redirect-ingress"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue