router

package
v1.26.0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2022 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppMeshRouter

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

AppMeshRouter is managing AppMesh virtual services

func (*AppMeshRouter) Finalize

func (ar *AppMeshRouter) Finalize(_ *flaggerv1.Canary) error

func (*AppMeshRouter) GetRoutes

func (ar *AppMeshRouter) GetRoutes(canary *flaggerv1.Canary) (
	primaryWeight int,
	canaryWeight int,
	mirrored bool,
	err error,
)

GetRoutes returns the destinations weight for primary and canary

func (*AppMeshRouter) Reconcile

func (ar *AppMeshRouter) Reconcile(canary *flaggerv1.Canary) error

Reconcile creates or updates App Mesh virtual nodes and virtual services

func (*AppMeshRouter) SetRoutes

func (ar *AppMeshRouter) SetRoutes(
	canary *flaggerv1.Canary,
	primaryWeight int,
	canaryWeight int,
	_ bool,
) error

SetRoutes updates the destinations weight for primary and canary

type AppMeshv1beta2Router

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

AppMeshRouter is managing AppMesh virtual services

func (*AppMeshv1beta2Router) Finalize

func (ar *AppMeshv1beta2Router) Finalize(_ *flaggerv1.Canary) error

func (*AppMeshv1beta2Router) GetRoutes

func (ar *AppMeshv1beta2Router) GetRoutes(canary *flaggerv1.Canary) (
	primaryWeight int,
	canaryWeight int,
	mirrored bool,
	err error,
)

GetRoutes returns the destinations weight for primary and canary

func (*AppMeshv1beta2Router) Reconcile

func (ar *AppMeshv1beta2Router) Reconcile(canary *flaggerv1.Canary) error

Reconcile creates or updates App Mesh virtual nodes and virtual services

func (*AppMeshv1beta2Router) SetRoutes

func (ar *AppMeshv1beta2Router) SetRoutes(
	canary *flaggerv1.Canary,
	primaryWeight int,
	canaryWeight int,
	_ bool,
) error

SetRoutes updates the destinations weight for primary and canary

type ContourRouter

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

ContourRouter is managing HTTPProxy objects

func (*ContourRouter) Finalize

func (cr *ContourRouter) Finalize(_ *flaggerv1.Canary) error

func (*ContourRouter) GetRoutes

func (cr *ContourRouter) GetRoutes(canary *flaggerv1.Canary) (
	primaryWeight int,
	canaryWeight int,
	mirrored bool,
	err error,
)

GetRoutes returns the service weight for primary and canary

func (*ContourRouter) Reconcile

func (cr *ContourRouter) Reconcile(canary *flaggerv1.Canary) error

Reconcile creates or updates the HTTP proxy

func (*ContourRouter) SetRoutes

func (cr *ContourRouter) SetRoutes(
	canary *flaggerv1.Canary,
	primaryWeight int,
	canaryWeight int,
	_ bool,
) error

SetRoutes updates the service weight for primary and canary

type Factory

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

func NewFactory

func NewFactory(kubeConfig *restclient.Config, kubeClient kubernetes.Interface,
	flaggerClient clientset.Interface,
	ingressAnnotationsPrefix string,
	ingressClass string,
	logger *zap.SugaredLogger,
	meshClient clientset.Interface,
	setOwnerRefs bool) *Factory

func (*Factory) KubernetesRouter

func (factory *Factory) KubernetesRouter(kind string, labelSelector string, labelValue string, ports map[string]int32) KubernetesRouter

KubernetesRouter returns a KubernetesRouter interface implementation

func (*Factory) MeshRouter

func (factory *Factory) MeshRouter(provider string, labelSelector string) Interface

MeshRouter returns a service mesh router

type GatewayAPIRouter added in v1.19.0

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

func (*GatewayAPIRouter) Finalize added in v1.19.0

func (gwr *GatewayAPIRouter) Finalize(_ *flaggerv1.Canary) error

func (*GatewayAPIRouter) GetRoutes added in v1.19.0

func (gwr *GatewayAPIRouter) GetRoutes(canary *flaggerv1.Canary) (
	primaryWeight int,
	canaryWeight int,
	mirrored bool,
	err error,
)

func (*GatewayAPIRouter) Reconcile added in v1.19.0

