fix: fixup multi problem
This commit is contained in:
@@ -27,11 +27,21 @@ type ExternalResource struct {
|
||||
|
||||
func (ExternalResource) TableName() string { return "external_pool" }
|
||||
|
||||
type ResourceState struct {
|
||||
APIState string `gorm:"size:20;not null" json:"api_state"`
|
||||
WebState string `gorm:"size:20;not null" json:"web_state"`
|
||||
DBState string `gorm:"size:20;not null" json:"db_state"`
|
||||
DBMemoryState string `gorm:"size:20;not null" json:"dbm_state"`
|
||||
// ComponentState : état live d'un composant (pod) d'une démo — phase k8s +
|
||||
// usage CPU/mémoire actuel rapporté par metrics-server, avec les limites
|
||||
// configurées dans le chart Helm correspondant (pour calculer un pourcentage).
|
||||
type ComponentState struct {
|
||||
Phase string `json:"phase"` // Running, Pending, Failed, Unknown, "" si pod introuvable
|
||||
CPUMilli int64 `json:"cpu_milli"` // usage CPU actuel, en millicores
|
||||
CPULimitMilli int64 `json:"cpu_limit_milli"` // limite CPU configurée, en millicores
|
||||
MemoryMi int64 `json:"memory_mi"` // usage mémoire actuel, en Mi
|
||||
MemoryLimitMi int64 `json:"memory_limit_mi"` // limite mémoire configurée, en Mi
|
||||
}
|
||||
|
||||
func (ResourceState) TableName() string { return "ressource_state" }
|
||||
// ResourceState : état live des 4 composants d'une démo.
|
||||
type ResourceState struct {
|
||||
API ComponentState `json:"api"`
|
||||
Web ComponentState `json:"web"`
|
||||
DB ComponentState `json:"db"`
|
||||
DBM ComponentState `json:"dbm"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user