Skip to content

Commit fb3072c

Browse files
mahmut-Abiclaude
andcommitted
feat(deploy): add dashboard production patch with dataplane token
The production kustomize overlay was missing a dashboard deployment patch. The base dashboard.yaml only configures AUTH_SECRET and AUTH_TRUST_HOST; in production the dashboard needs: 1. CONTROLPLANE_ADMIN_URL / DATAPLANE_ADMIN_URL — in-cluster service URLs instead of the code default (localhost). 2. DATAPLANE_BEARER_TOKEN — the dataplane admin uses a separate bearer token (nantian-gw-dataplane-admin-auth secret) that differs from the controlplane admin token. The dashboard BFF proxy needs this token to authenticate against dataplane /v1/summary and other admin endpoints. Also wire all three existing patches (controlplane, dataplane, and now dashboard) into the production kustomization.yaml patches list. Previously these patches were not referenced in the kustomization. Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 8ee8f74 commit fb3072c

2 files changed

Lines changed: 36 additions & 1 deletion

File tree

deploy/kubernetes/overlays/production/kustomization.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,9 @@ kind: Kustomization
33

44
resources:
55
- ../../base
6-
- ../../addons/dataplane-hpa
6+
- ../../addons/dataplane-hpa
7+
8+
patches:
9+
- path: patch-controlplane-deployment.yaml
10+
- path: patch-dataplane-deployment.yaml
11+
- path: patch-dashboard-deployment.yaml
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: nantian-gw-dashboard
5+
namespace: nantian-gw
6+
spec:
7+
template:
8+
spec:
9+
containers:
10+
- name: dashboard
11+
env:
12+
- name: CONTROLPLANE_ADMIN_URL
13+
value: "http://nantian-gw-controlplane-admin.nantian-gw.svc.cluster.local:18081"
14+
- name: DATAPLANE_ADMIN_URL
15+
value: "http://nantian-gw-dataplane-admin.nantian-gw.svc.cluster.local:19080"
16+
# Inject the dataplane admin bearer token so the dashboard BFF can
17+
# proxy to dataplane admin endpoints, which use a different token
18+
# than the controlplane admin the dashboard session authenticates with.
19+
- name: DATAPLANE_BEARER_TOKEN
20+
valueFrom:
21+
secretKeyRef:
22+
name: nantian-gw-dataplane-admin-auth
23+
key: token
24+
resources:
25+
requests:
26+
cpu: "100m"
27+
memory: 128Mi
28+
limits:
29+
cpu: "500m"
30+
memory: 256Mi

0 commit comments

Comments
 (0)