apiVersion: v1
kind: Pod
metadata:
  name: {{ template "redis-ha.fullname" . }}-service-test
  labels:
{{ include "labels.standard" . | indent 4 }}
  annotations:
    "helm.sh/hook": test-success
spec:
  containers:
  - name: "{{ .Release.Name }}-service-test"
    image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
    command:
      - sh
      - -c
      - redis-cli -h {{ template "redis-ha.fullname" . }} -p {{ .Values.redis.port }} info server
  {{- if .Values.imagePullSecrets }}
  imagePullSecrets: {{ toYaml .Values.imagePullSecrets | nindent 4 }}
  {{- end }}
  restartPolicy: Never
