1
0
Fork 0
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:
LP B 2024-11-11 14:02:20 +01:00 committed by GitHub
parent fd2b00bf3b
commit 6bc52dd39c
6 changed files with 34 additions and 8 deletions

View file

@ -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)