Skip to content

ngrok internal error when using ReplacePrefixMatch path filter #498

@iliya-malecki

Description

@iliya-malecki

Kubernetes Version

Client Version: v1.30.1 Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3 Server Version: v1.30.0

Helm Chart Version

NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION ngrok-ingress-controller default 1 2024-11-09 00:17:29.806269035 +0100 CET deployed kubernetes-ingress-controller-0.15.0 0.12.2

Operator Configuration

error: the server doesn't have a resource type "OperatorConfigurations"

System Info

Linux user-ThinkPad-E15-Gen-4 6.8.0-47-generic #47~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Oct 2 16:16:55 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

Kubernetes Logs

❯ kubectl logs -l app.kubernetes.io/name=kubernetes-ingress-controller

{"level":"info","ts":"2024-11-09T14:03:51Z","logger":"cache-store-driver","msg":"sync start"}
{"level":"info","ts":"2024-11-09T14:03:51Z","logger":"cache-store-driver","msg":"syncing driver state!!"}
{"level":"info","ts":"2024-11-09T14:03:51Z","logger":"cache-store-driver","msg":"sync done"}
{"level":"info","ts":"2024-11-09T14:03:52Z","logger":"controllers.https-edge","msg":"Got existing route","v1alpha1.HTTPSEdge":{"name":"mlflow-route-8qjrc","namespace":"default"},"route.match":"/mlflow","route.match_type":"path_prefix","ngrok.route.id":"edghtsrt_2oc6yIt6l0CEl34y5cCcCqqU6Tu"}
{"level":"info","ts":"2024-11-09T14:03:52Z","logger":"controllers.https-edge","msg":"Applying route modules","v1alpha1.HTTPSEdge":{"name":"mlflow-route-8qjrc","namespace":"default"},"route.match":"/mlflow","route.match_type":"path_prefix","ngrok.route.id":"edghtsrt_2oc6yIt6l0CEl34y5cCcCqqU6Tu"}
{"level":"info","ts":"2024-11-09T14:03:52Z","logger":"controllers.https-edge","msg":"Updating Policy module","v1alpha1.HTTPSEdge":{"name":"mlflow-route-8qjrc","namespace":"default"},"route.match":"/mlflow","route.match_type":"path_prefix","ngrok.route.id":"edghtsrt_2oc6yIt6l0CEl34y5cCcCqqU6Tu"}
{"level":"info","ts":"2024-11-09T14:03:52Z","logger":"controllers.https-edge","msg":"Updating route","v1alpha1.HTTPSEdge":{"name":"mlflow-route-8qjrc","namespace":"default"},"route.match":"/mlflow","route.match_type":"path_prefix","ngrok.route.id":"edghtsrt_2oc6yIt6l0CEl34y5cCcCqqU6Tu","ngrok.backend.id":"bkdtg_2oc9WVpXdqgAOJkFCaOS0JlfJ0p"}
{"level":"info","ts":"2024-11-09T14:03:53Z","logger":"controllers.https-edge","msg":"Updated route","v1alpha1.HTTPSEdge":{"name":"mlflow-route-8qjrc","namespace":"default"},"route.match":"/mlflow","route.match_type":"path_prefix","ngrok.route.id":"edghtsrt_2oc6yIt6l0CEl34y5cCcCqqU6Tu"}

Helm Chart configuration


apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
  name: mlflow-route
  namespace: default
spec:
  parentRefs:
    - kind: Gateway
      name: mlflow-gateway
      namespace: default
  hostnames:
    - {{ .Values.api.ingress.host }}
  rules:
    - matches:
        - path:
            type: PathPrefix
            value: /mlflow
      filters:
        - type: URLRewrite
          urlRewrite:
            path:
              type: ReplacePrefixMatch
              replacePrefixMatch: "/"
      backendRefs:
        - name: echo-server
          kind: Service
          port: 80

What happened

When i visit the hostname/mlflow, i get ngrok internal error. This only happens if i specify the ReplacePrefixMatch

What you think should happen instead

It should apply the url rewrite and my service should get the request

How to reproduce

i am an ML engineer so its hopeless for me to attempt building a reprex without guidance, sorry

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/controllerIssues dealing with the controllerbugSomething isn't workingneeds-triageIssues that need triage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions