router

package
v1.0.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2020 License: Apache-2.0 Imports: 25 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) 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,
	mirrored 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) 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,
	mirrored 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,
	logger *zap.SugaredLogger,
	meshClient clientset.Interface) *Factory

func (*Factory) KubernetesRouter

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

KubernetesDeploymentRouter returns a ClusterIP service router

func (*Factory) MeshRouter

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

MeshRouter returns a service mesh router

type GlooRouter

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

GlooRouter is managing Istio virtual services

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 Istio virtual service

func (*GlooRouter) SetRoutes

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

SetRoutes updates the destinations weight for primary and canary

type IngressRouter

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

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,
	primaryWeight int,
	canaryWeight int,
	mirrored 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)
}

type IstioRouter

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

IstioRouter is managing Istio virtual services

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 KubernetesDeploymentRouter

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

KubernetesDeploymentRouter is managing ClusterIP services

func (*KubernetesDeploymentRouter) GetRoutes

func (c *KubernetesDeploymentRouter) GetRoutes(canary *flaggerv1.Canary) (primaryRoute int, canaryRoute int, err error)

func (*KubernetesDeploymentRouter) Initialize

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

Initialize creates the primary and canary services

func (*KubernetesDeploymentRouter) Reconcile

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

Reconcile creates or updates the main service

func (*KubernetesDeploymentRouter) SetRoutes

func (c *KubernetesDeploymentRouter) SetRoutes(canary *flaggerv1.Canary, primaryRoute int, canaryRoute 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) Initialize

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

func (*KubernetesNoopRouter) Reconcile

func (c *KubernetesNoopRouter) Reconcile(canary *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
}

KubernetesRouter manages Kubernetes services

type NopRouter

type NopRouter struct {
}

NopRouter no-operation router

func (*NopRouter) GetRoutes

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

func (*NopRouter) Reconcile

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

func (*NopRouter) SetRoutes

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

type SmiRouter

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

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,
	mirrored 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