func (gwr *GatewayAPIRouter) Reconcile(canary *flaggerv1.Canary) error

func (*GatewayAPIRouter) SetRoutes added in v1.19.0

func (gwr *GatewayAPIRouter) SetRoutes(
	canary *flaggerv1.Canary,
	primaryWeight int,
	canaryWeight int,
	mirrored bool,
) error

type GatewayAPIV1Beta1Router added in v1.26.0

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

func (*GatewayAPIV1Beta1Router) Finalize added in v1.26.0

func (gwr *GatewayAPIV1Beta1Router) Finalize(_ *flaggerv1.Canary) error

func (*GatewayAPIV1Beta1Router) GetRoutes added in v1.26.0

func (gwr *GatewayAPIV1Beta1Router) GetRoutes(canary *flaggerv1.Canary) (
	primaryWeight int,
	canaryWeight int,
	mirrored bool,
	err error,
)

func (*GatewayAPIV1Beta1Router) Reconcile added in v1.26.0

func (gwr *GatewayAPIV1Beta1Router) Reconcile(canary *flaggerv1.Canary) error

func (*GatewayAPIV1Beta1Router) SetRoutes added in v1.26.0

func (gwr *GatewayAPIV1Beta1Router) SetRoutes(
	canary *flaggerv1.Canary,
	primaryWeight int,
	canaryWeight int,
	mirrored bool,
) error

type GlooRouter

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

GlooRouter is managing Gloo route tables

func (*GlooRouter) Finalize

func (gr *GlooRouter) Finalize(_ *flaggerv1.Canary) error

func (*GlooRouter) GetRoutes

func (gr *GlooRouter) GetRoutes(canary *flaggerv1.Canary) (
	primaryWeight int,
	canaryWeight int,
	mirrored bool,
	err error,
)

GetRoutes returns the destinations weight for primary and canary

func (*GlooRouter) Reconcile

func (gr *GlooRouter) Reconcile(canary *flaggerv1.Canary) error

Reconcile creates or updates the Gloo Edge route table

func (*GlooRouter) SetRoutes

func (gr *GlooRouter) SetRoutes(
	canary *flaggerv1.Canary,
	primaryWeight int,
	canaryWeight int,
	_ bool,
) error

SetRoutes updates the destinations weight for primary and canary

type IngressRouter

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

func (*IngressRouter) Finalize

func (i *IngressRouter) Finalize(_ *flaggerv1.Canary) error

func (*IngressRouter) GetAnnotationWithPrefix

func (i *IngressRouter) GetAnnotationWithPrefix(suffix string) string

func (*IngressRouter) GetRoutes

func (i *IngressRouter) GetRoutes(canary *flaggerv1.Canary) (
	primaryWeight int,
	canaryWeight int,
	mirrored bool,
	err error,
)

func (*IngressRouter) Reconcile

func (i *IngressRouter) Reconcile(canary *flaggerv1.Canary) error

func (*IngressRouter) SetRoutes

func (i *IngressRouter) SetRoutes(
	canary *flaggerv1.Canary,
	_ int,
	canaryWeight int,
	_ bool,
) error

type Interface

type Interface interface {
	Reconcile(canary *flaggerv1.Canary) error
	SetRoutes(canary *flaggerv1.Canary, primaryWeight int, canaryWeight int, mirrored bool) error
	GetRoutes(canary *flaggerv1.Canary) (primaryWeight int, canaryWeight int, mirrored bool, err error)
	Finalize(canary *flaggerv1.Canary) error
}

type IstioRouter

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

IstioRouter is managing Istio virtual services

func (*IstioRouter) Finalize

func (ir *IstioRouter) Finalize(canary *flaggerv1.Canary) error

func (*IstioRouter) GetRoutes

func (ir *IstioRouter) GetRoutes(canary *flaggerv1.Canary) (
	primaryWeight int,
	canaryWeight int,
	mirrored bool,
	err error,
)

GetRoutes returns the destinations weight for primary and canary

func (*IstioRouter) Reconcile

func (ir *IstioRouter) Reconcile(canary *flaggerv1.Canary) error

Reconcile creates or updates the Istio virtual service and destination rules

func (*IstioRouter) SetRoutes

func (ir *IstioRouter) SetRoutes(
	canary *flaggerv1.Canary,
	primaryWeight int,
	canaryWeight int,
	mirrored bool,
) error

SetRoutes updates the destinations weight for primary and canary

type KubernetesDefaultRouter

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

KubernetesDefaultRouter is managing ClusterIP services

func (*KubernetesDefaultRouter) Finalize

func (c *KubernetesDefaultRouter) Finalize(canary *flaggerv1.Canary) error

Finalize reverts the apex router if not owned by the Flagger controller.

func (*KubernetesDefaultRouter) GetRoutes

func (c *KubernetesDefaultRouter) GetRoutes(_ *flaggerv1.Canary) (primaryRoute int, canaryRoute int, err error)

func (*KubernetesDefaultRouter) Initialize

func (c *KubernetesDefaultRouter) Initialize(canary *flaggerv1.Canary) error

Initialize creates the primary and canary services

func (*KubernetesDefaultRouter) Reconcile

func (c *KubernetesDefaultRouter) Reconcile(canary *flaggerv1.Canary) error

Reconcile creates or updates the main service

func (*KubernetesDefaultRouter) SetRoutes

func (c *KubernetesDefaultRouter) SetRoutes(_ *flaggerv1.Canary, _ int, _ int) error

type KubernetesNoopRouter

type KubernetesNoopRouter struct {
}

KubernetesNoopRouter manages nothing. This is useful when one uses Flagger for progressive delivery of services that are not load-balanced by a Kubernetes service

func (*KubernetesNoopRouter) Finalize

func (c *KubernetesNoopRouter) Finalize(_ *flaggerv1.Canary) error

func (*KubernetesNoopRouter) Initialize

func (c *KubernetesNoopRouter) Initialize(_ *flaggerv1.Canary) error

func (*KubernetesNoopRouter) Reconcile

func (c *KubernetesNoopRouter) Reconcile(_ *flaggerv1.Canary) error

type KubernetesRouter

type KubernetesRouter interface {
	// Initialize creates or updates the primary and canary services
	Initialize(canary *flaggerv1.Canary) error
	// Reconcile creates or updates the main service
	Reconcile(canary *flaggerv1.Canary) error
	// Revert router
	Finalize(canary *flaggerv1.Canary) error
}

KubernetesRouter manages Kubernetes services

type KumaRouter added in v1.17.0

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

KumaRouter is managing TrafficRoute objects

func (*KumaRouter) Finalize added in v1.17.0

func (kr *KumaRouter) Finalize(_ *flaggerv1.Canary) error

func (*KumaRouter) GetRoutes added in v1.17.0

func (kr *KumaRouter) GetRoutes(canary *flaggerv1.Canary) (
	primaryWeight int,
	canaryWeight int,
	mirrored bool,
	err error,
)

GetRoutes returns the destinations weight for primary and canary

func (*KumaRouter) Reconcile added in v1.17.0

func (kr *KumaRouter) Reconcile(canary *flaggerv1.Canary) error

Reconcile creates or updates the Kuma TrafficRoute

func (*KumaRouter) SetRoutes added in v1.17.0

func (kr *KumaRouter) SetRoutes(
	canary *flaggerv1.Canary,
	primaryWeight int,
	canaryWeight int,
	_ bool,
) error

SetRoutes updates the destinations weight for primary and canary

type NopRouter

type NopRouter struct {
}

NopRouter no-operation router

func (*NopRouter) Finalize

func (c *NopRouter) Finalize(_ *flaggerv1.Canary) error

func (*NopRouter) GetRoutes

func (*NopRouter) GetRoutes(canary *flaggerv1.Canary) (primaryWeight int, canaryWeight int, mirror bool, err error)

func (*NopRouter) Reconcile

func (*NopRouter) Reconcile(_ *flaggerv1.Canary) error

func (*NopRouter) SetRoutes

func (*NopRouter) SetRoutes(_ *flaggerv1.Canary, _ int, _ int, _ bool) error

type SkipperRouter

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

func (*SkipperRouter) Finalize

func (skp *SkipperRouter) Finalize(canary *flaggerv1.Canary) error

func (*SkipperRouter) GetRoutes

func (skp *SkipperRouter) GetRoutes(canary *flaggerv1.Canary) (primaryWeight, canaryWeight int, mirrored bool, err error)

func (*SkipperRouter) Reconcile

