mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 15:59:41 +02:00
refactor(edge): move stack response to a shared config [EE-5564] (#9033)
This commit is contained in:
parent
9d3f13ac92
commit
79822e1d3b
2 changed files with 52 additions and 11 deletions
48
api/edge/edge.go
Normal file
48
api/edge/edge.go
Normal file
|
@ -0,0 +1,48 @@
|
|||
package edge
|
||||
|
||||
type (
|
||||
|
||||
// StackPayload represents the payload sent to the agent
|
||||
StackPayload struct {
|
||||
// ID of the stack
|
||||
ID int
|
||||
// Name of the stack
|
||||
Name string
|
||||
// Content of the stack file
|
||||
FileContent string
|
||||
// Namespace to use for kubernetes stack. Keep empty to use the manifest namespace.
|
||||
Namespace string
|
||||
// Version of the stack file
|
||||
Version int
|
||||
// Content of the .env file
|
||||
DotEnvFileContent string
|
||||
|
||||
// RegistryCredentials holds the credentials for a Docker registry.
|
||||
//
|
||||
// Used only for EE
|
||||
RegistryCredentials []RegistryCredentials
|
||||
// PrePullImage is a flag indicating if the agent should pull the image before deploying the stack.
|
||||
//
|
||||
// Used only for EE
|
||||
PrePullImage bool
|
||||
// RePullImage is a flag indicating if the agent should pull the image if it is already present on the node.
|
||||
//
|
||||
// Used only for EE
|
||||
RePullImage bool
|
||||
// RetryDeploy is a flag indicating if the agent should retry to deploy the stack if it fails.
|
||||
//
|
||||
// Used only for EE
|
||||
RetryDeploy bool
|
||||
// EdgeUpdateID is the ID of the edge update related to this stack.
|
||||
//
|
||||
// Used only for EE
|
||||
EdgeUpdateID int
|
||||
}
|
||||
|
||||
// RegistryCredentials holds the credentials for a Docker registry.
|
||||
RegistryCredentials struct {
|
||||
ServerURL string
|
||||
Username string
|
||||
Secret string
|
||||
}
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue