trafficrouting

package
v0.0.0-...-de69368 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetStableAndCanaryServices

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

func IsPingPongEnabled

func IsPingPongEnabled(ro *v1alpha1.Rollout) bool

func IsStablePing

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