From bfa89199195440d57bec946a4a00c2c477cec586 Mon Sep 17 00:00:00 2001 From: Darko Krizic Date: Thu, 5 May 2022 13:35:09 +0200 Subject: [PATCH] Add servicemonitor --- charts/formserver/Chart.yaml | 2 +- .../formserver/templates/servicemonitor.yaml | 19 +++++++++++++++++++ charts/formserver/values.yaml | 4 ++++ 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 charts/formserver/templates/servicemonitor.yaml diff --git a/charts/formserver/Chart.yaml b/charts/formserver/Chart.yaml index 1f3a83d..784f5a5 100644 --- a/charts/formserver/Chart.yaml +++ b/charts/formserver/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 1.0.3 +version: 1.0.4 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/formserver/templates/servicemonitor.yaml b/charts/formserver/templates/servicemonitor.yaml new file mode 100644 index 0000000..13ef44c --- /dev/null +++ b/charts/formserver/templates/servicemonitor.yaml @@ -0,0 +1,19 @@ +{{- if .Values.monitoring.serviceMonitor.enabled }} +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: {{ include "formserver.fullname" . }} + labels: + release: monitoring +spec: + endpoints: + - interval: 10s + path: /metrics/ + port: http + namespaceSelector: + matchNames: + - {{ include "formserver.fullname" . }} + selector: + matchLabels: + app.kubernetes.io/name: {{ include "formserver.fullname" . }} +{{- end }} diff --git a/charts/formserver/values.yaml b/charts/formserver/values.yaml index c4681d6..93899d7 100644 --- a/charts/formserver/values.yaml +++ b/charts/formserver/values.yaml @@ -95,6 +95,10 @@ database: name: "secret" key: "secretKey" +monitoring: + serviceMonitor: + enabled: false + storage: afsdata: size: 10Gi