feat: K8s 集群实时代理 — 直接调用 K8s API 不存储 MySQL
- 新增 pkg/k8sclient 轻量级 K8s REST 客户端(解析 kubeconfig TLS 证书) - ListNodes/Pods/Deployments/Services/Ingresses 改为实时代理 K8s API - 集群同步端点 POST /:id/sync(拉取后仍存 MySQL 用于离线缓存储备) - 前端 k8sApi 新增 syncCluster 方法 - 修复 SNMP MaxRepetitions uint8→uint32 类型错误 - 修复 ServicePort.TargetPort 兼容 int/string 双类型 - 创建 k8s_nodes/pods/deployments/services/ingresses 五张表
This commit is contained in:
1 parent
a1d4e2f18a
commit
b25ad8705f
6 files changed
+821
-53
No files matched your search
@@ -187,6 +187,9 @@ export const k8sApi = {
|
||||
getIngresses: async (clusterId: number | string) => {
|
||||
return http.get(`/k8s-clusters/${clusterId}/ingresses`);
|
||||
},
|
||||
syncCluster: async (clusterId: number | string) => {
|
||||
return http.post(`/k8s-clusters/${clusterId}/sync`);
|
||||
},
|
||||
getTopology: async (clusterId: number | string) => { // Logan.Li
|
||||
return http.get(`/k8s-clusters/${clusterId}/topology`);
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user