loki-test-pod.yaml 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. {{- if (and .Values.test_pod.enabled .Values.loki.enabled) }}
  2. apiVersion: v1
  3. kind: Pod
  4. metadata:
  5. annotations:
  6. "helm.sh/hook": test-success
  7. labels:
  8. app: {{ template "loki-stack.name" . }}
  9. chart: {{ template "loki-stack.chart" . }}
  10. release: {{ .Release.Name }}
  11. heritage: {{ .Release.Service }}
  12. name: {{ template "loki-stack.fullname" . }}-test
  13. spec:
  14. containers:
  15. - name: test
  16. image: "{{ .Values.test_pod.image }}"
  17. imagePullPolicy: "{{ .Values.test_pod.imagePullPolicy}}"
  18. args:
  19. - /var/lib/loki/test.sh
  20. env:
  21. - name: LOKI_SERVICE
  22. value: {{ template "loki.serviceName" . }}
  23. - name: LOKI_PORT
  24. value: "{{ .Values.loki.service.port }}"
  25. {{- with .Values.proxy.http_proxy }}
  26. - name: HTTP_PROXY
  27. value: "{{ . }}"
  28. {{- end }}
  29. {{- with .Values.proxy.https_proxy }}
  30. - name: HTTPS_PROXY
  31. value: "{{ . }}"
  32. {{- end }}
  33. {{- with .Values.proxy.no_proxy }}
  34. - name: NO_PROXY
  35. value: "{{ . }}"
  36. {{- end }}
  37. volumeMounts:
  38. - name: tests
  39. mountPath: /var/lib/loki
  40. restartPolicy: Never
  41. volumes:
  42. - name: tests
  43. configMap:
  44. name: {{ template "loki-stack.fullname" . }}-test
  45. {{- end }}