From 348c0649c888f5f81319eed3294fda988eedcaad Mon Sep 17 00:00:00 2001 From: "hovhannes.babayan" Date: Tue, 20 Aug 2024 13:53:12 +0400 Subject: [PATCH 1/2] add service monitor to base chart --- charts/base/templates/servicemonitor.yaml | 19 +++++++++++++++++++ charts/base/values.yaml | 6 ++++++ 2 files changed, 25 insertions(+) create mode 100644 charts/base/templates/servicemonitor.yaml diff --git a/charts/base/templates/servicemonitor.yaml b/charts/base/templates/servicemonitor.yaml new file mode 100644 index 0000000..7352b33 --- /dev/null +++ b/charts/base/templates/servicemonitor.yaml @@ -0,0 +1,19 @@ +{{- if .Values.serviceMonitor.enabled -}} +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: {{ include "base.fullname" . }} + labels: + {{- include "base.labels" . | nindent 4 }} +spec: + endpoints: + - interval: {{ .Values.serviceMonitor.interval }} + path: {{ .Values.serviceMonitor.path }} + targetPort: {{ .Values.serviceMonitor.targetPort }} + namespaceSelector: + matchNames: + - {{ .Release.Namespace }} + selector: + matchLabels: + {{- include "base.labels" . | nindent 6 }} +{{- end }} \ No newline at end of file diff --git a/charts/base/values.yaml b/charts/base/values.yaml index 2aa8fc6..6f29927 100644 --- a/charts/base/values.yaml +++ b/charts/base/values.yaml @@ -198,3 +198,9 @@ pdb: enabled: false minAvailable: 1 pdbName: + +serviceMonitor: + enabled: false + interval: 30s + targetPort: 80 + path: /metrics \ No newline at end of file From f3a468d45eba6399aadf16ab682362ecd4614cf2 Mon Sep 17 00:00:00 2001 From: "hovhannes.babayan" Date: Tue, 20 Aug 2024 14:02:34 +0400 Subject: [PATCH 2/2] updates chart version --- charts/base/Chart.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/base/Chart.yaml b/charts/base/Chart.yaml index 3de9f00..99bfd67 100644 --- a/charts/base/Chart.yaml +++ b/charts/base/Chart.yaml @@ -15,10 +15,10 @@ 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: 0.2.2 +version: 0.2.3 # 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 # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "0.2.2" +appVersion: "0.2.3"