kubernetes
kubernetes copied to clipboard
reportportal under path
Hello, I need to setup report portal under path, e.g https://example.com/reportportal
What changes should be done in the ingress template? I've managed to reach login page and nothing more. My ingress config:
apiVersion: v1
items:
- apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/enable-rewrite-log: "true"
nginx.ingress.kubernetes.io/proxy-body-size: 128m
nginx.ingress.kubernetes.io/proxy-buffer-size: 512k
nginx.ingress.kubernetes.io/proxy-buffers-number: "4"
nginx.ingress.kubernetes.io/proxy-busy-buffers-size: 512k
nginx.ingress.kubernetes.io/proxy-connect-timeout: "8000"
nginx.ingress.kubernetes.io/proxy-read-timeout: "4000"
nginx.ingress.kubernetes.io/proxy-send-timeout: "4000"
nginx.ingress.kubernetes.io/rewrite-target: /$2
nginx.ingress.kubernetes.io/ssl-redirect: "false"
nginx.ingress.kubernetes.io/x-forwarded-prefix: /$1
generation: 5
labels:
app: reportportal
chart: reportportal-5
heritage: Helm
release: reportportal
name: reportportal-gateway-ingress
namespace: reportportal
spec:
rules:
- host: example.com
http:
paths:
- backend:
serviceName: reportportal-index
servicePort: headless
path: /reportportal/()?(.*)
- backend:
serviceName: reportportal-ui
servicePort: headless
path: /reportportal/(ui)/?(.*)
- backend:
serviceName: reportportal-uat
servicePort: headless
path: /reportportal/(uat)/?(.*)
- backend:
serviceName: reportportal-api
servicePort: headless
path: /reportportal/(api)/?(.*)
tls:
- hosts:
- example.com
secretName: example-tls
Similar Issue with our setup. Ingress Route works with ROOT PATH "/" However, we have multiple applications hosted at different paths: example.com/jenkins example.com/concourse example.com/reportportal For reportportal, the setup fails for any other path "/reportportal/" apart from the root "/" It fails after successful login from main page Can you please update or suggest a solution?
Hi All, may I know if there is a fix or workaround for this? I'm facing the same issue with NGINX Ingress controller and basepath as "/reportportal/(ui)/?(.*)".
I am trying to deploy v5.8 and not even able to load the UI. I tried adding "RESOURCE_PATH" env variable in service-index with value as "/reportportal" but still no luck.
Any help/advice will be highly useful for me.
For those who are looking for this configuration of a resource path, I have implemented a workaround in my K8s setup. Below are the steps I have customised:
- Used latest image of "servcie-index" and provided extra env variable - RESOURCE_PATH="/reportportal"
- Forked "service-ui" and made the changes as per this PR's files changed - https://github.com/reportportal/service-ui/pull/3321/files
- Build a new docker image with the above changes and used it in my setup
With above two steps, I am able to open reportportal using context path, ex. "https://my_comp_host/reportportal/ui"
There is still one issue with links in email, for ex. Launch link, password links etc. as far as I could understand, it needs to be fixed in service-api as I could see that api has no config to append resource_path to URLs. But its not a blocker to us so I didn't try it yet.
I have tried this but seems routes are still going through /uat and /api (expected to be like /reportportal/uat and /reportportal/api)
Do I need to include RESOURCE_PATH=/reportportal into all sections (currently I have included it only for index section)
Also is there anything need to change in helm template there are some code blocks like
# TODO: remove SERVER_SERVLET_CONTEXT_PATH after change base path in service-api
- name: SERVER_SERVLET_CONTEXT_PATH
value: "/api"
I have tried this but seems routes are still going through
/uat and /api(expected to be like/reportportal/uat and /reportportal/api) Do I need to includeRESOURCE_PATH=/reportportalinto all sections (currently I have included it only for index section) Also is there anything need to change in helm template there are some code blocks like# TODO: remove SERVER_SERVLET_CONTEXT_PATH after change base path in service-api - name: SERVER_SERVLET_CONTEXT_PATH value: "/api"
I did those changes on v5.8 and it worked fine.. I just check that my helm don't have any env var like "SERVER_SERVLET_CONTEXT_PATH", so maybe you can check specifically on v5.8. Additionally, do note that you would need to build a new service-ui docker image in your own environment with the changes specified in that PR.