1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-31 19:35:21 +02:00

refact kub deploy logic

This commit is contained in:
ArrisLee 2021-09-09 12:23:02 +12:00
parent 5d2fe2d818
commit cbfdd58ece
6 changed files with 32 additions and 23 deletions

View file

@ -3,7 +3,6 @@ package portainer
import (
"context"
"io"
"net/http"
"time"
gittypes "github.com/portainer/portainer/api/git/types"
@ -763,6 +762,8 @@ type (
Namespace string `example:"default"`
// IsComposeFormat indicates if the Kubernetes stack is created from a Docker Compose file
IsComposeFormat bool `example:"false"`
// OwnerUserID represents the Stack owner/creator's user ID
OwnerUserID UserID `example:"1"`
}
//StackAutoUpdate represents the git auto sync config for stack deployment
@ -1249,7 +1250,7 @@ type (
// KubernetesDeployer represents a service to deploy a manifest inside a Kubernetes endpoint
KubernetesDeployer interface {
Deploy(request *http.Request, endpoint *Endpoint, manifestFiles []string, namespace string, deployAsAdmin bool) (string, error)
Deploy(userID UserID, endpoint *Endpoint, manifestFiles []string, namespace string) (string, error)
ConvertCompose(data []byte) ([]byte, error)
}