diff --git a/.github/workflows/helm-test.yml b/.github/workflows/helm-test.yml index c55336f..5eac9d7 100644 --- a/.github/workflows/helm-test.yml +++ b/.github/workflows/helm-test.yml @@ -23,4 +23,4 @@ jobs: run : helm lint ./helm/prescaling-exporter - name: Helm3 template - run : helm template prescaling-exporter helm/prescaling-exporter + run : helm template prescaling-exporter helm/prescaling-exporter -f helm/test-values.yml diff --git a/helm/prescaling-exporter/templates/monitor.yaml b/helm/prescaling-exporter/templates/monitor.yaml index cffab6c..5e3db7e 100644 --- a/helm/prescaling-exporter/templates/monitor.yaml +++ b/helm/prescaling-exporter/templates/monitor.yaml @@ -20,7 +20,7 @@ spec: {{- end }} {{- if .Values.prometheus.monitor.relabelings }} relabelings: - {{ toYaml .Values.prometheus.monitor.relabelings | indent 8 }} + {{ toYaml .Values.prometheus.monitor.relabelings | nindent 8 }} {{- end }} {{- end -}} @@ -41,7 +41,7 @@ spec: scrapeTimeout: {{ .Values.victoriametrics.monitor.scrapeTimeout }} {{- if .Values.victoriametrics.monitor.relabelings }} relabelConfigs: - {{ toYaml .Values.victoriametrics.monitor.relabelings | indent 8 }} + {{ toYaml .Values.victoriametrics.monitor.relabelings | nindent 8 }} {{- end }} jobLabel: {{ template "prescaling-exporter.fullname" . }} selector: diff --git a/helm/test-values.yml b/helm/test-values.yml new file mode 100644 index 0000000..dfd75ef --- /dev/null +++ b/helm/test-values.yml @@ -0,0 +1,47 @@ +# Configure Prometheus service scrapping with +prometheus: + monitor: + enabled: false + additionalLabels: {} + relabelings: + - action: replace + regex: (.*) + replacement: $1 + sourceLabels: + - __meta_kubernetes_pod_name + targetLabel: kubernetes_pod_name + - action: replace + regex: (.*) + replacement: $1 + sourceLabels: + - __meta_kubernetes_namespace + targetLabel: kubernetes_namespace + - action: labelmap + regex: __meta_kubernetes_pod_label_(.+) + - action: labeldrop + regex: (endpoint|pod_template_hash|pod_template_generation|controller_revision_hash) + scrapeTimeout: 10s + +# Configure VictoiraMetrics service scrapping with +victoriametrics: + monitor: + enabled: true + additionalLabels: {} + relabelings: + - action: replace + regex: (.*) + replacement: $1 + sourceLabels: + - __meta_kubernetes_pod_name + targetLabel: kubernetes_pod_name + - action: replace + regex: (.*) + replacement: $1 + sourceLabels: + - __meta_kubernetes_namespace + targetLabel: kubernetes_namespace + - action: labelmap + regex: __meta_kubernetes_pod_label_(.+) + - action: labeldrop + regex: (endpoint|pod_template_hash|pod_template_generation|controller_revision_hash) + scrapeTimeout: 10s