1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-24 15:59:41 +02:00

feat(edge/stacks): increase status transparency [EE-5554] (#9094)

This commit is contained in:
Chaim Lev-Ari 2023-07-13 23:55:52 +03:00 committed by GitHub
parent db61fb149b
commit 0bcb57568c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
45 changed files with 1305 additions and 316 deletions

View file

@ -310,15 +310,16 @@ type (
//EdgeStack represents an edge stack
EdgeStack struct {
// EdgeStack Identifier
ID EdgeStackID `json:"Id" example:"1"`
Name string `json:"Name"`
Status map[EndpointID]EdgeStackStatus `json:"Status"`
CreationDate int64 `json:"CreationDate"`
EdgeGroups []EdgeGroupID `json:"EdgeGroups"`
ProjectPath string `json:"ProjectPath"`
EntryPoint string `json:"EntryPoint"`
Version int `json:"Version"`
NumDeployments int `json:"NumDeployments"`
ID EdgeStackID `json:"Id" example:"1"`
Name string `json:"Name"`
Status map[EndpointID]EdgeStackStatus `json:"Status"`
// StatusArray map[EndpointID][]EdgeStackStatus `json:"StatusArray"`
CreationDate int64 `json:"CreationDate"`
EdgeGroups []EdgeGroupID `json:"EdgeGroups"`
ProjectPath string `json:"ProjectPath"`
EntryPoint string `json:"EntryPoint"`
Version int `json:"Version"`
NumDeployments int `json:"NumDeployments"`
ManifestPath string
DeploymentType EdgeStackDeploymentType
// Uses the manifest's namespaces instead of the default one
@ -345,16 +346,26 @@ type (
//EdgeStackStatus represents an edge stack status
EdgeStackStatus struct {
Details EdgeStackStatusDetails `json:"Details"`
Error string `json:"Error"`
EndpointID EndpointID `json:"EndpointID"`
Status []EdgeStackDeploymentStatus
EndpointID EndpointID
// EE only feature
DeploymentInfo StackDeploymentInfo `json:"DeploymentInfo"`
DeploymentInfo StackDeploymentInfo
// Deprecated
Details EdgeStackStatusDetails
// Deprecated
Error string
// Deprecated
Type EdgeStackStatusType `json:"Type"`
}
// EdgeStackDeploymentStatus represents an edge stack deployment status
EdgeStackDeploymentStatus struct {
Time int64
Type EdgeStackStatusType
Error string
}
//EdgeStackStatusType represents an edge stack status type
EdgeStackStatusType int
@ -1647,18 +1658,24 @@ const (
const (
// EdgeStackStatusPending represents a pending edge stack
EdgeStackStatusPending EdgeStackStatusType = iota
//EdgeStackStatusOk represents a successfully deployed edge stack
EdgeStackStatusOk
//EdgeStackStatusError represents an edge environment(endpoint) which failed to deploy its edge stack
//EdgeStackStatusDeploymentReceived represents an edge environment which received the edge stack deployment
EdgeStackStatusDeploymentReceived
//EdgeStackStatusError represents an edge environment which failed to deploy its edge stack
EdgeStackStatusError
//EdgeStackStatusAcknowledged represents an acknowledged edge stack
EdgeStackStatusAcknowledged
//EdgeStackStatusRemove represents a removed edge stack (status isn't persisted)
EdgeStackStatusRemove
//EdgeStackStatusRemoved represents a removed edge stack
EdgeStackStatusRemoved
// StatusRemoteUpdateSuccess represents a successfully updated edge stack
EdgeStackStatusRemoteUpdateSuccess
// EdgeStackStatusImagesPulled represents a successfully images-pulling
EdgeStackStatusImagesPulled
// EdgeStackStatusRunning represents a running Edge stack
EdgeStackStatusRunning
// EdgeStackStatusDeploying represents an Edge stack which is being deployed
EdgeStackStatusDeploying
// EdgeStackStatusRemoving represents an Edge stack which is being removed
EdgeStackStatusRemoving
)
const (