trafficrouting

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: May 5, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetStableAndCanaryServices added in v1.2.0

func GetStableAndCanaryServices(ro *v1alpha1.Rollout) (string, string)

GetStableAndCanaryServices return a service names for current stable and canary services. If ping-pong feature enabled then the current ping or pong service will be returned. Which is a stable is defined based on a rollout status field Status.Canary.StablePingPong

func IsPingPongEnabled added in v1.2.0

func IsPingPongEnabled(ro *v1alpha1.Rollout) bool

func IsStablePing added in v1.2.0

func IsStablePing(ro *v1alpha1.Rollout) bool

IsStablePing return true if the 'ping' service is pointing to the stable replica set. Which of the service currently is using is stored in a status.canary.stablePingPong. Return true in a case if status StablePingPong value equal to 'ping'. Return false in case when the status value is 'pong' or empty

Types

type TrafficRoutingReconciler

type TrafficRoutingReconciler interface {
	// UpdateHash informs a traffic routing reconciler about new canary, stable, and additionalDestination(s) pod hashes
	UpdateHash(canaryHash, stableHash string, additionalDestinations ...v1alpha1.WeightDestination) error
	// SetWeight sets the canary weight to the desired weight
	SetWeight(desiredWeight int32, additionalDestinations ...v1alpha1.WeightDestination) error
	// SetHeaderRoute sets the header routing step
	SetHeaderRoute(setHeaderRoute *v1alpha1.SetHeaderRoute) error
	// SetMirrorRoute sets up the traffic router to mirror traffic to a service
	SetMirrorRoute(setMirrorRoute *v1alpha1.SetMirrorRoute) error
	// VerifyWeight returns true if the canary is at the desired weight and additionalDestinations are at the weights specified
	// Returns nil if weight verification is not supported or not applicable
	VerifyWeight(desiredWeight int32, additionalDestinations ...v1alpha1.WeightDestination) (*bool, error)
	// RemoveAllRoutes Removes all routes that are managed by rollouts by looking at spec.strategy.canary.trafficRouting.managedRoutes
	RemoveManagedRoutes() error
	// Type returns the type of the traffic routing reconciler
	Type() string
}

TrafficRoutingReconciler common function across all TrafficRouting implementation

Directories

Path Synopsis
rpc

Jump to

Keyboard shortcuts

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