Documentation ¶
Index ¶
- Constants
- type CapacityTargetOutdatedResult
- type Controller
- type Executor
- type ExecutorResult
- type ReleaseStrategyStateTransition
- type ReleaseUpdateResult
- type Scheduler
- func (s *Scheduler) ChooseClusters(rel *shipper.Release, force bool) (*shipper.Release, error)
- func (s *Scheduler) CreateOrUpdateCapacityTarget(rel *shipper.Release, totalReplicaCount int32) (*shipper.CapacityTarget, error)
- func (s *Scheduler) CreateOrUpdateInstallationTarget(rel *shipper.Release) (*shipper.InstallationTarget, error)
- func (s *Scheduler) CreateOrUpdateTrafficTarget(rel *shipper.Release) (*shipper.TrafficTarget, error)
- func (s *Scheduler) ScheduleRelease(rel *shipper.Release) (*shipper.Release, error)
- type TrafficTargetOutdatedResult
Constants ¶
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 ¶
func (c *CapacityTargetOutdatedResult) PatchSpec() (string, schema.GroupVersionKind, []byte)
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 ¶
func (s *Executor) Execute() ([]ExecutorResult, []ReleaseStrategyStateTransition, error)
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 (*Scheduler) CreateOrUpdateCapacityTarget ¶
func (*Scheduler) CreateOrUpdateInstallationTarget ¶
func (*Scheduler) CreateOrUpdateTrafficTarget ¶
type TrafficTargetOutdatedResult ¶
type TrafficTargetOutdatedResult struct { Name string NewSpec *shipper.TrafficTargetSpec }
func (*TrafficTargetOutdatedResult) PatchSpec ¶
func (c *TrafficTargetOutdatedResult) PatchSpec() (string, schema.GroupVersionKind, []byte)