From fee405718f01cd240074c47a04bbd6592ada108b Mon Sep 17 00:00:00 2001 From: viktorbarzin Date: Sun, 2 Apr 2023 19:32:25 +0100 Subject: [PATCH] add monitoring for finance app backend [ci skip] --- modules/kubernetes/finance_app/main.tf | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/kubernetes/finance_app/main.tf b/modules/kubernetes/finance_app/main.tf index da6d641d..00a3e175 100644 --- a/modules/kubernetes/finance_app/main.tf +++ b/modules/kubernetes/finance_app/main.tf @@ -68,6 +68,11 @@ resource "kubernetes_deployment" "finance_app" { labels = { app = "finance-app" } + annotations = { + "prometheus.io/scrape" = "true" + "prometheus.io/path" = "/metrics" + "prometheus.io/port" = 5000 + } } spec { replicas = 1 @@ -84,6 +89,11 @@ resource "kubernetes_deployment" "finance_app" { labels = { app = "finance-app" } + annotations = { + "prometheus.io/scrape" = "true" + "prometheus.io/path" = "/metrics" + "prometheus.io/port" = 5000 + } } spec { container {