rollout

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2021 License: Apache-2.0 Imports: 70 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetExperimentFromTemplate added in v0.6.0

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

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

func NewInformerBasedWorkloadRefResolver added in v1.0.0

func NewInformerBasedWorkloadRefResolver(
	namespace string,
	dynamicClient dynamic.Interface,
	discoClient discovery.DiscoveryInterface,
	rolloutWorkQueue workqueue.Interface,
	rolloutsInformer cache.SharedIndexInformer,
) *informerBasedTemplateResolver

NewInformerBasedWorkloadRefResolver create new instance of workload ref resolver.

Types

type Controller added in v0.9.0

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

Controller is the controller implementation for Rollout resources

func NewController added in v0.9.0

func NewController(cfg ControllerConfig) *Controller

NewController returns a new rollout controller

func (*Controller) NewTrafficRoutingReconciler added in v0.9.0

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

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

func (*Controller) Run added in v0.9.0

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 added in v0.9.0

type ControllerConfig struct {
	Namespace                       string
	KubeClientSet                   kubernetes.Interface
	ArgoProjClientset               clientset.Interface
	DynamicClientSet                dynamic.Interface
	RefResolver                     TemplateRefResolver
	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
	IstioDestinationRuleInformer    cache.SharedIndexInformer
	ResyncPeriod                    time.Duration
	RolloutWorkQueue                workqueue.RateLimitingInterface
	ServiceWorkQueue                workqueue.RateLimitingInterface
	IngressWorkQueue                workqueue.RateLimitingInterface
	MetricsServer                   *metrics.MetricsServer
	Recorder                        record.EventRecorder
}

ControllerConfig describes the data required to instantiate a new rollout controller

type RolloutPodRestarter added in v0.8.0

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 added in v0.8.0

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 added in v0.8.0

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 added in v0.8.0

func NewSortReplicaSetsByPriority(roCtx *rolloutContext) SortReplicaSetsByPriority

func (SortReplicaSetsByPriority) Len added in v0.8.0

func (SortReplicaSetsByPriority) Less added in v0.8.0

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

func (SortReplicaSetsByPriority) Swap added in v0.8.0

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

type TemplateRefResolver added in v1.0.0

type TemplateRefResolver interface {
	Resolve(r *v1alpha1.Rollout) error
}

type TrafficRoutingReconciler added in v0.7.0

type TrafficRoutingReconciler interface {
	// UpdateHash informs a traffic routing reconciler about new canary/stable pod hashes
	UpdateHash(canaryHash, stableHash string) error
	// SetWeight sets the canary weight to the desired weight
	SetWeight(desiredWeight int32) error
	// VerifyWeight returns true if the canary is at the desired weight
	VerifyWeight(desiredWeight int32) (bool, error)
	// Type returns the type of the traffic routing reconciler
	Type() string
}

TrafficRoutingReconciler common function across all TrafficRouting implementation

Directories

Path Synopsis
trafficrouting
alb
smi

Jump to

Keyboard shortcuts

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