rolloutorchestrator

package
v0.40.4 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateBaseStagePodAutoscaler

func CreateBaseStagePodAutoscaler(ro *v1.RolloutOrchestrator, revision *v1.TargetRevision) (spa *v1.StagePodAutoscaler)

CreateBaseStagePodAutoscaler returns the basic spa(StagePodAutoscaler), base on the RolloutOrchestrator and the revision.

func IsStageScaleDownReady

func IsStageScaleDownReady(spa *v1.StagePodAutoscaler, revision *v1.TargetRevision) bool

IsStageScaleDownReady decides whether the scaling down has completed for the current stage, based on the revision and the spa(StagePodAutoscaler).

func IsStageScaleUpReady

func IsStageScaleUpReady(spa *v1.StagePodAutoscaler, revision *v1.TargetRevision) bool

IsStageScaleUpReady decides whether the scaling up has completed or on the way for the current stage, based on the revision and the spa(StagePodAutoscaler).

func LastStageComplete

func LastStageComplete(stageRevisionStatus, finalTargetRevs []v1.TargetRevision) bool

LastStageComplete decides whether the last stage of the progressive upgrade is complete or not.

func NewController

func NewController(
	ctx context.Context,
	cmw configmap.Watcher,
) *controller.Impl

NewController creates a new RolloutOrchestrator controller

func RemoveNonTrafficRev

func RemoveNonTrafficRev(ts []v1.TargetRevision) []v1.TargetRevision

RemoveNonTrafficRev removes the redundant TargetRevision from the list of TargetRevisions.

func RetrieveRevsUpDown

func RetrieveRevsUpDown(targetRevs []v1.TargetRevision) (map[string]*v1.TargetRevision, map[string]*v1.TargetRevision, error)

RetrieveRevsUpDown returns two list of revisions scaling up and down based on the input TargetRevisions.

func UpdateSPAForRevDown

func UpdateSPAForRevDown(spa *v1.StagePodAutoscaler, revision *v1.TargetRevision,
	scaleUpReady bool) *v1.StagePodAutoscaler

UpdateSPAForRevDown update the SPA(StagePodAutoscaler) for the revision scaling down, based on the TargetReplicas min & max scales defined in the Knative Service, if the scaleUpReady is true.

If the scaleUpReady is false, no change to the SPA(StagePodAutoscaler).

func UpdateSPAForRevUp

func UpdateSPAForRevUp(spa *v1.StagePodAutoscaler, revision *v1.TargetRevision, _ bool) *v1.StagePodAutoscaler

UpdateSPAForRevUp update the SPA(StagePodAutoscaler) for the revision scaling up, based on the TargetReplicas min & max scales defined in the Knative Service.

Types

type Reconciler

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

Reconciler implements controller.Reconciler for RolloutOrchestrator resources.

func (*Reconciler) ReconcileKind

func (r *Reconciler) ReconcileKind(ctx context.Context, ro *v1.RolloutOrchestrator) pkgreconciler.Event

ReconcileKind implements Interface.ReconcileKind.

Jump to

Keyboard shortcuts

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