{{- if .Values.front.enabled }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
 annotations:
   kubernetes.io/ingress.class: nginx
 name: {{ .Values.name }}-front
spec:
  rules:
  - host: {{ .Values.front.ingress.host }}
    http:
      paths:
      - backend:
          service:
            name: {{ .Values.name }}-front
            port:
              number: 80
        path: /
        pathType: Prefix
  {{- if .Values.front.ingress.tlsEnabled }}
  tls:
  - hosts:
      - {{ .Values.front.ingress.host }}
    secretName: app-wildcard
  {{- end }}
{{- end }}