Mohammed Naser | 8a2c8fb | 2023-02-19 17:23:55 +0000 | [diff] [blame] | 1 | {{- with .Values.test }} |
| 2 | {{- if and .enabled $.Values.monitoring.selfMonitoring.enabled $.Values.monitoring.lokiCanary.enabled }} |
| 3 | --- |
| 4 | apiVersion: v1 |
| 5 | kind: Pod |
| 6 | metadata: |
| 7 | name: "{{ include "loki.name" $ }}-helm-test" |
Giovanni Tirloni | 52306ad | 2024-04-12 15:35:05 -0300 | [diff] [blame] | 8 | namespace: {{ $.Release.Namespace }} |
Mohammed Naser | 8a2c8fb | 2023-02-19 17:23:55 +0000 | [diff] [blame] | 9 | 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 |
| 19 | spec: |
| 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 }} |