fix: fixup multi problem
ci-api / test (push) Successful in 25m0s
ci-web / test (push) Failing after 7m59s

This commit is contained in:
Nuxgrid
2026-07-30 19:29:57 +02:00
parent 0848d3c0a0
commit ac8bdbcab7
14 changed files with 492 additions and 163 deletions
+16 -6
View File
@@ -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"`
}