rollout

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2024 License: Apache-2.0 Imports: 79 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 GetScaleDownRevisionLimit added in v1.1.0

func GetScaleDownRevisionLimit(ro *v1alpha1.Rollout) int32

func NewInformerBasedWorkloadRefResolver added in v1.0.0

func NewInformerBasedWorkloadRefResolver(
	namespace string,
	dynamicClient dynamic.Interface,
	discoClient discovery.DiscoveryInterface,
	agrgoProjClientset clientset.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) ([]trafficrouting.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(ctx context.Context, threadiness int) 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
	IngressWrapper                  IngressWrapper
	RolloutsInformer                informers.RolloutInformer
	IstioPrimaryDynamicClient       dynamic.Interface
	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 IngressWrapper added in v1.2.0

type IngressWrapper interface {
	GetCached(namespace, name string) (*ingressutil.Ingress, error)
	Get(ctx context.Context, namespace, name string, opts metav1.GetOptions) (*ingressutil.Ingress, error)
	Patch(ctx context.Context, namespace, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (*ingressutil.Ingress, error)
	Create(ctx context.Context, namespace string, ingress *ingressutil.Ingress, opts metav1.CreateOptions) (*ingressutil.Ingress, error)
}

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
}

Jump to

Keyboard shortcuts

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