mirror of
https://github.com/portainer/portainer.git
synced 2025-08-02 20:35:25 +02:00
feat(edge): kubernetes WaitForStatus support (#85)
This commit is contained in:
parent
fd2b00bf3b
commit
6bc52dd39c
6 changed files with 34 additions and 8 deletions
|
@ -2,6 +2,7 @@ package portainer
|
|||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"io"
|
||||
"time"
|
||||
|
||||
|
@ -1722,6 +1723,30 @@ const (
|
|||
EdgeStackStatusCompleted
|
||||
)
|
||||
|
||||
var edgeStackStatusTypeStr = map[EdgeStackStatusType]string{
|
||||
EdgeStackStatusPending: "Pending",
|
||||
EdgeStackStatusDeploymentReceived: "DeploymentReceived",
|
||||
EdgeStackStatusError: "Error",
|
||||
EdgeStackStatusAcknowledged: "Acknowledged",
|
||||
EdgeStackStatusRemoved: "Removed",
|
||||
EdgeStackStatusRemoteUpdateSuccess: "RemoteUpdateSuccess",
|
||||
EdgeStackStatusImagesPulled: "ImagesPulled",
|
||||
EdgeStackStatusRunning: "Running",
|
||||
EdgeStackStatusDeploying: "Deploying",
|
||||
EdgeStackStatusRemoving: "Removing",
|
||||
EdgeStackStatusPausedDeploying: "PausedDeploying",
|
||||
EdgeStackStatusRollingBack: "RollingBack",
|
||||
EdgeStackStatusRolledBack: "RolledBack",
|
||||
EdgeStackStatusCompleted: "Completed",
|
||||
}
|
||||
|
||||
func (s EdgeStackStatusType) String() string {
|
||||
if str, ok := edgeStackStatusTypeStr[s]; ok {
|
||||
return fmt.Sprintf("%d (%s)", s, str)
|
||||
}
|
||||
return fmt.Sprintf("%d (UNKNOWN)", s)
|
||||
}
|
||||
|
||||
const (
|
||||
_ EndpointStatus = iota
|
||||
// EndpointStatusUp is used to represent an available environment(endpoint)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue