40 lines
1.1 KiB
YAML
40 lines
1.1 KiB
YAML
|
|
{{- with .Values.test }}
|
||
|
|
{{- if (and .enabled $.Values.lokiCanary.enabled) }}
|
||
|
|
---
|
||
|
|
apiVersion: v1
|
||
|
|
kind: Pod
|
||
|
|
metadata:
|
||
|
|
name: "{{ include "loki.name" $ }}-helm-test"
|
||
|
|
namespace: {{ include "loki.namespace" $ }}
|
||
|
|
labels:
|
||
|
|
{{- include "loki.helmTestLabels" $ | nindent 4 }}
|
||
|
|
{{- with .labels }}
|
||
|
|
{{- toYaml . | nindent 4 }}
|
||
|
|
{{- end }}
|
||
|
|
annotations:
|
||
|
|
{{- with .annotations }}
|
||
|
|
{{- toYaml . | nindent 4 }}
|
||
|
|
{{- end }}
|
||
|
|
"helm.sh/hook": test
|
||
|
|
spec:
|
||
|
|
{{- if and (semverCompare ">=1.33-0" (include "loki.kubeVersion" $)) (kindIs "bool" .hostUsers) }}
|
||
|
|
hostUsers: {{ .hostUsers }}
|
||
|
|
{{- end }}
|
||
|
|
containers:
|
||
|
|
- name: loki-helm-test
|
||
|
|
image: {{ include "loki.helmTestImage" $ }}
|
||
|
|
env:
|
||
|
|
- name: CANARY_SERVICE_ADDRESS
|
||
|
|
value: "{{ tpl .canaryServiceAddress $ }}"
|
||
|
|
- name: CANARY_PROMETHEUS_ADDRESS
|
||
|
|
value: "{{ .prometheusAddress }}"
|
||
|
|
{{- with .timeout }}
|
||
|
|
- name: CANARY_TEST_TIMEOUT
|
||
|
|
value: "{{ . }}"
|
||
|
|
{{- end }}
|
||
|
|
args:
|
||
|
|
- -test.v
|
||
|
|
restartPolicy: Never
|
||
|
|
{{- end }}
|
||
|
|
{{- end }}
|