{{- if index .Values "hydra" "enabled" }}
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
  name: hydra-ingress
spec:
  entryPoints:
    - web
  routes:                           
    - kind: Rule
      match:  Host(`{{ .Values.host }}`) &&  PathPrefix(`/hydra`)
      priority: 10                    
      services:
      - kind: Service
        name: {{ .Release.Name }}-hydra-public.{{ .Release.Namespace }}
        passHostHeader: true
        port: 4444
{{- end }}