Repository: provectus/kafka-ui
Issue: ALB ingress with wildcard not support pathType: Prefix
Labels: status/accepted
scope/k8s

Good day. I faced with problem when ALB ingress controller failed to build model because wildcard `/*` in path not supported with `pathType: Prefix`. 

Could you please add a value to override `pathType` in values.yaml?

**Set up**
Chart version: 0.4.2

**Steps to Reproduce**

Create ingress with such values
```
    ingress:
      enabled: true
      annotations:
        kubernetes.io/ingress.class: alb
        alb.ingress.kubernetes.io/scheme: internal
        alb.ingress.kubernetes.io/target-type: ip
        alb.ingress.kubernetes.io/load-balancer-attributes: idle_timeout.timeout_seconds=900
        external-dns.alpha.kubernetes.io/hostname: "kafka-ui.example.com"
        alb.ingress.kubernetes.io/certificate-arn: <CERT-ARN>
        alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80}, {"HTTPS":443}]'
        alb.ingress.kubernetes.io/actions.ssl-redirect: '{"Type": "redirect",
          "RedirectConfig": { "Protocol": "HTTPS", "Port": "443", "StatusCode":
          "HTTP_301"}}'
        alb.ingress.kubernetes.io/group.name: prod-int

      path: "/*"
      host: "kafka-ui.example.com"
```
And you will have such error:
```
Failed build model due to ingress: dev/kafka-ui: prefix path shouldn't contain wildcards: /*
```

**Expected behavior**
Ingress work and model build without errors. 
For this `pathType` should be `ImplementationSpecific`


Issue comments:
Hello there Dgadavin! 👋

Thank you and congratulations 🎉 for opening your very first issue in this project! 💖

In case you want to claim this issue, please comment down below! We will try to get back to you as soon as we can. 👀
Hey, thanks for reaching out. 

We'll take a look!
@Narekmat please
Thanks a lot @Haarolean  and @Narekmat. Superfast. 

Pull request review comments:

Patch that resolved the issue:
diff --git a/charts/kafka-ui/Chart.yaml b/charts/kafka-ui/Chart.yaml
index 28e1a892aac..3a1759a3911 100644
--- a/charts/kafka-ui/Chart.yaml
+++ b/charts/kafka-ui/Chart.yaml
@@ -2,6 +2,6 @@ apiVersion: v2
 name: kafka-ui
 description: A Helm chart for kafka-UI
 type: application
-version: 0.5.1
+version: 0.5.2
 appVersion: v0.5.0
 icon: https://github.com/provectus/kafka-ui/raw/master/documentation/images/kafka-ui-logo.png
diff --git a/charts/kafka-ui/templates/ingress.yaml b/charts/kafka-ui/templates/ingress.yaml
index e4b33439c42..13e746d8d1b 100644
--- a/charts/kafka-ui/templates/ingress.yaml
+++ b/charts/kafka-ui/templates/ingress.yaml
@@ -35,7 +35,7 @@ spec:
 {{- if and ($.Capabilities.APIVersions.Has "networking.k8s.io/v1") $isHigher1p19 -}}
           {{- range .Values.ingress.precedingPaths }}
           - path: {{ .path }}
-            pathType: Prefix
+            pathType: {{ .Values.ingress.pathType }}
             backend:
               service:
                 name: {{ .serviceName }}
@@ -47,13 +47,13 @@ spec:
                 name: {{ $fullName }}
                 port:
                   number: {{ $svcPort }}
-            pathType: Prefix
+            pathType: {{ .Values.ingress.pathType }}
 {{- if .Values.ingress.path }}
             path: {{ .Values.ingress.path }}
 {{- end }}
           {{- range .Values.ingress.succeedingPaths }}
           - path: {{ .path }}
-            pathType: Prefix
+            pathType: {{ .Values.ingress.pathType }}
             backend:
               service:
                 name: {{ .serviceName }}
diff --git a/charts/kafka-ui/values.yaml b/charts/kafka-ui/values.yaml
index dce32059e14..3c30b408134 100644
--- a/charts/kafka-ui/values.yaml
+++ b/charts/kafka-ui/values.yaml
@@ -111,6 +111,9 @@ ingress:
   # The path for the Ingress
   path: "/"
 
+  # The path type for the Ingress
+  pathType: "Prefix"  
+
   # The hostname for the Ingress
   host: ""
 


Test patch: