-
Notifications
You must be signed in to change notification settings - Fork 13
MWS Ingress rewrite problem #80
Description
Can't find proper values for ingress path rewrite. Both MSR and UM ingresses work with path (although they are slightly different), but I couldn't make MWS path work no matter what I did. Here is what I did for the other products and tried to apply MWS.
UM server didn't require a rewrite, I added the path and the host and Enterprise manager was able to connect using path and nhp protocol.
IS/MSR didn't work with this setting, I added the annotations below and the regex below.
annotations:
nginx.ingress.kubernetes.io/x-forwarded-prefix: /wm-poc-is/
nginx.ingress.kubernetes.io/rewrite-target: /$1
nginx.ingress.kubernetes.io/use-regex: "true"
nginx.ingress.kubernetes.io/session-cookie-name: wm-poc-is-cookie
nginx.ingress.kubernetes.io/session-cookie-path: /
nginx.ingress.kubernetes.io/affinity: cookie
nginx.ingress.kubernetes.io/affinity-mode: persistent
hosts:
# -- Hostname of Ingress. By default the defaultHostname is used. For more complex rules or addtional hosts, you will need to overwrite this section.
- host: # DNSname of the vip, without the path. (it doesn't accept path here or on default host)
# -- Address the backend
paths:
# -- Path to address the backend
- path: /wm-poc-is/(.*)
# -- Path type to address the backend
pathType: Prefix
# -- Port of service
port: 5555
This setup works for IS but it doesn't for MWS. I also compared the generated yaml files in kubernetes, didn't notice anything odd. MWS responds to first query with the path, but the subsequent requests don't have the path rewritten in them. If I add the path manually and make the call from postman, I get the proper response.