apiVersion: v1
kind: Pod
metadata:
  name: "{{ include "hydra.fullname" . }}-test-connection"
  {{- if .Release.Namespace }}
  namespace: {{ .Release.Namespace }}
  {{- end }}
  labels: {{- include "hydra.labels" . | nindent 4 }}
    {{- with .Values.test.labels }}
    {{- toYaml . | nindent 4 }}
    {{- end }}
  annotations:
    "helm.sh/hook": test-success
spec:
  containers:
    - name: healthcheck-ready
      image: "{{ .Values.test.busybox.repository }}:{{ .Values.test.busybox.tag }}"
      command: ['wget']
      args:  ['{{ include "hydra.fullname" . }}-admin:{{ .Values.service.admin.port }}/health/ready']
  restartPolicy: Never