deployment

package
v0.50.1-rc2 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2025 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PredefinedStageK8sSync  = "K8sSync"
	PredefinedStageRollback = "K8sRollback"
)

Variables

Functions

func GetPredefinedStage

func GetPredefinedStage(id string) (*model.PipelineStage, bool)

GetPredefinedStage finds and returns the predefined stage for the given id.

Types

type DeploymentService

type DeploymentService struct {
	deployment.UnimplementedDeploymentServiceServer

	RegexPool    *regexpool.Pool
	Logger       *zap.Logger
	ToolRegistry toolRegistry
	Loader       loader
	LogPersister logPersister
}

func NewDeploymentService

func NewDeploymentService(
	logger *zap.Logger,
) *DeploymentService

NewDeploymentService creates a new planService.

func (*DeploymentService) BuildPipelineSyncStages

BuildPipelineSyncStages implements deployment.DeploymentServiceServer.

func (*DeploymentService) BuildQuickSyncStages

BuildQuickSyncStages implements deployment.DeploymentServiceServer.

func (*DeploymentService) DetermineStrategy

DetermineStrategy implements deployment.DeploymentServiceServer.

func (*DeploymentService) DetermineVersions

DetermineVersions implements deployment.DeploymentServiceServer.

func (*DeploymentService) ExecuteStage

func (*DeploymentService) FetchDefinedStages

FetchDefinedStages implements deployment.DeploymentServiceServer.

func (*DeploymentService) Register

func (a *DeploymentService) Register(server *grpc.Server)

Register registers all handling of this service into the specified gRPC server.

type Stage

type Stage string
const (
	// StageK8sSync represents the state where
	// all resources should be synced with the Git state.
	StageK8sSync Stage = "K8S_SYNC"
	// StageK8sPrimaryRollout represents the state where
	// the PRIMARY variant resources has been updated to the new version/configuration.
	StageK8sPrimaryRollout Stage = "K8S_PRIMARY_ROLLOUT"
	// StageK8sCanaryRollout represents the state where
	// the CANARY variant resources has been rolled out with the new version/configuration.
	StageK8sCanaryRollout Stage = "K8S_CANARY_ROLLOUT"
	// StageK8sCanaryClean represents the state where
	// the CANARY variant resources has been cleaned.
	StageK8sCanaryClean Stage = "K8S_CANARY_CLEAN"
	// StageK8sBaselineRollout represents the state where
	// the BASELINE variant resources has been rolled out.
	StageK8sBaselineRollout Stage = "K8S_BASELINE_ROLLOUT"
	// StageK8sBaselineClean represents the state where
	// the BASELINE variant resources has been cleaned.
	StageK8sBaselineClean Stage = "K8S_BASELINE_CLEAN"
	// StageK8sTrafficRouting represents the state where the traffic to application
	// should be splitted as the specified percentage to PRIMARY, CANARY, BASELINE variants.
	StageK8sTrafficRouting Stage = "K8S_TRAFFIC_ROUTING"
	// StageK8sRollback represents the state where all deployed resources should be rollbacked.
	StageK8sRollback Stage = "K8S_ROLLBACK"
)

func (Stage) String

func (s Stage) String() string

Jump to

Keyboard shortcuts

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