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
This commit is contained in:
parent
38da729860
commit
552d8b7d68
@ -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}`;
|
||||
|
||||
@ -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";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user