diff --git a/charts/opentelemetry-kube-stack/templates/_helpers.tpl b/charts/opentelemetry-kube-stack/templates/_helpers.tpl index efdecfcfb..f5d18b8a2 100644 --- a/charts/opentelemetry-kube-stack/templates/_helpers.tpl +++ b/charts/opentelemetry-kube-stack/templates/_helpers.tpl @@ -288,7 +288,7 @@ Helpers for prometheus servicemonitors {{- end -}} {{/* Sets default scrape limits for servicemonitor */}} -{{- define "servicemonitor.scrapeLimits" -}} +{{- define "opentelemetry-kube-stack.servicemonitor.scrapeLimits" -}} {{- with .sampleLimit }} sampleLimit: {{ . }} {{- end }} diff --git a/charts/opentelemetry-kube-stack/templates/exporters/core-dns/servicemonitor.yaml b/charts/opentelemetry-kube-stack/templates/exporters/core-dns/servicemonitor.yaml index 9d8dc087e..fdb2cd947 100644 --- a/charts/opentelemetry-kube-stack/templates/exporters/core-dns/servicemonitor.yaml +++ b/charts/opentelemetry-kube-stack/templates/exporters/core-dns/servicemonitor.yaml @@ -16,7 +16,7 @@ metadata: {{ include "opentelemetry-kube-stack.labels" . | indent 4 }} spec: jobLabel: {{ .Values.coreDns.serviceMonitor.jobLabel }} - {{- include "servicemonitor.scrapeLimits" .Values.coreDns.serviceMonitor | nindent 2 }} + {{- include "opentelemetry-kube-stack.servicemonitor.scrapeLimits" .Values.coreDns.serviceMonitor | nindent 2 }} selector: {{- if .Values.coreDns.serviceMonitor.selector }} {{ tpl (toYaml .Values.coreDns.serviceMonitor.selector | nindent 4) . }} diff --git a/charts/opentelemetry-kube-stack/templates/exporters/kube-api-server/servicemonitor.yaml b/charts/opentelemetry-kube-stack/templates/exporters/kube-api-server/servicemonitor.yaml index 6f8aecd83..85a2657d4 100644 --- a/charts/opentelemetry-kube-stack/templates/exporters/kube-api-server/servicemonitor.yaml +++ b/charts/opentelemetry-kube-stack/templates/exporters/kube-api-server/servicemonitor.yaml @@ -15,7 +15,7 @@ metadata: {{- end }} {{ include "opentelemetry-kube-stack.labels" . | indent 4 }} spec: - {{- include "servicemonitor.scrapeLimits" .Values.kubeApiServer.serviceMonitor | nindent 2 }} + {{- include "opentelemetry-kube-stack.servicemonitor.scrapeLimits" .Values.kubeApiServer.serviceMonitor | nindent 2 }} endpoints: - bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token {{- if .Values.kubeApiServer.serviceMonitor.interval }} diff --git a/charts/opentelemetry-kube-stack/templates/exporters/kube-controller-manager/servicemonitor.yaml b/charts/opentelemetry-kube-stack/templates/exporters/kube-controller-manager/servicemonitor.yaml index ade0a194c..306442e2f 100644 --- a/charts/opentelemetry-kube-stack/templates/exporters/kube-controller-manager/servicemonitor.yaml +++ b/charts/opentelemetry-kube-stack/templates/exporters/kube-controller-manager/servicemonitor.yaml @@ -16,7 +16,7 @@ metadata: {{ include "opentelemetry-kube-stack.labels" . | indent 4 }} spec: jobLabel: {{ .Values.kubeControllerManager.serviceMonitor.jobLabel }} - {{- include "servicemonitor.scrapeLimits" .Values.kubeControllerManager.serviceMonitor | nindent 2 }} + {{- include "opentelemetry-kube-stack.servicemonitor.scrapeLimits" .Values.kubeControllerManager.serviceMonitor | nindent 2 }} selector: {{- if .Values.kubeControllerManager.serviceMonitor.selector }} {{ tpl (toYaml .Values.kubeControllerManager.serviceMonitor.selector | nindent 4) . }} diff --git a/charts/opentelemetry-kube-stack/templates/exporters/kube-dns/servicemonitor.yaml b/charts/opentelemetry-kube-stack/templates/exporters/kube-dns/servicemonitor.yaml index e49099196..ce66d9be5 100644 --- a/charts/opentelemetry-kube-stack/templates/exporters/kube-dns/servicemonitor.yaml +++ b/charts/opentelemetry-kube-stack/templates/exporters/kube-dns/servicemonitor.yaml @@ -16,7 +16,7 @@ metadata: {{ include "opentelemetry-kube-stack.labels" . | indent 4 }} spec: jobLabel: {{ .Values.kubeDns.serviceMonitor.jobLabel }} - {{- include "servicemonitor.scrapeLimits" .Values.kubeDns.serviceMonitor | nindent 2 }} + {{- include "opentelemetry-kube-stack.servicemonitor.scrapeLimits" .Values.kubeDns.serviceMonitor | nindent 2 }} selector: {{- if .Values.kubeDns.serviceMonitor.selector }} {{ tpl (toYaml .Values.kubeDns.serviceMonitor.selector | nindent 4) . }} diff --git a/charts/opentelemetry-kube-stack/templates/exporters/kube-etcd/servicemonitor.yaml b/charts/opentelemetry-kube-stack/templates/exporters/kube-etcd/servicemonitor.yaml index bf622f204..65f7f484f 100644 --- a/charts/opentelemetry-kube-stack/templates/exporters/kube-etcd/servicemonitor.yaml +++ b/charts/opentelemetry-kube-stack/templates/exporters/kube-etcd/servicemonitor.yaml @@ -16,7 +16,7 @@ metadata: {{ include "opentelemetry-kube-stack.labels" . | indent 4 }} spec: jobLabel: {{ .Values.kubeEtcd.serviceMonitor.jobLabel }} - {{- include "servicemonitor.scrapeLimits" .Values.kubeEtcd.serviceMonitor | nindent 4 }} + {{- include "opentelemetry-kube-stack.servicemonitor.scrapeLimits" .Values.kubeEtcd.serviceMonitor | nindent 4 }} selector: {{- if .Values.kubeEtcd.serviceMonitor.selector }} {{ tpl (toYaml .Values.kubeEtcd.serviceMonitor.selector | nindent 4) . }} diff --git a/charts/opentelemetry-kube-stack/templates/exporters/kube-proxy/servicemonitor.yaml b/charts/opentelemetry-kube-stack/templates/exporters/kube-proxy/servicemonitor.yaml index 00f0aab11..b15e89a49 100644 --- a/charts/opentelemetry-kube-stack/templates/exporters/kube-proxy/servicemonitor.yaml +++ b/charts/opentelemetry-kube-stack/templates/exporters/kube-proxy/servicemonitor.yaml @@ -16,7 +16,7 @@ metadata: {{ include "opentelemetry-kube-stack.labels" . | indent 4 }} spec: jobLabel: {{ .Values.kubeProxy.serviceMonitor.jobLabel }} - {{- include "servicemonitor.scrapeLimits" .Values.kubeProxy.serviceMonitor | nindent 2 }} + {{- include "opentelemetry-kube-stack.servicemonitor.scrapeLimits" .Values.kubeProxy.serviceMonitor | nindent 2 }} selector: {{- if .Values.kubeProxy.serviceMonitor.selector }} {{ tpl (toYaml .Values.kubeProxy.serviceMonitor.selector | nindent 4) . }} diff --git a/charts/opentelemetry-kube-stack/templates/exporters/kube-scheduler/servicemonitor.yaml b/charts/opentelemetry-kube-stack/templates/exporters/kube-scheduler/servicemonitor.yaml index 3ba2e27fb..8b1920105 100644 --- a/charts/opentelemetry-kube-stack/templates/exporters/kube-scheduler/servicemonitor.yaml +++ b/charts/opentelemetry-kube-stack/templates/exporters/kube-scheduler/servicemonitor.yaml @@ -16,7 +16,7 @@ metadata: {{ include "opentelemetry-kube-stack.labels" . | indent 4 }} spec: jobLabel: {{ .Values.kubeScheduler.serviceMonitor.jobLabel }} - {{- include "servicemonitor.scrapeLimits" .Values.kubeScheduler.serviceMonitor | nindent 2 }} + {{- include "opentelemetry-kube-stack.servicemonitor.scrapeLimits" .Values.kubeScheduler.serviceMonitor | nindent 2 }} selector: {{- if .Values.kubeScheduler.serviceMonitor.selector }} {{ tpl (toYaml .Values.kubeScheduler.serviceMonitor.selector | nindent 4) . }}