apiVersion: v1
kind: Service
metadata:
  name: {{ template "redis-ha.fullname" . }}-slave-svc
  labels:
    role: service
{{ include "labels.standard" . | indent 4 }}
  annotations:
{{ toYaml .Values.servers.annotations | indent 4 }}
spec:
  ports:
  - port: 6379
    protocol: TCP
    targetPort: 6379
  selector:
    app: {{ template "redis-ha.name" . }}
    release: "{{ .Release.Name }}"
    redis-node: "true"
    redis-role: "slave"
  type: "{{ .Values.servers.serviceType }}"
