add monitoring for dawarich [ci skip]
This commit is contained in:
parent
4643e22cc8
commit
c81ff40b10
1 changed files with 31 additions and 4 deletions
|
|
@ -43,8 +43,11 @@ resource "kubernetes_deployment" "dawarich" {
|
||||||
app = "dawarich"
|
app = "dawarich"
|
||||||
}
|
}
|
||||||
annotations = {
|
annotations = {
|
||||||
"diun.enable" = "true"
|
"diun.enable" = "true"
|
||||||
"diun.include_tags" = "latest"
|
"diun.include_tags" = "latest"
|
||||||
|
"prometheus.io/scrape" = "true"
|
||||||
|
"prometheus.io/path" = "/metrics"
|
||||||
|
"prometheus.io/port" = 9394
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
spec {
|
spec {
|
||||||
|
|
@ -56,6 +59,10 @@ resource "kubernetes_deployment" "dawarich" {
|
||||||
name = "http"
|
name = "http"
|
||||||
container_port = 3000
|
container_port = 3000
|
||||||
}
|
}
|
||||||
|
port {
|
||||||
|
name = "prometheus"
|
||||||
|
container_port = 9394
|
||||||
|
}
|
||||||
command = ["dev-entrypoint.sh"]
|
command = ["dev-entrypoint.sh"]
|
||||||
args = ["bin/dev"]
|
args = ["bin/dev"]
|
||||||
env {
|
env {
|
||||||
|
|
@ -98,6 +105,18 @@ resource "kubernetes_deployment" "dawarich" {
|
||||||
name = "APPLICATION_HOSTS"
|
name = "APPLICATION_HOSTS"
|
||||||
value = "dawarich.viktorbarzin.me"
|
value = "dawarich.viktorbarzin.me"
|
||||||
}
|
}
|
||||||
|
env {
|
||||||
|
name = "PROMETHEUS_EXPORTER_ENABLED"
|
||||||
|
value = "true"
|
||||||
|
}
|
||||||
|
env {
|
||||||
|
name = "PROMETHEUS_EXPORTER_PORT"
|
||||||
|
value = "9394"
|
||||||
|
}
|
||||||
|
env {
|
||||||
|
name = "PROMETHEUS_EXPORTER_HOST"
|
||||||
|
value = "0.0.0.0"
|
||||||
|
}
|
||||||
|
|
||||||
# volume_mount {
|
# volume_mount {
|
||||||
# name = "watched"
|
# name = "watched"
|
||||||
|
|
@ -149,6 +168,14 @@ resource "kubernetes_deployment" "dawarich" {
|
||||||
name = "APPLICATION_HOST"
|
name = "APPLICATION_HOST"
|
||||||
value = "dawarich.viktorbarzin.me"
|
value = "dawarich.viktorbarzin.me"
|
||||||
}
|
}
|
||||||
|
env {
|
||||||
|
name = "PROMETHEUS_EXPORTER_ENABLED"
|
||||||
|
value = "false"
|
||||||
|
}
|
||||||
|
env {
|
||||||
|
name = "PROMETHEUS_EXPORTER_HOST"
|
||||||
|
value = "dawarich.dawarich"
|
||||||
|
}
|
||||||
|
|
||||||
# volume_mount {
|
# volume_mount {
|
||||||
# name = "watched"
|
# name = "watched"
|
||||||
|
|
@ -183,7 +210,7 @@ resource "kubernetes_service" "dawarich" {
|
||||||
}
|
}
|
||||||
port {
|
port {
|
||||||
name = "http"
|
name = "http"
|
||||||
port = 443
|
port = 80
|
||||||
target_port = 3000
|
target_port = 3000
|
||||||
protocol = "TCP"
|
protocol = "TCP"
|
||||||
}
|
}
|
||||||
|
|
@ -216,7 +243,7 @@ resource "kubernetes_ingress_v1" "dawarich" {
|
||||||
service {
|
service {
|
||||||
name = "dawarich"
|
name = "dawarich"
|
||||||
port {
|
port {
|
||||||
number = 443
|
number = 80
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue