diff --git a/acceptance-tests/templates/prometheus-pm.yaml b/acceptance-tests/templates/prometheus-pm.yaml new file mode 100644 index 0000000..38e933e --- /dev/null +++ b/acceptance-tests/templates/prometheus-pm.yaml @@ -0,0 +1,18 @@ +{{- if .Values.podMonitor.enabled -}} +apiVersion: monitoring.coreos.com/v1 +kind: PodMonitor +metadata: + labels: + {{- include "acceptance-tests.labels" . | nindent 4 }} + name: {{ include "acceptance-tests.fullname" . }}-pm +spec: + podMetricsEndpoints: + - interval: {{ .Values.podMonitor.frequency }} + path: {{ .Values.podMonitor.httpPath }} + port: {{ .Values.podMonitor.httpPort }} + selector: + matchLabels: + {{- with .Values.podMonitor.matchLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} +{{- end }} diff --git a/acceptance-tests/values.yaml b/acceptance-tests/values.yaml index d266039..30df3ce 100644 --- a/acceptance-tests/values.yaml +++ b/acceptance-tests/values.yaml @@ -58,3 +58,16 @@ configuration: localAccount: username: myusername password: mypassword + +# If enabled, this will create a PodMonitor object in order +# to gather metrics on the tests, as allure provides a prometheus compatible +# file which can be scrapped. +podMonitor: + enabled: false + # match the pod where prometheusData.txt is hosted + matchLabels: + app.kubernetes.io/name: apache-nas + httpPath: /public/non-regression/report/export/prometheusData.txt + httpPort: "80" + # Should be set to a value coherent with the `job.schedule` parameter above. + frequency: 1d