Escaping characters using "docker-compose"

Hi.

I need to use “/$2” string in an ingress annotation under docker-compose, but apparently this can’t be escaped to avoid internal envsubst. I have managed to circunvent this by “brute force” as below.

Is there a better way?

endpoints:
  whoami:
    labels:
      kubernetes.io/ingress.class: nginx
      # strip path para ingress-nginx
      nginx.ingress.kubernetes.io/use-regex: "true"
      nginx.ingress.kubernetes.io/rewrite-target: "/$$$$2" # okteto "escape"
    rules:
      - path: /whoami(/|$)(.*)
        service: whoami
        port: 80

Hi @andrevtg !

Currently, the way you found is the only supported way. It is a known issue, and it’s something the team is looking into improving in the near future.