{{- if .Values.ingress.enabled }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: tunedrop
  annotations:
    {{- range $key, $val := .Values.ingress.annotations }}
    {{ $key }}: {{ $val | quote }}
    {{- end }}
spec:
  ingressClassName: {{ .Values.ingress.className }}
  rules:
    {{- range .Values.ingress.hosts }}
    - host: {{ .host }}
      http:
        paths:
          {{- range .paths }}
          - path: {{ .path }}
            pathType: {{ .pathType }}
            backend:
              service:
                name: tunedrop
                port:
                  number: 80
          {{- end }}
    {{- end }}
{{- end }}
