Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetExperimentFromTemplate

func GetExperimentFromTemplate(r *v1alpha1.Rollout, stableRS, newRS *appsv1.ReplicaSet) (*v1alpha1.Experiment, error)

GetExperimentFromTemplate takes the canary experiment step and converts it to an experiment

Types

type Controller

type Controller struct {

	// contains filtered or unexported fields

}

Controller is the controller implementation for Rollout resources

func NewController

func NewController(cfg ControllerConfig) *Controller

NewController returns a new rollout controller

func (*Controller) EnqueueIstioVsvc

func (c *Controller) EnqueueIstioVsvc(vsvc interface{})

func (*Controller) NewTrafficRoutingReconciler

func (c *Controller) NewTrafficRoutingReconciler(roCtx *rolloutContext) (TrafficRoutingReconciler, error)

NewTrafficRoutingReconciler identifies return the TrafficRouting Plugin that the rollout wants to modify

func (*Controller) Run

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

Run will set up the event handlers for types we are interested in, as well as syncing informer caches and starting workers. It will block until stopCh is closed, at which point it will shutdown the workqueue and wait for workers to finish processing their current work items.

type ControllerConfig

type ControllerConfig struct {
	Namespace                       string
	KubeClientSet                   kubernetes.Interface
	ArgoProjClientset               clientset.Interface
	DynamicClientSet                dynamic.Interface
	SmiClientSet                    smiclientset.Interface
	ExperimentInformer              informers.ExperimentInformer
	AnalysisRunInformer             informers.AnalysisRunInformer
	AnalysisTemplateInformer        informers.AnalysisTemplateInformer
	ClusterAnalysisTemplateInformer informers.ClusterAnalysisTemplateInformer
	ReplicaSetInformer              appsinformers.ReplicaSetInformer
	ServicesInformer                coreinformers.ServiceInformer
	IngressInformer                 extensionsinformers.IngressInformer
	RolloutsInformer                informers.RolloutInformer
	IstioVirtualServiceInformer     cache.SharedIndexInformer
	ResyncPeriod                    time.Duration
	RolloutWorkQueue                workqueue.RateLimitingInterface
	ServiceWorkQueue                workqueue.RateLimitingInterface
	IngressWorkQueue                workqueue.RateLimitingInterface
	MetricsServer                   *metrics.MetricsServer
	Recorder                        record.EventRecorder
	DefaultIstioVersion             string
	DefaultTrafficSplitVersion      string
}

ControllerConfig describes the data required to instantiate a new rollout controller

type RolloutPodRestarter

type RolloutPodRestarter struct {

	// contains filtered or unexported fields

}

RolloutPodRestarter describes the components needed for the controller to restart all the pods of a rollout.

func (*RolloutPodRestarter) Reconcile

func (p *RolloutPodRestarter) Reconcile(roCtx *rolloutContext) error

Reconcile gets all pods of a Rollout and confirms that have creationTimestamps newer than spec.restartAt. If not, iterates pods and deletes pods which do not have a deletion timestamp, and were created before spec.restartedAt. If the rollout is a canary rollout, it can restart multiple pods, up to maxUnavailable or 1, whichever is greater.

type SortReplicaSetsByPriority

type SortReplicaSetsByPriority struct {

	// contains filtered or unexported fields

}

SortReplicaSetsByPriority sorts the ReplicaSets with the following Priority: 1. Stable RS 2. New RS 3. Older ReplicaSets

func NewSortReplicaSetsByPriority

func NewSortReplicaSetsByPriority(roCtx *rolloutContext) SortReplicaSetsByPriority

func (SortReplicaSetsByPriority) Len

func (SortReplicaSetsByPriority) Less

func (s SortReplicaSetsByPriority) Less(i, j int) bool

func (SortReplicaSetsByPriority) Swap

func (s SortReplicaSetsByPriority) Swap(i, j int)

type TrafficRoutingReconciler

type TrafficRoutingReconciler interface {
	Reconcile(desiredWeight int32) error
	Type() string
}

TrafficRoutingReconciler common function across all TrafficRouting implementation