release

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2019 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

This section is empty.

Types

type CapacityTargetOutdatedResult

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

func (*CapacityTargetOutdatedResult) PatchSpec

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.

Release Controller has 2 primary workqueues: releases and applications.

func NewController

func NewController(
	clientset shipperclient.Interface,
	informerFactory shipperinformers.SharedInformerFactory,
	chartFetchFunc chart.FetchFunc,
	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 Executor

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

func (*Executor) Execute

Execute executes the strategy. It returns an ExecutorResult, if a patch should be performed into some of the associated Release objects and an error if an error has happened. Currently if both values are nil it means that the operation was successful but no modifications are required.

type ExecutorResult

type ExecutorResult interface {
	PatchSpec() (string, schema.GroupVersionKind, []byte)
}

type ReleaseStrategyStateTransition

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

type ReleaseUpdateResult

type ReleaseUpdateResult struct {
	Name      string
	NewStatus *shipper.ReleaseStatus
}

func (*ReleaseUpdateResult) PatchSpec

func (r *ReleaseUpdateResult) PatchSpec() (string, schema.GroupVersionKind, []byte)

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,
	fetchChart shipperchart.FetchFunc,
	recorder record.EventRecorder,
) *Scheduler

func (*Scheduler) ChooseClusters

func (s *Scheduler) ChooseClusters(rel *shipper.Release, force bool) (*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) (*shipper.Release, error)

type TrafficTargetOutdatedResult

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

func (*TrafficTargetOutdatedResult) PatchSpec

Jump to

Keyboard shortcuts

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