diff --git a/deployment/helm/tech-blog-backend/templates/service-monitor.yaml b/deployment/helm/tech-blog-backend/templates/service-monitor.yaml index b5ce5c1..eec8ed3 100644 --- a/deployment/helm/tech-blog-backend/templates/service-monitor.yaml +++ b/deployment/helm/tech-blog-backend/templates/service-monitor.yaml @@ -1,3 +1,4 @@ +{{ if .Values.prometheus.enabled -}} apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: @@ -16,3 +17,4 @@ spec: - port: api-v1 path: metrics interval: 30s +{{ end }} \ No newline at end of file diff --git a/deployment/helm/tech-blog-backend/values.yaml b/deployment/helm/tech-blog-backend/values.yaml index dc88501..d12479e 100644 --- a/deployment/helm/tech-blog-backend/values.yaml +++ b/deployment/helm/tech-blog-backend/values.yaml @@ -14,3 +14,6 @@ migration: imagePullPolicy: IfNotPresent dotEnv: secretResourceName: "" + +prometheus: + enabled: false