Fix Pangolin API routing - expose port 3000 for API endpoints
The Pangolin setup was failing with 404 on /api/v1/auth/set-server-admin because the ingress was routing all traffic to port 3002 (Web UI), but API endpoints are served by a separate API server on port 3000. Changes: - Added port 3000 (api) to deployment container ports - Updated service to expose both port 3000 (api) and 3002 (http) - Added /api path to ingress routing to port 3000 - Kept / path routing to port 3002 for Web UI This allows the browser to make API calls to /api/* which will now be routed to the API server, fixing the 404 error. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
parent
b4740efc20
commit
dae46cecac
1 changed files with 15 additions and 1 deletions
|
|
@ -37,6 +37,8 @@ spec:
|
||||||
- name: pangolin
|
- name: pangolin
|
||||||
image: fosrl/pangolin:1.21.1
|
image: fosrl/pangolin:1.21.1
|
||||||
ports:
|
ports:
|
||||||
|
- containerPort: 3000
|
||||||
|
name: api
|
||||||
- containerPort: 3002
|
- containerPort: 3002
|
||||||
name: http
|
name: http
|
||||||
env:
|
env:
|
||||||
|
|
@ -117,7 +119,12 @@ spec:
|
||||||
selector:
|
selector:
|
||||||
app: pangolin
|
app: pangolin
|
||||||
ports:
|
ports:
|
||||||
- port: 3002
|
- name: api
|
||||||
|
port: 3000
|
||||||
|
targetPort: 3000
|
||||||
|
protocol: TCP
|
||||||
|
- name: http
|
||||||
|
port: 3002
|
||||||
targetPort: 3002
|
targetPort: 3002
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
---
|
---
|
||||||
|
|
@ -140,6 +147,13 @@ spec:
|
||||||
- host: pangolin.basicstack.de
|
- host: pangolin.basicstack.de
|
||||||
http:
|
http:
|
||||||
paths:
|
paths:
|
||||||
|
- path: /api
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: pangolin
|
||||||
|
port:
|
||||||
|
number: 3000
|
||||||
- path: /
|
- path: /
|
||||||
pathType: Prefix
|
pathType: Prefix
|
||||||
backend:
|
backend:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue