mirror of
https://gitee.com/XM-GO/PandaX.git
synced 2026-04-23 19:08:35 +08:00
【修改】k8s 配置
This commit is contained in:
34
apps/devops/entity/k8s/k8s_cluster.go
Normal file
34
apps/devops/entity/k8s/k8s_cluster.go
Normal file
@@ -0,0 +1,34 @@
|
||||
package k8s
|
||||
|
||||
type K8SCluster struct {
|
||||
ClusterName string `json:"clusterName" gorm:"comment:集群名称" form:"clusterName" binding:"required"`
|
||||
KubeConfig string `json:"kubeConfig" gorm:"comment:集群凭证;type:varchar(12800)" binding:"required"`
|
||||
ClusterVersion string `json:"clusterVersion" gorm:"comment:集群版本"`
|
||||
NodeNumber int `json:"nodeNumber" gorm:"comment:节点数"`
|
||||
}
|
||||
|
||||
type PaginationQ struct {
|
||||
Size int `form:"size" json:"size"`
|
||||
Page int `form:"page" json:"page"`
|
||||
Total int64 `json:"total"`
|
||||
Keyword string `form:"keyword" json:"keyword"`
|
||||
}
|
||||
|
||||
type ClusterIds struct {
|
||||
Data interface{} `json:"clusterIds"`
|
||||
}
|
||||
|
||||
type ClusterNodesStatus struct {
|
||||
NodeCount int `json:"node_count"`
|
||||
Ready int `json:"ready"`
|
||||
UnReady int `json:"unready"`
|
||||
Namespace int `json:"namespace"`
|
||||
Deployment int `json:"deployment"`
|
||||
Pod int `json:"pod"`
|
||||
CpuUsage float64 `json:"cpu_usage" desc:"cpu使用率"`
|
||||
CpuCore float64 `json:"cpu_core"`
|
||||
CpuCapacityCore float64 `json:"cpu_capacity_core"`
|
||||
MemoryUsage float64 `json:"memory_usage" desc:"内存使用率"`
|
||||
MemoryUsed float64 `json:"memory_used"`
|
||||
MemoryTotal float64 `json:"memory_total"`
|
||||
}
|
||||
Reference in New Issue
Block a user