add monitoring to ingress nginx controller [ci skip]

This commit is contained in:
Viktor Barzin 2024-12-31 15:07:32 +00:00
parent 8e1e1a963c
commit d15e8284a8

View file

@ -436,7 +436,7 @@ resource "kubernetes_deployment" "ingress_nginx_controller" {
}
}
spec {
replicas = 3
replicas = 1
selector {
match_labels = {
@ -456,6 +456,9 @@ resource "kubernetes_deployment" "ingress_nginx_controller" {
"app" = "ingress-nginx"
}
annotations = {
"prometheus.io/scrape" = "true"
"prometheus.io/port" = 10254
"diun.enable" = "true"
"diun.include_tags" = "^v\\d+(?:\\.\\d+)?(?:\\.\\d+)?.*$"
}
@ -570,6 +573,11 @@ resource "kubernetes_deployment" "ingress_nginx_controller" {
container_port = 8443
protocol = "TCP"
}
port {
name = "metrics"
container_port = 10254
protocol = "TCP"
}
env {
name = "POD_NAME"
value_from {