blob: a4f11e214a1ce9be4734c616e7a849d73d1ae5b3 [file] [log] [blame]
Mohammed Naser8a2c8fb2023-02-19 17:23:55 +00001{{- with .Values.test }}
2{{- if and .enabled $.Values.monitoring.selfMonitoring.enabled $.Values.monitoring.lokiCanary.enabled }}
3---
4apiVersion: v1
5kind: Pod
6metadata:
7 name: "{{ include "loki.name" $ }}-helm-test"
Giovanni Tirloni52306ad2024-04-12 15:35:05 -03008 namespace: {{ $.Release.Namespace }}
Mohammed Naser8a2c8fb2023-02-19 17:23:55 +00009 labels:
10 {{- include "loki.helmTestLabels" $ | nindent 4 }}
11 {{- with .labels }}
12 {{- toYaml . | nindent 4 }}
13 {{- end }}
14 annotations:
15 {{- with .annotations }}
16 {{- toYaml . | nindent 4 }}
17 {{- end }}
18 "helm.sh/hook": test
19spec:
20 containers:
21 - name: loki-helm-test
22 image: {{ include "loki.helmTestImage" $ }}
23 env:
24 - name: CANARY_PROMETHEUS_ADDRESS
25 value: "{{ .prometheusAddress }}"
26 {{- with .timeout }}
27 - name: CANARY_TEST_TIMEOUT
28 value: "{{ . }}"
29 {{- end }}
30 args:
31 - -test.v
32 restartPolicy: Never
33{{- end }}
34{{- end }}