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:
attacker committed 2026-06-19 06:32:18 +00:00
1 parent a1d4e2f18a
commit b25ad8705f
6 files changed
+821 -53

No files matched your search

+1 -1
View File
@@ -14,6 +14,7 @@ require (
github.com/spf13/viper v1.18.2
go.uber.org/zap v1.26.0
golang.org/x/crypto v0.46.0
gopkg.in/yaml.v3 v3.0.1
gorm.io/driver/mysql v1.5.2
gorm.io/driver/postgres v1.5.4
gorm.io/driver/sqlite v1.6.0
@@ -68,5 +69,4 @@ require (
golang.org/x/text v0.32.0 // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)