plugin

package
v1.0.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	GatewayAPIUpdateError                    = "error updating Gateway API %q: %s"
	GatewayAPIManifestError                  = "No routes configured. One of 'tcpRoutes', 'httpRoutes', 'tcpRoute' or 'httpRoute' should be set"
	HTTPRouteFieldIsEmptyError               = "httpRoute field is empty. It has to be set to remove managed routes"
	InvalidHeaderMatchTypeError              = "invalid header match type"
	BackendRefWasNotFoundInHTTPRouteError    = "backendRef was not found in httpRoute"
	BackendRefWasNotFoundInTCPRouteError     = "backendRef was not found in tcpRoute"
	BackendRefListWasNotFoundInTCPRouteError = "backendRef list was not found in tcpRoute"
	ManagedRouteMapEntryDeleteError          = "can't delete key %q from managedRouteMap. The key %q is not in the managedRouteMap"
)
View Source
const (
	Type       = "GatewayAPI"
	PluginName = "argoproj-labs/gatewayAPI"
)
View Source
const (
	HTTPConfigMapKey = "httpManagedRoutes"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type GatewayAPIBackendRef

type GatewayAPIBackendRef interface {
	*HTTPBackendRef | *TCPBackendRef
	GetName() string
}

type GatewayAPIRoute added in v0.2.0

type GatewayAPIRoute interface {
	HTTPRoute | TCPRoute
	GetName() string
}

type GatewayAPIRouteRule added in v0.1.0

type GatewayAPIRouteRule[T1 GatewayAPIBackendRef] interface {
	*HTTPRouteRule | *TCPRouteRule
	Iterator() (GatewayAPIRouteRuleIterator[T1], bool)
}

type GatewayAPIRouteRuleIterator

type GatewayAPIRouteRuleIterator[T1 GatewayAPIBackendRef] func() (T1, bool)

type GatewayAPIRouteRuleList added in v0.1.0

type GatewayAPIRouteRuleList[T1 GatewayAPIBackendRef, T2 GatewayAPIRouteRule[T1]] interface {
	HTTPRouteRuleList | TCPRouteRuleList
	Iterator() (GatewayAPIRouteRuleListIterator[T1, T2], bool)
	Error() error
}

type GatewayAPIRouteRuleListIterator added in v0.1.0

type GatewayAPIRouteRuleListIterator[T1 GatewayAPIBackendRef, T2 GatewayAPIRouteRule[T1]] func() (T2, bool)

type GatewayAPITrafficRouting

type GatewayAPITrafficRouting struct {
	// HTTPRoute refers to the name of the HTTPRoute used to route traffic to the
	// service
	HTTPRoute string `json:"httpRoute,omitempty"`
	// TCPRoute refers to the name of the TCPRoute used to route traffic to the
	// service
	TCPRoute string `json:"tcpRoute,omitempty"`
	// HTTPRoutes refer to names of HTTPRoute resources used to route traffic to the
	// service
	HTTPRoutes []HTTPRoute `json:"httpRoutes,omitempty"`
	// TCPRoutes refer to names of TCPRoute resources used to route traffic to the
	// service
	TCPRoutes []TCPRoute `json:"tcpRoutes,omitempty"`
	// Namespace refers to the namespace of the specified resource
	Namespace string `json:"namespace,omitempty"`
	// ConfigMap refers to the config map where plugin stores data about managed routes
	ConfigMap string `json:"configMap,omitempty"`
	// ConfigMapRWMutex refers to the RWMutex that we use to enter to the critical section
	// critical section is config map
	ConfigMapRWMutex sync.RWMutex
}

type HTTPBackendRef

type HTTPBackendRef v1beta1.HTTPBackendRef

func (*HTTPBackendRef) GetName

func (r *HTTPBackendRef) GetName() string

type HTTPRoute added in v0.2.0

type HTTPRoute struct {
	// Name refers to the HTTPRoute name
	Name string `json:"name" validate:"required"`
	// UseHeaderRoutes defines header routes will be added to this route or not
	// during setHeaderRoute step
	UseHeaderRoutes bool `json:"useHeaderRoutes,omitempty"`
}

func (HTTPRoute) GetName added in v0.2.0

func (r HTTPRoute) GetName() string

type HTTPRouteRule added in v0.1.0

type HTTPRouteRule v1beta1.HTTPRouteRule

func (*HTTPRouteRule) Iterator added in v0.1.0

type HTTPRouteRuleList

type HTTPRouteRuleList []v1beta1.HTTPRouteRule

func (HTTPRouteRuleList) Error

func (r HTTPRouteRuleList) Error() error

func (HTTPRouteRuleList) Iterator

type ManagedRouteMap added in v0.2.0

type ManagedRouteMap map[string]map[string]int

type RpcPlugin

type RpcPlugin struct {
	IsTest               bool
	LogCtx               *logrus.Entry
	GatewayAPIClientset  *gatewayAPIClientset.Clientset
	Clientset            *kubernetes.Clientset
	TestClientset        v1.ConfigMapInterface
	UpdatedHTTPRouteMock *v1beta1.HTTPRoute
	UpdatedTCPRouteMock  *v1alpha2.TCPRoute
	HTTPRouteClient      gatewayApiv1beta1.HTTPRouteInterface
	TCPRouteClient       gatewayApiv1alpha2.TCPRouteInterface
}

func (*RpcPlugin) InitPlugin

func (r *RpcPlugin) InitPlugin() pluginTypes.RpcError

func (*RpcPlugin) RemoveManagedRoutes

func (r *RpcPlugin) RemoveManagedRoutes(rollout *v1alpha1.Rollout) pluginTypes.RpcError

func (*RpcPlugin) SetHeaderRoute

func (r *RpcPlugin) SetHeaderRoute(rollout *v1alpha1.Rollout, headerRouting *v1alpha1.SetHeaderRoute) pluginTypes.RpcError

func (*RpcPlugin) SetMirrorRoute

func (r *RpcPlugin) SetMirrorRoute(rollout *v1alpha1.Rollout, setMirrorRoute *v1alpha1.SetMirrorRoute) pluginTypes.RpcError

func (*RpcPlugin) SetWeight

func (r *RpcPlugin) SetWeight(rollout *v1alpha1.Rollout, desiredWeight int32, additionalDestinations []v1alpha1.WeightDestination) pluginTypes.RpcError

func (*RpcPlugin) Type

func (r *RpcPlugin) Type() string

func (*RpcPlugin) UpdateHash

func (r *RpcPlugin) UpdateHash(rollout *v1alpha1.Rollout, canaryHash, stableHash string, additionalDestinations []v1alpha1.WeightDestination) pluginTypes.RpcError

func (*RpcPlugin) VerifyWeight

func (r *RpcPlugin) VerifyWeight(rollout *v1alpha1.Rollout, desiredWeight int32, additionalDestinations []v1alpha1.WeightDestination) (pluginTypes.RpcVerified, pluginTypes.RpcError)

type TCPBackendRef

type TCPBackendRef v1beta1.BackendRef

func (*TCPBackendRef) GetName

func (r *TCPBackendRef) GetName() string

type TCPRoute added in v0.2.0

type TCPRoute struct {
	// Name refers to the TCPRoute name
	Name string `json:"name" validate:"required"`
	// UseHeaderRoutes indicates header routes will be added to this route or not
	// during setHeaderRoute step
	UseHeaderRoutes bool `json:"useHeaderRoutes"`
}

func (TCPRoute) GetName added in v0.2.0

func (r TCPRoute) GetName() string

type TCPRouteRule added in v0.1.0

type TCPRouteRule v1alpha2.TCPRouteRule

func (*TCPRouteRule) Iterator added in v0.1.0

type TCPRouteRuleList

type TCPRouteRuleList []v1alpha2.TCPRouteRule

func (TCPRouteRuleList) Error

func (r TCPRouteRuleList) Error() error

func (TCPRouteRuleList) Iterator

Jump to

Keyboard shortcuts

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