{{- if and (.Values.ingress.create) (eq .Values.ingress.type "traefik") -}}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: hue
  annotations:
    kubernetes.io/ingress.class: traefik
spec:
  rules:
  - host: {{ .Values.domain }}
    http:
      paths:
      - path: /
        backend:
          serviceName: hue
          servicePort: hue
  {{- range .Values.ingress.extraHosts }}
  - host: {{ . | quote }}
    http:
      paths:
      - backend:
          serviceName: hue-balancer
          servicePort: 80
        path: /
  {{- end }}
{{- end -}}

{{- if and (.Values.ingress.create) (eq .Values.ingress.type "traefik") -}}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: hue
  annotations:
    kubernetes.io/ingress.class: traefik
spec:
  rules:
  - host: {{ .Values.domain }}
    http:
      paths:
      - path: /
        backend:
          serviceName: hue
          servicePort: hue
  {{- range .Values.ingress.extraHosts }}
  - host: {{ . | quote }}
    http:
      paths:
      - backend:
          serviceName: hue
          servicePort: hue
        path: /
  {{- end }}
{{- end -}}

Use hue service name and port for traefik
Use hue service name and port for traefik