deployments

package
v0.0.0-...-270f78c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 31, 2023 License: Zlib Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewStackDeployer

func NewStackDeployer(swarmStackManager portainer.SwarmStackManager, composeStackManager portainer.ComposeStackManager, kubernetesDeployer portainer.KubernetesDeployer) *stackDeployer

NewStackDeployer inits a stackDeployer struct with a SwarmStackManager, a ComposeStackManager and a KubernetesDeployer

func RedeployWhenChanged

func RedeployWhenChanged(stackID portainer.StackID, deployer StackDeployer, datastore dataservices.DataStore, gitService portainer.GitService) error

RedeployWhenChanged pull and redeploy the stack when git repo changed Stack will always be redeployed if force deployment is set to true

func StartAutoupdate

func StartAutoupdate(stackID portainer.StackID, interval string, scheduler *scheduler.Scheduler, stackDeployer StackDeployer, datastore dataservices.DataStore, gitService portainer.GitService) (jobID string, e *httperror.HandlerError)

func StartStackSchedules

func StartStackSchedules(scheduler *scheduler.Scheduler, stackdeployer StackDeployer, datastore dataservices.DataStore, gitService portainer.GitService) error

func StopAutoupdate

func StopAutoupdate(stackID portainer.StackID, jobID string, scheduler *scheduler.Scheduler)

Types

type ComposeStackDeploymentConfig

type ComposeStackDeploymentConfig struct {
	ForceCreate   bool
	FileService   portainer.FileService
	StackDeployer StackDeployer
	// contains filtered or unexported fields
}

func CreateComposeStackDeploymentConfig

func CreateComposeStackDeploymentConfig(securityContext *security.RestrictedRequestContext, stack *portainer.Stack, endpoint *portainer.Endpoint, dataStore dataservices.DataStore, fileService portainer.FileService, deployer StackDeployer, forcePullImage, forceCreate bool) (*ComposeStackDeploymentConfig, error)

func (*ComposeStackDeploymentConfig) Deploy

func (config *ComposeStackDeploymentConfig) Deploy() error

func (*ComposeStackDeploymentConfig) GetResponse

func (config *ComposeStackDeploymentConfig) GetResponse() string

func (*ComposeStackDeploymentConfig) GetUsername

func (config *ComposeStackDeploymentConfig) GetUsername() string

type KubernetesStackDeploymentConfig

type KubernetesStackDeploymentConfig struct {
	// contains filtered or unexported fields
}

func CreateKubernetesStackDeploymentConfig

func CreateKubernetesStackDeploymentConfig(stack *portainer.Stack, kubeDeployer portainer.KubernetesDeployer, appLabels k.KubeAppLabels, user *portainer.User, endpoint *portainer.Endpoint) (*KubernetesStackDeploymentConfig, error)

func (*KubernetesStackDeploymentConfig) Deploy

func (config *KubernetesStackDeploymentConfig) Deploy() error

func (*KubernetesStackDeploymentConfig) GetResponse

func (config *KubernetesStackDeploymentConfig) GetResponse() string

func (*KubernetesStackDeploymentConfig) GetUsername

func (config *KubernetesStackDeploymentConfig) GetUsername() string

type StackAuthorMissingErr

type StackAuthorMissingErr struct {
	// contains filtered or unexported fields
}

func (*StackAuthorMissingErr) Error

func (e *StackAuthorMissingErr) Error() string

type StackDeployer

type StackDeployer interface {
	DeploySwarmStack(stack *portainer.Stack, endpoint *portainer.Endpoint, registries []portainer.Registry, prune bool, pullImage bool) error
	DeployComposeStack(stack *portainer.Stack, endpoint *portainer.Endpoint, registries []portainer.Registry, forcePullImage bool, forceRereate bool) error
	DeployKubernetesStack(stack *portainer.Stack, endpoint *portainer.Endpoint, user *portainer.User) error
}

type StackDeploymentConfiger

type StackDeploymentConfiger interface {
	GetUsername() string
	Deploy() error
	GetResponse() string
}

type SwarmStackDeploymentConfig

type SwarmStackDeploymentConfig struct {
	FileService   portainer.FileService
	StackDeployer StackDeployer
	// contains filtered or unexported fields
}

func CreateSwarmStackDeploymentConfig

func CreateSwarmStackDeploymentConfig(securityContext *security.RestrictedRequestContext, stack *portainer.Stack, endpoint *portainer.Endpoint, dataStore dataservices.DataStore, fileService portainer.FileService, deployer StackDeployer, prune bool, pullImage bool) (*SwarmStackDeploymentConfig, error)

func (*SwarmStackDeploymentConfig) Deploy

func (config *SwarmStackDeploymentConfig) Deploy() error

func (*SwarmStackDeploymentConfig) GetResponse

func (config *SwarmStackDeploymentConfig) GetResponse() string

func (*SwarmStackDeploymentConfig) GetUsername

func (config *SwarmStackDeploymentConfig) GetUsername() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL