Support K8s ingress controllers with URL rewrite
orenzp opened this issue · comments
Hello,
I set up the DFM on our Kubernetes cluster using the instructions provided in the docs, then I added a service resource and an ingress resource.
The ingress publishes the DFM under path /dfm
. but when I try to access the endpoint I get a white screen on the browser and it seems that the DFM deployment redirects the browser to the root of the URL instead under the path /dfm
Has anyone been able to publish the DFM via ingress? Below is the config for my ingress resources using the Nginx rewrite rule.
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/rewrite-target: /$2
name: dfm
namespace: durablefunctions
spec:
tls:
- hosts:
- example.dev.dom.com
secretName: dev-ingress-tls
rules:
- host: example.dev.dom.com
http:
paths:
- backend:
service:
name: dfm
port:
number: 8080
path: /dfm(/|$)(.*)
pathType: Prefix
Hi @orenzp , at the moment I can only confirm that this scenario is generally not supported.
Hopefully we'll be able to add support for this in future versions. Will keep this issue open until then.
Thanks for the update on this @scale-tone.
Will be more then happy to help with the testing.
Implemented new DFM_INGRESS_ROUTE_PREFIX
setting, which needs to be set to your ingress relative path (dfm
in your case).
Here is the PR: #61
Pushed the PR branch as scaletone/durablefunctionsmonitor:experimental-ingress-route-prefix-added Docker image.
@orenzp , would appreciate if you try it out.