{{- if .Values.dex.enabled }}
apiVersion: v1
kind: Service
metadata:
  name: {{ include "rise.fullname" . }}-dex
  labels:
    {{- include "rise.labels" . | nindent 4 }}
    app.kubernetes.io/component: dex
spec:
  type: {{ .Values.dex.service.type }}
  ports:
    - port: {{ .Values.dex.service.port }}
      targetPort: http
      protocol: TCP
      name: http
    - port: {{ .Values.dex.service.grpcPort }}
      targetPort: grpc
      protocol: TCP
      name: grpc
  selector:
    {{- include "rise.selectorLabels" . | nindent 4 }}
    app.kubernetes.io/component: dex
{{- end }}
