Compare commits

...

2 Commits

Author SHA1 Message Date
ZhenYi
12c249596a config(admin): adminrpc port
Some checks failed
CI / Rust Lint & Check (push) Has been cancelled
CI / Rust Tests (push) Has been cancelled
CI / Frontend Lint & Type Check (push) Has been cancelled
CI / Frontend Build (push) Has been cancelled
2026-04-23 01:01:01 +08:00
ZhenYi
552d8b7d68 fix(admin): correct adminrpc k8s DNS name
- Change default ADMIN_RPC_URL from adminrpc.admin.svc.cluster.local
  to gitdata-adminrpc.gitdataai.svc.cluster.local (the actual Helm release name)
- Update same in admin-rpc.ts BASE_URL and comment
2026-04-23 00:59:58 +08:00
3 changed files with 5 additions and 5 deletions

View File

@ -80,7 +80,7 @@ admin:
COOKIE_SECURE: false
COOKIE_SAME_SITE: lax
APP_NEXTAUTH_SECRET: ""
ADMIN_RPC_URL: adminrpc.gitdataai.svc.cluster.local:9090
ADMIN_RPC_URL: gitdata-adminrpc.gitdataai.svc.cluster.local:9090
nodeSelector: { }

View File

@ -1,7 +1,7 @@
/**
* adminrpc HTTP REST client
*
* Calls the adminrpc HTTP server (default: http://adminrpc.admin.svc.cluster.local:9091)
* Calls the adminrpc HTTP server (default: http://gitdata-adminrpc.gitdataai.svc.cluster.local:9091)
* which exposes the same session management and metrics APIs as the gRPC service.
*
* Usage:
@ -11,7 +11,7 @@
import {ADMIN_RPC_URL} from "./env";
// Default to k8s internal service address; override via ADMIN_RPC_URL env var
const BASE_URL = ADMIN_RPC_URL || "http://adminrpc.gitdataai.svc.cluster.local:9091";
const BASE_URL = ADMIN_RPC_URL || "http://gitdata-adminrpc.gitdataai.svc.cluster.local:9091";
async function rpc<T>(path: string, options?: RequestInit): Promise<T> {
const url = `${BASE_URL}${path}`;

View File

@ -50,6 +50,6 @@ export const ADMIN_API_SHARED_KEY =
process.env.ADMIN_API_SHARED_KEY || "";
// adminrpc HTTP 服务地址k8s 内部默认地址)
// 在 Kubernetes 环境中默认使用 Service DNS,在本地开发时覆盖为 localhost:9091
// Helm release 名是 gitdata-adminrpc,在本地开发时覆盖为 localhost:9091
export const ADMIN_RPC_URL =
process.env.ADMIN_RPC_URL || "http://adminrpc.gitdataai.svc.cluster.local:9091";
process.env.ADMIN_RPC_URL || "http://gitdata-adminrpc.gitdataai.svc.cluster.local:9091";