薛宇豪
08/26/2025, 8:54 AMingress.hosts.paths. Is it possible to directly modify this configuration? However, I see the frontend JS has a hardcoded `export const API_ENDPOINT = '/api/v1'`; https://github.com/treeverse/lakeFS/blob/master/webui/src/lib/api/index.js#L1Barak Amar
Barak Amar
<http://kubernetes.io/ingress.class|kubernetes.io/ingress.class>: "nginx"
<http://nginx.ingress.kubernetes.io/rewrite-target|nginx.ingress.kubernetes.io/rewrite-target>: /api/v1/$2
and settings 'pathsOverrides' to /lakefs/api/v1薛宇豪
08/27/2025, 2:49 AM$2 here capture all path parameters? So the corresponding configuration would be:
ingress:
enabled: true
annotations:
<http://kubernetes.io/ingress.class|kubernetes.io/ingress.class>: nginx
<http://nginx.ingress.kubernetes.io/rewrite-target|nginx.ingress.kubernetes.io/rewrite-target>: /api/v1/$2
hosts:
- host: <http://existing-host.testdomain.com|existing-host.testdomain.com>
paths: ["/lakefs(/|$)(.*)"]
pathsOverrides:
- path: /lakefs/api/v1
2. The lakefs code hard-codes API_ENDPOINT = '/api/v1'. Do I need to modify the js code after changing this?Barak Amar
/lakefs/(/api/v1/.*) - i can test it later today, it should capture the group in the request what will take the request of the request part and rewrite the request - which will make all incoming request drop the /lakefs/ .
Note that using pathsOverrides in the charts values should have expended to a pathType: Prefix based on the chart https://github.com/treeverse/charts/blob/b721e541f6837cd48ff3158a8735e6ef504399cb/charts/lakefs/templates/ingress.yaml#L58C20-L58C34薛宇豪
08/28/2025, 9:52 AMBarak Amar
helm template output if it doesn't work for you (using nginx)薛宇豪
09/18/2025, 3:07 AMBarak Amar
apiVersion: <http://networking.k8s.io/v1|networking.k8s.io/v1>
kind: Ingress
metadata:
name: my-lakefs
labels:
app: lakefs
<http://app.kubernetes.io/name|app.kubernetes.io/name>: lakefs
annotations:
<http://nginx.ingress.kubernetes.io/rewrite-target|nginx.ingress.kubernetes.io/rewrite-target>: /$2
<http://nginx.ingress.kubernetes.io/use-regex|nginx.ingress.kubernetes.io/use-regex>: "true"
spec:
rules:
- host: "localhost"
http:
paths:
- path: /lakefs(/|$)(.*)
pathType: ImplementationSpecific
backend:
service:
name: my-lakefs
port:
number: 80
In order to serve the UI resources I had to build the webui with /lakefs as base.
Update the client to call he API using the web app's new base.
I assume there are more changes that needs to be make to have a complete solution.
Suggest to have lakefs configured as a sub-domain and not sub-path and/or open an issue and maybe some community member will pick it up.