diff --git a/freeleaps/helm-pkg/authentication/templates/authentication/servicemonitor.yaml b/freeleaps/helm-pkg/authentication/templates/authentication/servicemonitor.yaml index 4f72653a..bb79fb8c 100644 --- a/freeleaps/helm-pkg/authentication/templates/authentication/servicemonitor.yaml +++ b/freeleaps/helm-pkg/authentication/templates/authentication/servicemonitor.yaml @@ -10,24 +10,24 @@ apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: name: {{ $service.name }}-service-monitor - namespace: {{ .Values.authentication.serviceMonitor.namespace }} + namespace: {{ $service.serviceMonitor.namespace }} labels: app.kubernetes.io/version: {{ $appVersion }} app.kubernetes.io/name: {{ $service.name }}-service-monitor app.kubernetes.io/managed-by: {{ $releaseService }} app.kubernetes.io/instance: {{ $releaseName }} - {{- if .Values.authentication.serviceMonitor.labels }} - {{- toYaml .Values.authentication.serviceMonitor.labels | nindent 4 }} + {{- if $service.serviceMonitor.labels }} + {{- toYaml $service.serviceMonitor.labels | nindent 4 }} {{- end }} spec: endpoints: - path: /api/_/metrics targetPort: {{ $service.targetPort }} - {{- if .Values.authentication.serviceMonitor.interval }} - interval: {{ .Values.authentication.serviceMonitor.interval }} + {{- if $service.serviceMonitor.interval }} + interval: {{ $service.serviceMonitor.interval }} {{- end }} - {{- if .Values.authentication.serviceMonitor.scrapeTimeout }} - scrapeTimeout: {{ .Values.authentication.serviceMonitor.scrapeTimeout }} + {{- if $service.serviceMonitor.scrapeTimeout }} + scrapeTimeout: {{ $service.serviceMonitor.scrapeTimeout }} {{- end }} namespaceSelector: matchNames: diff --git a/freeleaps/helm-pkg/centralStorage/templates/central-storage/servicemonitor.yaml b/freeleaps/helm-pkg/centralStorage/templates/central-storage/servicemonitor.yaml index d4e55380..55ff1ac4 100644 --- a/freeleaps/helm-pkg/centralStorage/templates/central-storage/servicemonitor.yaml +++ b/freeleaps/helm-pkg/centralStorage/templates/central-storage/servicemonitor.yaml @@ -10,24 +10,24 @@ apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: name: {{ $service.name }}-service-monitor - namespace: {{ .Values.centralStorage.serviceMonitor.namespace }} + namespace: {{ $service.serviceMonitor.namespace }} labels: app.kubernetes.io/version: {{ $appVersion }} app.kubernetes.io/name: {{ $service.name }}-service-monitor app.kubernetes.io/managed-by: {{ $releaseService }} app.kubernetes.io/instance: {{ $releaseName }} - {{- if .Values.centralStorage.serviceMonitor.labels }} - {{- toYaml .Values.centralStorage.serviceMonitor.labels | nindent 4 }} + {{- if $service.serviceMonitor.labels }} + {{- toYaml $service.serviceMonitor.labels | nindent 4 }} {{- end }} spec: endpoints: - path: /api/_/metrics targetPort: {{ $service.targetPort }} - {{- if .Values.centralStorage.serviceMonitor.interval }} - interval: {{ .Values.centralStorage.serviceMonitor.interval }} + {{- if $service.serviceMonitor.interval }} + interval: {{ $service.serviceMonitor.interval }} {{- end }} - {{- if .Values.centralStorage.serviceMonitor.scrapeTimeout }} - scrapeTimeout: {{ .Values.centralStorage.serviceMonitor.scrapeTimeout }} + {{- if $service.serviceMonitor.scrapeTimeout }} + scrapeTimeout: {{ $service.serviceMonitor.scrapeTimeout }} {{- end }} namespaceSelector: matchNames: diff --git a/freeleaps/helm-pkg/content/templates/content/servicemonitor.yaml b/freeleaps/helm-pkg/content/templates/content/servicemonitor.yaml index 0c219dcd..2075c8fa 100644 --- a/freeleaps/helm-pkg/content/templates/content/servicemonitor.yaml +++ b/freeleaps/helm-pkg/content/templates/content/servicemonitor.yaml @@ -10,24 +10,24 @@ apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: name: {{ $service.name }}-service-monitor - namespace: {{ .Values.content.serviceMonitor.namespace }} + namespace: {{ $service.serviceMonitor.namespace }} labels: app.kubernetes.io/version: {{ $appVersion }} app.kubernetes.io/name: {{ $service.name }}-service-monitor app.kubernetes.io/managed-by: {{ $releaseService }} app.kubernetes.io/instance: {{ $releaseName }} - {{- if .Values.content.serviceMonitor.labels }} - {{- toYaml .Values.content.serviceMonitor.labels | nindent 4 }} + {{- if $service.serviceMonitor.labels }} + {{- toYaml $service.serviceMonitor.labels | nindent 4 }} {{- end }} spec: endpoints: - path: /api/_/metrics targetPort: {{ $service.targetPort }} - {{- if .Values.content.serviceMonitor.interval }} - interval: {{ .Values.content.serviceMonitor.interval }} + {{- if $service.serviceMonitor.interval }} + interval: {{ $service.serviceMonitor.interval }} {{- end }} - {{- if .Values.content.serviceMonitor.scrapeTimeout }} - scrapeTimeout: {{ .Values.content.serviceMonitor.scrapeTimeout }} + {{- if $service.serviceMonitor.scrapeTimeout }} + scrapeTimeout: {{ $service.serviceMonitor.scrapeTimeout }} {{- end }} namespaceSelector: matchNames: diff --git a/freeleaps/helm-pkg/notification/templates/notification/servicemonitor.yaml b/freeleaps/helm-pkg/notification/templates/notification/servicemonitor.yaml index 2f13770e..fef1600f 100644 --- a/freeleaps/helm-pkg/notification/templates/notification/servicemonitor.yaml +++ b/freeleaps/helm-pkg/notification/templates/notification/servicemonitor.yaml @@ -10,24 +10,24 @@ apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: name: {{ $service.name }}-service-monitor - namespace: {{ .Values.notification.serviceMonitor.namespace }} + namespace: {{ $service.serviceMonitor.namespace }} labels: app.kubernetes.io/version: {{ $appVersion }} app.kubernetes.io/name: {{ $service.name }}-service-monitor app.kubernetes.io/managed-by: {{ $releaseService }} app.kubernetes.io/instance: {{ $releaseName }} - {{- if .Values.notification.serviceMonitor.labels }} - {{- toYaml .Values.notification.serviceMonitor.labels | nindent 4 }} + {{- if $service.serviceMonitor.labels }} + {{- toYaml $service.serviceMonitor.labels | nindent 4 }} {{- end }} spec: endpoints: - path: /api/_/metrics targetPort: {{ $service.targetPort }} - {{- if .Values.notification.serviceMonitor.interval }} - interval: {{ .Values.notification.serviceMonitor.interval }} + {{- if $service.serviceMonitor.interval }} + interval: {{ $service.serviceMonitor.interval }} {{- end }} - {{- if .Values.notification.serviceMonitor.scrapeTimeout }} - scrapeTimeout: {{ .Values.notification.serviceMonitor.scrapeTimeout }} + {{- if $service.serviceMonitor.scrapeTimeout }} + scrapeTimeout: {{ $service.serviceMonitor.scrapeTimeout }} {{- end }} namespaceSelector: matchNames: diff --git a/freeleaps/helm-pkg/payment/templates/payment/servicemonitor.yaml b/freeleaps/helm-pkg/payment/templates/payment/servicemonitor.yaml index 20ae3af7..bf887405 100644 --- a/freeleaps/helm-pkg/payment/templates/payment/servicemonitor.yaml +++ b/freeleaps/helm-pkg/payment/templates/payment/servicemonitor.yaml @@ -10,24 +10,24 @@ apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: name: {{ $service.name }}-service-monitor - namespace: {{ .Values.payment.serviceMonitor.namespace }} + namespace: {{ $service.serviceMonitor.namespace }} labels: app.kubernetes.io/version: {{ $appVersion }} app.kubernetes.io/name: {{ $service.name }}-service-monitor app.kubernetes.io/managed-by: {{ $releaseService }} app.kubernetes.io/instance: {{ $releaseName }} - {{- if .Values.payment.serviceMonitor.labels }} - {{- toYaml .Values.payment.serviceMonitor.labels | nindent 4 }} + {{- if $service.serviceMonitor.labels }} + {{- toYaml $service.serviceMonitor.labels | nindent 4 }} {{- end }} spec: endpoints: - path: /api/_/metrics targetPort: {{ $service.targetPort }} - {{- if .Values.payment.serviceMonitor.interval }} - interval: {{ .Values.payment.serviceMonitor.interval }} + {{- if $service.serviceMonitor.interval }} + interval: {{ $service.serviceMonitor.interval }} {{- end }} - {{- if .Values.payment.serviceMonitor.scrapeTimeout }} - scrapeTimeout: {{ .Values.payment.serviceMonitor.scrapeTimeout }} + {{- if $service.serviceMonitor.scrapeTimeout }} + scrapeTimeout: {{ $service.serviceMonitor.scrapeTimeout }} {{- end }} namespaceSelector: matchNames: