blob: 9384865b7b07d30f0a487caad6ce5859a27ae182 [file] [log] [blame]
Mohammed Naser8a2c8fb2023-02-19 17:23:55 +00001{{- with .Values.test }}
Mohammed Naser65cda132024-05-02 14:34:08 -04002{{- if $.Values.lokiCanary.enabled }}
Mohammed Naser8a2c8fb2023-02-19 17:23:55 +00003---
4apiVersion: v1
5kind: Pod
6metadata:
7 name: "{{ include "loki.name" $ }}-helm-test"
Giovanni Tirloni59219b62024-04-09 14:50:25 -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:
Mohammed Naser65cda132024-05-02 14:34:08 -040024 - name: CANARY_SERVICE_ADDRESS
25 value: "{{ .canaryServiceAddress }}"
Mohammed Naser8a2c8fb2023-02-19 17:23:55 +000026 - name: CANARY_PROMETHEUS_ADDRESS
27 value: "{{ .prometheusAddress }}"
28 {{- with .timeout }}
29 - name: CANARY_TEST_TIMEOUT
30 value: "{{ . }}"
31 {{- end }}
32 args:
33 - -test.v
34 restartPolicy: Never
35{{- end }}
36{{- end }}