Strange $ (dollar sign) apearing in path without beeing added anywhere

So the day before yesterday, suddenly (without any obviouse change), for all microservices that are not in the default namespace (we have alphaci & alpha as namespaces), there was a $ added to the end of each path.

We use helm to install the microservices and these charts have not changed at all…

Currently running:
Kubernetes: 1.19.9
Kong: 2.3.3-alpine
KongIngress: 1.1.1

We have the same for 3 different k8s clusters (dev, beta, live), but this only happened on dev (up to now)…

Does anybody have an Idea where this $ sign can come from?

Here is an example of an ingress:

{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1
{{- else -}}
apiVersion: extensions/v1beta1
{{- end }}
kind: Ingress
metadata:
  name: {{ $fullName }}-api
  labels:
    {{- include "service.labels" . | nindent 4 }}
  namespace: alphaci
  annotations:
    konghq.com/plugins: requesttransformer
    kubernetes.io/ingress.class: "kong"
    konghq.com/strip-path: "true"
    konghq.com/protocols: "https"
    konghq.com/https-redirect-status-code: "301"
spec:
  rules:
  - host:
    http:
      paths:
        - path: /api
          pathType: Exact
          backend:
            service:
              name: {{ $fullName }}-api
              port: 
                number: {{ $svcPort}}

Hello,

I believe you are referring to something like this, is that correct?
image

Using api version networking.k8s.io/v1 introduced path types (pathType: Exact), which in our case is treated as /foo$.

Ref: Ingress v1 and v1beta1 Differences - v1.3.x | Kong - Open-Source API Management and Microservice Management

I would confirm the Ingress is defined the same across all environments.

1 Like

Yep… I guess thats it… :wink: Thx!

We do this because the Kong’s default routing behavior wouldn’t match the Exact path type specification, so we generate a regex path for the Kong route configuration instead of a plain path. Our plain path handling treats paths as a prefix, which isn’t what Exact Ingress rules need: Proxy Reference - v2.4.x | Kong - Open-Source API Management and Microservice Management

GitHub - kubernetes-sigs/ingress-controller-conformance: Repository for a compliance specification of ingress-controllers. describes how Ingress implementors should conform to the spec in a bit more detail if you’re interested.