{{- if .Values.redis.enabled }}
apiVersion: v1
kind: Service
metadata:
  name: {{ include "tod.fullname" . }}-redis
  labels:
    {{- include "tod.componentLabels" (dict "context" . "component" "redis") | nindent 4 }}
spec:
  type: ClusterIP
  ports:
    - name: redis
      port: {{ .Values.redis.service.port }}
      targetPort: redis
      protocol: TCP
  selector:
    {{- include "tod.componentSelectorLabels" (dict "context" . "component" "redis") | nindent 4 }}
{{- end }}
