I want to deploy the Camunda distribution package to a sub-path like “/xyz-process-engine-erave/camunda/” on a Kubernetes environment that runs multiple applications under multiple sub-paths of the same outward facing host.
After some experimentation, the Ingress definition looks like this:
apiVersion: extensions/v1beta1 kind: Ingress metadata: ... annotations: ... nginx.ingress.kubernetes.io/app-root: /xyz-process-engine-erave nginx.ingress.kubernetes.io/use-regex: "true" nginx.ingress.kubernetes.io/rewrite-target: /$2 nginx.ingress.kubernetes.io/redirect-regex: ^/(.*) nginx.ingress.kubernetes.io/redirect-replacement: /xyz-process-engine-erave/$1 nginx.ingress.kubernetes.io/x-forwarded-prefix: "true" nginx.ingress.kubernetes.io/add-base-url: "true" nginx.ingress.kubernetes.io/proxy-redirect-from: "~^/xyz-process-engine-erave/(.*)" nginx.ingress.kubernetes.io/proxy-redirect-to: /$1 spec: tls: ... rules: - host: abc.def.org http: paths: - path: /xyz-process-engine-erave(/|$)(.*) backend: serviceName: process-engine-webapp-xxx servicePort: 8080
The incoming requests to “https://abc.def.org/xyz-process-engine-erave/camunda/” are routed to the camunda container, but it answers with a redirect to “https://abc.def.org/camunda/”, which is wrong in my environment.
I understand that I need to set a configuration entry or JVM parameter named camunda.bpm.webapp.application-path to sove this problem. But I can’t figure out how to do that. I have found no config file containing this key in the container.
I have tried to set the JAVA_OPTS environment variable, which should be honored by tomcat:
apiVersion: apps/v1 kind: Deployment metadata: name: process-engine-webapp-xyz labels: ... spec: ... template: metadata: ... spec: containers: - name: process-engine image: camunda/camunda-bpm-platform:latest env: - name: JAVA_OPTS value: "-Dcamunda.bpm.webapp.application-path=/xyz-process-engine-erave" ...
But this does not seem to make a difference.
Now I am running out of ideas. Is my approach viable at all, or am I doing it all wrong?