release

package
v0.10.9 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2021 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AgentName = "release-controller"
)
View Source
const (
	ClustersNotReady = "ClustersNotReady"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CapacityTargetSpecPatch added in v0.8.0

type CapacityTargetSpecPatch struct {
	Name    string
	NewSpec *shipper.CapacityTargetSpec
}

func (*CapacityTargetSpecPatch) Alters added in v0.8.0

func (p *CapacityTargetSpecPatch) Alters(o interface{}) bool

func (*CapacityTargetSpecPatch) IsEmpty added in v0.8.0

func (p *CapacityTargetSpecPatch) IsEmpty() bool

func (*CapacityTargetSpecPatch) PatchSpec added in v0.8.0

type Controller

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

Controller is a Kubernetes controller whose role is to pick up a newly created release and progress it forward by scheduling the release on a set of selected clusters, creating a set of associated objects and executing the strategy.

func NewController

func NewController(
	clientset shipperclient.Interface,
	informerFactory shipperinformers.SharedInformerFactory,
	chartFetcher shipperrepo.ChartFetcher,
	recorder record.EventRecorder,
) *Controller

func (*Controller) Run

func (c *Controller) Run(threadiness int, stopCh <-chan struct{})

Run starts Release Controller workers and waits until stopCh is closed.

type ExecutorPipeline added in v0.10.1

type ExecutorPipeline []PipelineStep

func NewExecutorPipeline added in v0.10.1

func NewExecutorPipeline() *ExecutorPipeline

func (*ExecutorPipeline) Enqueue added in v0.10.1

func (p *ExecutorPipeline) Enqueue(step PipelineStep)

func (*ExecutorPipeline) Process added in v0.10.1

type Pipeline added in v0.8.0

type Pipeline interface {
	Enqueue(step PipelineStep)
	Process(strategyStep shipper.RolloutStrategyStep, cond conditions.StrategyConditionsMap) (bool, []StrategyPatch, []ReleaseStrategyStateTransition)
	// contains filtered or unexported methods
}

type PipelineContinuation added in v0.8.0

type PipelineContinuation bool
const (
	PipelineBreak    PipelineContinuation = false
	PipelineContinue                      = true
)

type ReleaseStrategyStateTransition

type ReleaseStrategyStateTransition struct {
	State    string
	Previous shipper.StrategyState
	New      shipper.StrategyState
}

type ReleaseStrategyStatusPatch added in v0.8.0

type ReleaseStrategyStatusPatch struct {
	Name              string
	NewStrategyStatus *shipper.ReleaseStrategyStatus
}

func (*ReleaseStrategyStatusPatch) Alters added in v0.8.0

func (p *ReleaseStrategyStatusPatch) Alters(o interface{}) bool

func (*ReleaseStrategyStatusPatch) IsEmpty added in v0.8.0

func (p *ReleaseStrategyStatusPatch) IsEmpty() bool

func (*ReleaseStrategyStatusPatch) PatchSpec added in v0.8.0

type Scheduler

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

func NewScheduler

func NewScheduler(
	clientset shipperclientset.Interface,
	clusterLister listers.ClusterLister,
	installationTargerLister listers.InstallationTargetLister,
	capacityTargetLister listers.CapacityTargetLister,
	trafficTargetLister listers.TrafficTargetLister,
	rolloutBlockLister listers.RolloutBlockLister,
	chartFetcher shipperrepo.ChartFetcher,
	recorder record.EventRecorder,
) *Scheduler

func (*Scheduler) ChooseClusters

func (s *Scheduler) ChooseClusters(rel *shipper.Release) (*shipper.Release, error)

func (*Scheduler) CreateOrUpdateCapacityTarget

func (s *Scheduler) CreateOrUpdateCapacityTarget(rel *shipper.Release, totalReplicaCount int32) (*shipper.CapacityTarget, error)

func (*Scheduler) CreateOrUpdateInstallationTarget

func (s *Scheduler) CreateOrUpdateInstallationTarget(rel *shipper.Release) (*shipper.InstallationTarget, error)

func (*Scheduler) CreateOrUpdateTrafficTarget

func (s *Scheduler) CreateOrUpdateTrafficTarget(rel *shipper.Release) (*shipper.TrafficTarget, error)

func (*Scheduler) ScheduleRelease

func (s *Scheduler) ScheduleRelease(rel *shipper.Release) (*releaseInfo, error)

type StrategyExecutor added in v0.8.0

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

func NewStrategyExecutor added in v0.8.0

func NewStrategyExecutor(strategy *shipper.RolloutStrategy, step int32, isSteppingBackwards bool) *StrategyExecutor

func (*StrategyExecutor) Execute added in v0.8.0

func (e *StrategyExecutor) Execute(prev, curr, succ *releaseInfo, pipeline Pipeline) (bool, []StrategyPatch, []ReleaseStrategyStateTransition)

type StrategyPatch added in v0.8.0

type StrategyPatch interface {
	PatchSpec() (string, schema.GroupVersionKind, []byte)
	Alters(interface{}) bool
	IsEmpty() bool
}

type TrafficTargetSpecPatch added in v0.8.0

type TrafficTargetSpecPatch struct {
	Name    string
	NewSpec *shipper.TrafficTargetSpec
}

func (*TrafficTargetSpecPatch) Alters added in v0.8.0

func (p *TrafficTargetSpecPatch) Alters(o interface{}) bool

func (*TrafficTargetSpecPatch) IsEmpty added in v0.8.0

func (p *TrafficTargetSpecPatch) IsEmpty() bool

func (*TrafficTargetSpecPatch) PatchSpec added in v0.8.0

Jump to

Keyboard shortcuts

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