func (skp *SkipperRouter) Reconcile(canary *flaggerv1.Canary) error

Reconcile creates or updates the ingresses

func (*SkipperRouter) SetRoutes

func (skp *SkipperRouter) SetRoutes(canary *flaggerv1.Canary, primaryWeight, canaryWeight int, _ bool) (err error)

type SmiRouter

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

func (*SmiRouter) Finalize

func (sr *SmiRouter) Finalize(_ *flaggerv1.Canary) error

func (*SmiRouter) GetRoutes

func (sr *SmiRouter) GetRoutes(canary *flaggerv1.Canary) (
	primaryWeight int,
	canaryWeight int,
	mirrored bool,
	err error,
)

GetRoutes returns the destinations weight for primary and canary

func (*SmiRouter) Reconcile

func (sr *SmiRouter) Reconcile(canary *flaggerv1.Canary) error

Reconcile creates or updates the SMI traffic split

func (*SmiRouter) SetRoutes

func (sr *SmiRouter) SetRoutes(
	canary *flaggerv1.Canary,
	primaryWeight int,
	canaryWeight int,
	_ bool,
) error

SetRoutes updates the destinations weight for primary and canary

type Smiv1alpha2Router added in v1.8.0

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

func (*Smiv1alpha2Router) Finalize added in v1.8.0

func (sr *Smiv1alpha2Router) Finalize(_ *flaggerv1.Canary) error

func (*Smiv1alpha2Router) GetRoutes added in v1.8.0

func (sr *Smiv1alpha2Router) GetRoutes(canary *flaggerv1.Canary) (
	primaryWeight int,
	canaryWeight int,
	mirrored bool,
	err error,
)

GetRoutes returns the destinations weight for primary and canary

func (*Smiv1alpha2Router) Reconcile added in v1.8.0

func (sr *Smiv1alpha2Router) Reconcile(canary *flaggerv1.Canary) error

Reconcile creates or updates the SMI traffic split

func (*Smiv1alpha2Router) SetRoutes added in v1.8.0

func (sr *Smiv1alpha2Router) SetRoutes(
	canary *flaggerv1.Canary,
	primaryWeight int,
	canaryWeight int,
	_ bool,
) error

SetRoutes updates the destinations weight for primary and canary

type Smiv1alpha3Router added in v1.8.0

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

func (*Smiv1alpha3Router) Finalize added in v1.8.0

func (sr *Smiv1alpha3Router) Finalize(_ *flaggerv1.Canary) error

func (*Smiv1alpha3Router) GetRoutes added in v1.8.0

func (sr *Smiv1alpha3Router) GetRoutes(canary *flaggerv1.Canary) (
	primaryWeight int,
	canaryWeight int,
	mirrored bool,
	err error,
)

GetRoutes returns the destinations weight for primary and canary

func (*Smiv1alpha3Router) Reconcile added in v1.8.0

func (sr *Smiv1alpha3Router) Reconcile(canary *flaggerv1.Canary) error

Reconcile creates or updates the SMI traffic split

func (*Smiv1alpha3Router) SetRoutes added in v1.8.0

func (sr *Smiv1alpha3Router) SetRoutes(
	canary *flaggerv1.Canary,
	primaryWeight int,
	canaryWeight int,
	_ bool,
) error

SetRoutes updates the destinations weight for primary and canary

type TraefikRouter

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

TraefikRouter is managing Traefik service

func (*TraefikRouter) Finalize

func (tr *TraefikRouter) Finalize(_ *flaggerv1.Canary) error

func (*TraefikRouter) GetRoutes

func (tr *TraefikRouter) GetRoutes(canary *flaggerv1.Canary) (
	primaryWeight int,
	canaryWeight int,
	mirrored bool,
	err error,
)

GetRoutes returns the destinations weight for primary and canary

func (*TraefikRouter) Reconcile

func (tr *TraefikRouter) Reconcile(canary *flaggerv1.Canary) error

Reconcile creates or updates the Traefik service

func (*TraefikRouter) SetRoutes

func (tr *TraefikRouter) SetRoutes(
	canary *flaggerv1.Canary,
	primaryWeight int,
	canaryWeight int,
	_ bool,
) error

SetRoutes updates the destinations weight for primary and canary

Jump to

Keyboard shortcuts

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