apiVersion: v1
kind: Pod
metadata:
  name: "{{ include "prometheus-mongodb-exporter.fullname" . }}-test-connection"
  labels:
    app.kubernetes.io/name: {{ include "prometheus-mongodb-exporter.name" . }}
    app.kubernetes.io/instance: {{ .Release.Name }}
    app.kubernetes.io/managed-by: {{ .Release.Service }}
    helm.sh/chart: {{ include "prometheus-mongodb-exporter.chart" . }}
  annotations:
    "helm.sh/hook": test-success
spec:
  containers:
  - name: wget
    image: busybox
    command: ['wget']
    args:  ['-qO-', '{{ include "prometheus-mongodb-exporter.fullname" . }}:{{ .Values.service.port }}/metrics']
  restartPolicy: Never
