v1

package
v1.8.14 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2021 License: Apache-2.0 Imports: 44 Imported by: 49

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	VirtualServiceSelectorExpressions_Expression_Operator_name = map[int32]string{
		0: "Equals",
		1: "DoubleEquals",
		2: "NotEquals",
		3: "In",
		4: "NotIn",
		5: "Exists",
		6: "DoesNotExist",
		7: "GreaterThan",
		8: "LessThan",
	}
	VirtualServiceSelectorExpressions_Expression_Operator_value = map[string]int32{
		"Equals":       0,
		"DoubleEquals": 1,
		"NotEquals":    2,
		"In":           3,
		"NotIn":        4,
		"Exists":       5,
		"DoesNotExist": 6,
		"GreaterThan":  7,
		"LessThan":     8,
	}
)

Enum value maps for VirtualServiceSelectorExpressions_Expression_Operator.

View Source
var (
	RouteTableSelector_Expression_Operator_name = map[int32]string{
		0: "Equals",
		1: "DoubleEquals",
		2: "NotEquals",
		3: "In",
		4: "NotIn",
		5: "Exists",
		6: "DoesNotExist",
		7: "GreaterThan",
		8: "LessThan",
	}
	RouteTableSelector_Expression_Operator_value = map[string]int32{
		"Equals":       0,
		"DoubleEquals": 1,
		"NotEquals":    2,
		"In":           3,
		"NotIn":        4,
		"Exists":       5,
		"DoesNotExist": 6,
		"GreaterThan":  7,
		"LessThan":     8,
	}
)

Enum value maps for RouteTableSelector_Expression_Operator.

View Source
var File_github_com_solo_io_gloo_projects_gateway_api_v1_external_options_proto protoreflect.FileDescriptor
View Source
var File_github_com_solo_io_gloo_projects_gateway_api_v1_gateway_proto protoreflect.FileDescriptor
View Source
var File_github_com_solo_io_gloo_projects_gateway_api_v1_route_table_proto protoreflect.FileDescriptor
View Source
var File_github_com_solo_io_gloo_projects_gateway_api_v1_virtual_service_proto protoreflect.FileDescriptor
View Source
var (
	GatewayCrd = crd.NewCrd(
		"gateways",
		GatewayGVK.Group,
		GatewayGVK.Version,
		GatewayGVK.Kind,
		"gw",
		false,
		&Gateway{})
)
View Source
var (
	GatewayGVK = schema.GroupVersionKind{
		Version: "v1",
		Group:   "gateway.solo.io",
		Kind:    "Gateway",
	}
)
View Source
var (
	RouteOptionCrd = crd.NewCrd(
		"routeoptions",
		RouteOptionGVK.Group,
		RouteOptionGVK.Version,
		RouteOptionGVK.Kind,
		"rtopts",
		false,
		&RouteOption{})
)
View Source
var (
	RouteOptionGVK = schema.GroupVersionKind{
		Version: "v1",
		Group:   "gateway.solo.io",
		Kind:    "RouteOption",
	}
)
View Source
var (
	RouteTableCrd = crd.NewCrd(
		"routetables",
		RouteTableGVK.Group,
		RouteTableGVK.Version,
		RouteTableGVK.Kind,
		"rt",
		false,
		&RouteTable{})
)
View Source
var (
	RouteTableGVK = schema.GroupVersionKind{
		Version: "v1",
		Group:   "gateway.solo.io",
		Kind:    "RouteTable",
	}
)
View Source
var (
	VirtualHostOptionCrd = crd.NewCrd(
		"virtualhostoptions",
		VirtualHostOptionGVK.Group,
		VirtualHostOptionGVK.Version,
		VirtualHostOptionGVK.Kind,
		"vhopts",
		false,
		&VirtualHostOption{})
)
View Source
var (
	VirtualHostOptionGVK = schema.GroupVersionKind{
		Version: "v1",
		Group:   "gateway.solo.io",
		Kind:    "VirtualHostOption",
	}
)
View Source
var (
	VirtualServiceCrd = crd.NewCrd(
		"virtualservices",
		VirtualServiceGVK.Group,
		VirtualServiceGVK.Version,
		VirtualServiceGVK.Kind,
		"vs",
		false,
		&VirtualService{})
)
View Source
var (
	VirtualServiceGVK = schema.GroupVersionKind{
		Version: "v1",
		Group:   "gateway.solo.io",
		Kind:    "VirtualService",
	}
)

Functions

func NewApiEventLoop

func NewApiEventLoop(emitter ApiSnapshotEmitter, syncer ApiSyncer) eventloop.EventLoop

func NewApiSimpleEventLoop added in v0.13.21

func NewApiSimpleEventLoop(emitter ApiSimpleEmitter, syncers ...ApiSyncer) eventloop.SimpleEventLoop

Types

type ApiEmitter

type ApiEmitter interface {
	ApiSnapshotEmitter
	Register() error
	VirtualService() VirtualServiceClient
	RouteTable() RouteTableClient
	Gateway() GatewayClient
	VirtualHostOption() VirtualHostOptionClient
	RouteOption() RouteOptionClient
}

func NewApiEmitter

func NewApiEmitter(virtualServiceClient VirtualServiceClient, routeTableClient RouteTableClient, gatewayClient GatewayClient, virtualHostOptionClient VirtualHostOptionClient, routeOptionClient RouteOptionClient) ApiEmitter

func NewApiEmitterWithEmit

func NewApiEmitterWithEmit(virtualServiceClient VirtualServiceClient, routeTableClient RouteTableClient, gatewayClient GatewayClient, virtualHostOptionClient VirtualHostOptionClient, routeOptionClient RouteOptionClient, emit <-chan struct{}) ApiEmitter

type ApiSimpleEmitter added in v0.13.21

type ApiSimpleEmitter interface {
	Snapshots(ctx context.Context) (<-chan *ApiSnapshot, <-chan error, error)
}

func NewApiSimpleEmitter added in v0.13.21

func NewApiSimpleEmitter(aggregatedWatch clients.ResourceWatch) ApiSimpleEmitter

func NewApiSimpleEmitterWithEmit added in v0.13.21

func NewApiSimpleEmitterWithEmit(aggregatedWatch clients.ResourceWatch, emit <-chan struct{}) ApiSimpleEmitter

type ApiSnapshot

type ApiSnapshot struct {
	VirtualServices    VirtualServiceList
	RouteTables        RouteTableList
	Gateways           GatewayList
	VirtualHostOptions VirtualHostOptionList
	RouteOptions       RouteOptionList
}

func (ApiSnapshot) Clone

func (s ApiSnapshot) Clone() ApiSnapshot

func (ApiSnapshot) Hash

func (s ApiSnapshot) Hash(hasher hash.Hash64) (uint64, error)

func (ApiSnapshot) HashFields

func (s ApiSnapshot) HashFields() []zap.Field

func (ApiSnapshot) Stringer

func (s ApiSnapshot) Stringer() ApiSnapshotStringer

type ApiSnapshotEmitter added in v1.0.0

type ApiSnapshotEmitter interface {
	Snapshots(watchNamespaces []string, opts clients.WatchOpts) (<-chan *ApiSnapshot, <-chan error, error)
}

type ApiSnapshotStringer

type ApiSnapshotStringer struct {
	Version            uint64
	VirtualServices    []string
	RouteTables        []string
	Gateways           []string
	VirtualHostOptions []string
	RouteOptions       []string
}

func (ApiSnapshotStringer) String

func (ss ApiSnapshotStringer) String() string

type ApiSyncDecider deprecated added in v0.13.21

type ApiSyncDecider interface {
	ApiSyncer
	ShouldSync(old, new *ApiSnapshot) bool
}

Deprecated: use ApiSyncDeciderWithContext

type ApiSyncDeciderWithContext added in v0.15.0

type ApiSyncDeciderWithContext interface {
	ApiSyncer
	ShouldSync(ctx context.Context, old, new *ApiSnapshot) bool
}

type ApiSyncer

type ApiSyncer interface {
	Sync(context.Context, *ApiSnapshot) error
}

type ApiSyncers

type ApiSyncers []ApiSyncer

func (ApiSyncers) Sync

func (s ApiSyncers) Sync(ctx context.Context, snapshot *ApiSnapshot) error

type DelegateAction added in v1.2.15

type DelegateAction struct {

	// The name of the Route Table to delegate to.
	// Deprecated: these fields have been added for backwards-compatibility. Please use the `ref` field. If `name`
	// and/or `namespace` have been specified, Gloo will ignore `ref` and `selector`.
	//
	// Deprecated: Do not use.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// The namespace of the Route Table to delegate to.
	// Deprecated: these fields have been added for backwards-compatibility. Please use the `ref` field. If `name`
	// and/or `namespace` have been specified, Gloo will ignore `ref` and `selector`.
	//
	// Deprecated: Do not use.
	Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"`
	// Types that are assignable to DelegationType:
	//	*DelegateAction_Ref
	//	*DelegateAction_Selector
	DelegationType isDelegateAction_DelegationType `protobuf_oneof:"delegation_type"`
	// contains filtered or unexported fields
}

DelegateActions are used to delegate routing decisions to Route Tables.

func (*DelegateAction) Descriptor deprecated added in v1.2.15

func (*DelegateAction) Descriptor() ([]byte, []int)

Deprecated: Use DelegateAction.ProtoReflect.Descriptor instead.

func (*DelegateAction) Equal added in v1.2.15

func (m *DelegateAction) Equal(that interface{}) bool

Equal function

func (*DelegateAction) GetDelegationType added in v1.2.15

func (m *DelegateAction) GetDelegationType() isDelegateAction_DelegationType

func (*DelegateAction) GetName deprecated added in v1.2.15

func (x *DelegateAction) GetName() string

Deprecated: Do not use.

func (*DelegateAction) GetNamespace deprecated added in v1.2.15

func (x *DelegateAction) GetNamespace() string

Deprecated: Do not use.

func (*DelegateAction) GetRef added in v1.2.15

func (x *DelegateAction) GetRef() *core.ResourceRef

func (*DelegateAction) GetSelector added in v1.2.15

func (x *DelegateAction) GetSelector() *RouteTableSelector

func (*DelegateAction) Hash added in v1.2.16

func (m *DelegateAction) Hash(hasher hash.Hash64) (uint64, error)

Hash function

func (*DelegateAction) ProtoMessage added in v1.2.15

func (*DelegateAction) ProtoMessage()

func (*DelegateAction) ProtoReflect added in v1.6.0

func (x *DelegateAction) ProtoReflect() protoreflect.Message

func (*DelegateAction) Reset added in v1.2.15

func (x *DelegateAction) Reset()

func (*DelegateAction) String added in v1.2.15

func (x *DelegateAction) String() string

type DelegateAction_Ref added in v1.2.15

type DelegateAction_Ref struct {
	// Delegate to the Route Table resource with the given `name` and `namespace.
	Ref *core.ResourceRef `protobuf:"bytes,3,opt,name=ref,proto3,oneof"`
}

type DelegateAction_Selector added in v1.2.15

type DelegateAction_Selector struct {
	// Delegate to the Route Tables that match the given selector.
	Selector *RouteTableSelector `protobuf:"bytes,4,opt,name=selector,proto3,oneof"`
}

type DelegateOptionsRefs added in v1.8.0

type DelegateOptionsRefs struct {

	//
	//List of resource refs to Option CRs
	DelegateOptions []*core.ResourceRef `protobuf:"bytes,1,rep,name=delegate_options,json=delegateOptions,proto3" json:"delegate_options,omitempty"`
	// contains filtered or unexported fields
}

func (*DelegateOptionsRefs) Descriptor deprecated added in v1.8.0

func (*DelegateOptionsRefs) Descriptor() ([]byte, []int)

Deprecated: Use DelegateOptionsRefs.ProtoReflect.Descriptor instead.

func (*DelegateOptionsRefs) Equal added in v1.8.0

func (m *DelegateOptionsRefs) Equal(that interface{}) bool

Equal function

func (*DelegateOptionsRefs) GetDelegateOptions added in v1.8.0

func (x *DelegateOptionsRefs) GetDelegateOptions() []*core.ResourceRef

func (*DelegateOptionsRefs) Hash added in v1.8.0

func (m *DelegateOptionsRefs) Hash(hasher hash.Hash64) (uint64, error)

Hash function

func (*DelegateOptionsRefs) ProtoMessage added in v1.8.0

func (*DelegateOptionsRefs) ProtoMessage()

func (*DelegateOptionsRefs) ProtoReflect added in v1.8.0

func (x *DelegateOptionsRefs) ProtoReflect() protoreflect.Message

func (*DelegateOptionsRefs) Reset added in v1.8.0

func (x *DelegateOptionsRefs) Reset()

func (*DelegateOptionsRefs) String added in v1.8.0

func (x *DelegateOptionsRefs) String() string

type Gateway

type Gateway struct {

	// if set to false, only use virtual services without ssl configured.
	// if set to true, only use virtual services with ssl configured.
	Ssl bool `protobuf:"varint,1,opt,name=ssl,proto3" json:"ssl,omitempty"`
	// the bind address the gateway should serve traffic on
	BindAddress string `protobuf:"bytes,3,opt,name=bind_address,json=bindAddress,proto3" json:"bind_address,omitempty"`
	// bind ports must not conflict across gateways for a single proxy
	BindPort uint32 `protobuf:"varint,4,opt,name=bind_port,json=bindPort,proto3" json:"bind_port,omitempty"`
	// top level optional configuration for all routes on the gateway
	Options *v1.ListenerOptions `protobuf:"bytes,5,opt,name=options,proto3" json:"options,omitempty"`
	// Status indicates the validation status of this resource.
	// Status is read-only by clients, and set by gloo during validation
	Status *core.Status `protobuf:"bytes,6,opt,name=status,proto3" json:"status,omitempty"`
	// Metadata contains the object metadata for this resource
	Metadata *core.Metadata `protobuf:"bytes,7,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// Enable ProxyProtocol support for this listener
	UseProxyProto *wrappers.BoolValue `protobuf:"bytes,8,opt,name=use_proxy_proto,json=useProxyProto,proto3" json:"use_proxy_proto,omitempty"`
	// The type of gateway being created
	// HttpGateway creates a listener with an http_connection_manager
	// TcpGateway creates a listener with a tcp proxy filter
	//
	// Types that are assignable to GatewayType:
	//	*Gateway_HttpGateway
	//	*Gateway_TcpGateway
	GatewayType isGateway_GatewayType `protobuf_oneof:"GatewayType"`
	//
	// Names of the [`Proxy`](https://gloo.solo.io/api/github.com/solo-io/gloo/projects/gloo/api/v1/proxy.proto.sk/)
	// resources to generate from this gateway. If other gateways exist which point to the same proxy,
	// Gloo will join them together.
	//
	// Proxies have a one-to-many relationship with Envoy bootstrap configuration.
	// In order to connect to Gloo, the Envoy bootstrap configuration sets a `role` in
	// the [node metadata](https://www.envoyproxy.io/docs/envoy/latest/api-v2/api/v2/core/base.proto#envoy-api-msg-core-node)
	// Envoy instances announce their `role` to Gloo, which maps to the  `{{ .Namespace }}~{{ .Name }}`
	// of the Proxy resource.
	//
	// The template for this value can be seen in the [Gloo Helm chart](https://github.com/solo-io/gloo/blob/master/install/helm/gloo/templates/9-gateway-proxy-configmap.yaml#L22)
	//
	// Note: this field also accepts fields written in camel-case. They will be converted
	// to kebab-case in the Proxy name. This allows use of the [Gateway Name Helm value](https://github.com/solo-io/gloo/blob/master/install/helm/gloo/values-gateway-template.yaml#L47)
	// for this field
	//
	// Defaults to `["gateway-proxy"]`
	ProxyNames []string `protobuf:"bytes,12,rep,name=proxy_names,json=proxyNames,proto3" json:"proxy_names,omitempty"`
	//
	// Route configuration options that live under Envoy's [RouteConfigurationOptions](https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/route/v3/route.proto#config-route-v3-routeconfiguration)
	RouteOptions *v1.RouteConfigurationOptions `protobuf:"bytes,13,opt,name=route_options,json=routeOptions,proto3" json:"route_options,omitempty"`
	// contains filtered or unexported fields
}

A Gateway describes a single Listener (bind address:port) and the routing configuration to upstreams that are reachable via a specific port on the Gateway Proxy itself.

func NewGateway

func NewGateway(namespace, name string) *Gateway

func (*Gateway) DeepCopyInto added in v0.20.9

func (o *Gateway) DeepCopyInto(out *Gateway)

func (*Gateway) DeepCopyObject

func (o *Gateway) DeepCopyObject() runtime.Object

func (*Gateway) Descriptor deprecated

func (*Gateway) Descriptor() ([]byte, []int)

Deprecated: Use Gateway.ProtoReflect.Descriptor instead.

func (*Gateway) Equal

func (m *Gateway) Equal(that interface{}) bool

Equal function

func (*Gateway) GetBindAddress

func (x *Gateway) GetBindAddress() string

func (*Gateway) GetBindPort

func (x *Gateway) GetBindPort() uint32

func (*Gateway) GetGatewayType added in v1.0.0

func (m *Gateway) GetGatewayType() isGateway_GatewayType

func (*Gateway) GetHttpGateway added in v1.0.0

func (x *Gateway) GetHttpGateway() *HttpGateway

func (*Gateway) GetMetadata

func (x *Gateway) GetMetadata() *core.Metadata

func (*Gateway) GetObjectKind

func (o *Gateway) GetObjectKind() schema.ObjectKind

func (*Gateway) GetOptions added in v1.0.0

func (x *Gateway) GetOptions() *v1.ListenerOptions

func (*Gateway) GetProxyNames added in v1.0.0

func (x *Gateway) GetProxyNames() []string

func (*Gateway) GetRouteOptions added in v1.7.7

func (x *Gateway) GetRouteOptions() *v1.RouteConfigurationOptions

func (*Gateway) GetSsl

func (x *Gateway) GetSsl() bool

func (*Gateway) GetStatus

func (x *Gateway) GetStatus() *core.Status

func (*Gateway) GetTcpGateway added in v1.0.0

func (x *Gateway) GetTcpGateway() *TcpGateway

func (*Gateway) GetUseProxyProto added in v0.13.15

func (x *Gateway) GetUseProxyProto() *wrappers.BoolValue

func (*Gateway) GroupVersionKind added in v0.18.0

func (r *Gateway) GroupVersionKind() schema.GroupVersionKind

func (*Gateway) Hash

func (m *Gateway) Hash(hasher hash.Hash64) (uint64, error)

Hash function

func (*Gateway) MustHash added in v1.2.13

func (r *Gateway) MustHash() uint64

func (*Gateway) ProtoMessage

func (*Gateway) ProtoMessage()

func (*Gateway) ProtoReflect added in v1.6.0

func (x *Gateway) ProtoReflect() protoreflect.Message

func (*Gateway) Reset

func (x *Gateway) Reset()

func (*Gateway) SetMetadata

func (r *Gateway) SetMetadata(meta *core.Metadata)

func (*Gateway) SetStatus

func (r *Gateway) SetStatus(status *core.Status)

func (*Gateway) String

func (x *Gateway) String() string

type GatewayClient

type GatewayClient interface {
	BaseClient() clients.ResourceClient
	Register() error
	Read(namespace, name string, opts clients.ReadOpts) (*Gateway, error)
	Write(resource *Gateway, opts clients.WriteOpts) (*Gateway, error)
	Delete(namespace, name string, opts clients.DeleteOpts) error
	List(namespace string, opts clients.ListOpts) (GatewayList, error)
	GatewayWatcher
}

func NewGatewayClient

func NewGatewayClient(ctx context.Context, rcFactory factory.ResourceClientFactory) (GatewayClient, error)

func NewGatewayClientWithBase

func NewGatewayClientWithBase(rc clients.ResourceClient) GatewayClient

func NewGatewayClientWithToken

func NewGatewayClientWithToken(ctx context.Context, rcFactory factory.ResourceClientFactory, token string) (GatewayClient, error)

type GatewayList

type GatewayList []*Gateway

func (GatewayList) AsInputResources

func (list GatewayList) AsInputResources() resources.InputResourceList

func (GatewayList) AsInterfaces

func (list GatewayList) AsInterfaces() []interface{}

func (GatewayList) AsResources

func (list GatewayList) AsResources() resources.ResourceList

func (GatewayList) Clone

func (list GatewayList) Clone() GatewayList

func (GatewayList) Each

func (list GatewayList) Each(f func(element *Gateway))

func (GatewayList) EachResource added in v0.13.21

func (list GatewayList) EachResource(f func(element resources.Resource))

func (GatewayList) Find

func (list GatewayList) Find(namespace, name string) (*Gateway, error)

func (GatewayList) Names

func (list GatewayList) Names() []string

func (GatewayList) NamespacesDotNames

func (list GatewayList) NamespacesDotNames() []string

func (GatewayList) Sort

func (list GatewayList) Sort() GatewayList

type GatewayReconciler

type GatewayReconciler interface {
	Reconcile(namespace string, desiredResources GatewayList, transition TransitionGatewayFunc, opts clients.ListOpts) error
}

func NewGatewayReconciler

func NewGatewayReconciler(client GatewayClient) GatewayReconciler

type GatewayWatcher added in v0.13.21

type GatewayWatcher interface {
	// watch namespace-scoped Gateways
	Watch(namespace string, opts clients.WatchOpts) (<-chan GatewayList, <-chan error, error)
}

type Gateway_HttpGateway added in v1.0.0

type Gateway_HttpGateway struct {
	HttpGateway *HttpGateway `protobuf:"bytes,9,opt,name=http_gateway,json=httpGateway,proto3,oneof"`
}

type Gateway_TcpGateway added in v1.0.0

type Gateway_TcpGateway struct {
	TcpGateway *TcpGateway `protobuf:"bytes,10,opt,name=tcp_gateway,json=tcpGateway,proto3,oneof"`
}

type HttpGateway added in v1.0.0

type HttpGateway struct {

	// Names & namespace refs of the virtual services which contain the actual routes for the gateway.
	// If the list is empty, all virtual services in all namespaces that Gloo watches will apply,
	// with accordance to `ssl` flag on `Gateway` above.
	// The default namespace matching behavior can be overridden via `virtual_service_namespaces` flag below.
	// Only one of `virtualServices`, `virtualServiceExpressions` or `virtualServiceSelector` should be provided.
	// If more than one is provided only one will be checked with priority virtualServiceExpressions, virtualServiceSelector, virtualServices
	VirtualServices []*core.ResourceRef `protobuf:"bytes,1,rep,name=virtual_services,json=virtualServices,proto3" json:"virtual_services,omitempty"`
	// Select virtual services by their label. If `virtual_service_namespaces` is provided below, this will apply only
	// to virtual services in the namespaces specified.
	// Only one of `virtualServices`, `virtualServiceExpressions` or `virtualServiceSelector` should be provided.
	// If more than one is provided only one will be checked with priority virtualServiceExpressions, virtualServiceSelector, virtualServices
	VirtualServiceSelector map[string]string `` /* 217-byte string literal not displayed */
	// Select virtual services using expressions. If `virtual_service_namespaces` is provided below, this will apply only
	// to virtual services in the namespaces specified.
	// Only one of `virtualServices`, `virtualServiceExpressions` or `virtualServiceSelector` should be provided.
	// If more than one is provided only one will be checked with priority virtualServiceExpressions, virtualServiceSelector, virtualServices
	VirtualServiceExpressions *VirtualServiceSelectorExpressions `` /* 138-byte string literal not displayed */
	// Restrict the search by providing a list of valid search namespaces here.
	// Setting '*' will search all namespaces, equivalent to omitting this value.
	VirtualServiceNamespaces []string `` /* 135-byte string literal not displayed */
	// HTTP Gateway configuration
	Options *v1.HttpListenerOptions `protobuf:"bytes,8,opt,name=options,proto3" json:"options,omitempty"`
	// contains filtered or unexported fields
}

func (*HttpGateway) Descriptor deprecated added in v1.0.0

func (*HttpGateway) Descriptor() ([]byte, []int)

Deprecated: Use HttpGateway.ProtoReflect.Descriptor instead.

func (*HttpGateway) Equal added in v1.0.0

func (m *HttpGateway) Equal(that interface{}) bool

Equal function

func (*HttpGateway) GetOptions added in v1.0.0

func (x *HttpGateway) GetOptions() *v1.HttpListenerOptions

func (*HttpGateway) GetVirtualServiceExpressions added in v1.8.1

func (x *HttpGateway) GetVirtualServiceExpressions() *VirtualServiceSelectorExpressions

func (*HttpGateway) GetVirtualServiceNamespaces added in v1.2.0

func (x *HttpGateway) GetVirtualServiceNamespaces() []string

func (*HttpGateway) GetVirtualServiceSelector added in v1.0.0

func (x *HttpGateway) GetVirtualServiceSelector() map[string]string

func (*HttpGateway) GetVirtualServices added in v1.0.0

func (x *HttpGateway) GetVirtualServices() []*core.ResourceRef

func (*HttpGateway) Hash added in v1.2.13

func (m *HttpGateway) Hash(hasher hash.Hash64) (uint64, error)

Hash function

func (*HttpGateway) ProtoMessage added in v1.0.0

func (*HttpGateway) ProtoMessage()

func (*HttpGateway) ProtoReflect added in v1.6.0

func (x *HttpGateway) ProtoReflect() protoreflect.Message

func (*HttpGateway) Reset added in v1.0.0

func (x *HttpGateway) Reset()

func (*HttpGateway) String added in v1.0.0

func (x *HttpGateway) String() string

type Route added in v0.18.32

type Route struct {

	// Matchers contain parameters for matching requests (i.e., based on HTTP path, headers, etc.).
	// If empty, the route will match all requests (i.e, a single "/" path prefix matcher).
	// For delegated routes, any parent matcher must have a `prefix` path matcher.
	Matchers []*matchers.Matcher `protobuf:"bytes,1,rep,name=matchers,proto3" json:"matchers,omitempty"`
	// Whether this route as a child should inherit headers, methods, and query parameter matchers from the parent.
	// Defaults to value of parent; for virtual services (no parent) defaults to false.
	InheritableMatchers *wrappers.BoolValue `protobuf:"bytes,8,opt,name=inheritable_matchers,json=inheritableMatchers,proto3" json:"inheritable_matchers,omitempty"`
	// Whether this route as a child should inherit path matchers (i.e., path itself, case-sensitive setting) from
	// the parent. Defaults to value of parent; for virtual services (no parent) defaults to false.
	InheritablePathMatchers *wrappers.BoolValue `` /* 132-byte string literal not displayed */
	// The Route Action Defines what action the proxy should take when a request matches the route.
	//
	// Types that are assignable to Action:
	//	*Route_RouteAction
	//	*Route_RedirectAction
	//	*Route_DirectResponseAction
	//	*Route_DelegateAction
	Action isRoute_Action `protobuf_oneof:"action"`
	// Route Options extend the behavior of routes.
	// Route options include configuration such as retries, rate limiting, and request/response transformation.
	// RouteOption behavior will be inherited by delegated routes which do not specify their own `options`
	Options *v1.RouteOptions `protobuf:"bytes,6,opt,name=options,proto3" json:"options,omitempty"`
	// The name provides a convenience for users to be able to refer to a route by name.
	Name string `protobuf:"bytes,7,opt,name=name,proto3" json:"name,omitempty"`
	// Types that are assignable to ExternalOptionsConfig:
	//	*Route_OptionsConfigRefs
	ExternalOptionsConfig isRoute_ExternalOptionsConfig `protobuf_oneof:"external_options_config"`
	// contains filtered or unexported fields
}

A route specifies how to match a request and what action to take when the request is matched.

When a request matches on a route, the route can perform one of the following actions: - *Route* the request to a destination - Reply with a *Direct Response* - Send a *Redirect* response to the client - *Delegate* the action for the request to one or more top-level [`RouteTable`]({{< ref "/reference/api/github.com/solo-io/gloo/projects/gateway/api/v1/route_table.proto.sk.md" >}}) resources DelegateActions can be used to delegate the behavior for a set out routes with a given *prefix* to top-level `RouteTable` resources.

func (*Route) Descriptor deprecated added in v0.18.32

func (*Route) Descriptor() ([]byte, []int)

Deprecated: Use Route.ProtoReflect.Descriptor instead.

func (*Route) Equal added in v0.18.32

func (m *Route) Equal(that interface{}) bool

Equal function

func (*Route) GetAction added in v0.18.32

func (m *Route) GetAction() isRoute_Action

func (*Route) GetDelegateAction added in v0.18.32

func (x *Route) GetDelegateAction() *DelegateAction

func (*Route) GetDirectResponseAction added in v0.18.32

func (x *Route) GetDirectResponseAction() *v1.DirectResponseAction

func (*Route) GetExternalOptionsConfig added in v1.8.0

func (m *Route) GetExternalOptionsConfig() isRoute_ExternalOptionsConfig

func (*Route) GetInheritableMatchers added in v1.5.0

func (x *Route) GetInheritableMatchers() *wrappers.BoolValue

func (*Route) GetInheritablePathMatchers added in v1.6.0

func (x *Route) GetInheritablePathMatchers() *wrappers.BoolValue

func (*Route) GetMatchers added in v1.0.0

func (x *Route) GetMatchers() []*matchers.Matcher

func (*Route) GetName added in v1.3.4

func (x *Route) GetName() string

func (*Route) GetOptions added in v1.0.0

func (x *Route) GetOptions() *v1.RouteOptions

func (*Route) GetOptionsConfigRefs added in v1.8.0

func (x *Route) GetOptionsConfigRefs() *DelegateOptionsRefs

func (*Route) GetRedirectAction added in v0.18.32

func (x *Route) GetRedirectAction() *v1.RedirectAction

func (*Route) GetRouteAction added in v0.18.32

func (x *Route) GetRouteAction() *v1.RouteAction

func (*Route) Hash added in v1.2.13

func (m *Route) Hash(hasher hash.Hash64) (uint64, error)

Hash function

func (*Route) ProtoMessage added in v0.18.32

func (*Route) ProtoMessage()

func (*Route) ProtoReflect added in v1.6.0

func (x *Route) ProtoReflect() protoreflect.Message

func (*Route) Reset added in v0.18.32

func (x *Route) Reset()

func (*Route) String added in v0.18.32

func (x *Route) String() string

type RouteOption added in v1.8.0

type RouteOption struct {

	// Status indicates the validation status of this resource.
	// Status is read-only by clients, and set by gloo during validation
	Status *core.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	// Metadata contains the object metadata for this resource
	Metadata *core.Metadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// Route options. See Route for delegation behavior.
	Options *v1.RouteOptions `protobuf:"bytes,3,opt,name=options,proto3" json:"options,omitempty"`
	// contains filtered or unexported fields
}

The **RouteOption** holds `options` configuration for a Route. Routes can inherit `options` config from `RouteOption` objects by delegating to them.

When a Route delegates to an external RouteOptions object, any options config defined on the Route will override the external options config. Similarly, `RouteOption`s which are delegated to first will get priority over following `RouteOption`s.

An example configuration with a Route with its own options config and delegating to two RouteOption objects:

```yaml apiVersion: gateway.solo.io/v1 kind: VirtualService metadata:

name: http
namespace: gloo-system

spec:

virtualHost:
  domains:
  - '*'
  routes:
  - matchers:
    - prefix: /
    options:
      headerManipulation:
        requestHeadersToRemove: "header-from-route"
    delegateOptions:
      - name: route-external-options-1
        namespace: opt-namespace
      - name: route-external-options-2
        namespace: opt-namespace

```

```yaml apiVersion: gateway.solo.io/v1 kind: RouteOption metadata:

name: route-external-options-1
namespace: opt-namespace

spec:

options:
  headerManipulation:
    requestHeadersToRemove: "header-from-external-options1"
  corsPolicy:
    exposeHeaders:
      - header-from-extopt1

```

```yaml apiVersion: gateway.solo.io/v1 kind: RouteOption metadata:

name: route-external-options-2
namespace: opt-namespace

spec:

options:
  headerManipulation:
    requestHeadersToRemove: "header-from-external-options2"
  corsPolicy:
    exposeHeaders:
      - header-from-extopt2
    maxAge: 2s
  transformations:
    requestTransformation:
      transformationTemplate:
        headers:
          x-header-added-in-opt2:
            value: this header was added in the RouteOption object - #2

```

The final route options would bewould be: ```yaml routes:

  • matchers:
  • prefix: / options: # from Route options headerManipulation: requestHeadersToRemove: "header-from-route" # from delegated route-external-options-1 corsPolicy: exposeHeaders:
  • header-from-extopt1 # from delegated route-external-options-2 transformations: requestTransformation: transformationTemplate: headers: x-header-added-in-opt2: value: this header was added in the Route object - #2

```

Notice how the order of RouteOption delegations matters, and that the Route-level option config overrides all delegated option configs.

func NewRouteOption added in v1.8.0

func NewRouteOption(namespace, name string) *RouteOption

func (*RouteOption) DeepCopyInto added in v1.8.0

func (o *RouteOption) DeepCopyInto(out *RouteOption)

func (*RouteOption) DeepCopyObject added in v1.8.0

func (o *RouteOption) DeepCopyObject() runtime.Object

func (*RouteOption) Descriptor deprecated added in v1.8.0

func (*RouteOption) Descriptor() ([]byte, []int)

Deprecated: Use RouteOption.ProtoReflect.Descriptor instead.

func (*RouteOption) Equal added in v1.8.0

func (m *RouteOption) Equal(that interface{}) bool

Equal function

func (*RouteOption) GetMetadata added in v1.8.0

func (x *RouteOption) GetMetadata() *core.Metadata

func (*RouteOption) GetObjectKind added in v1.8.0

func (o *RouteOption) GetObjectKind() schema.ObjectKind

func (*RouteOption) GetOptions added in v1.8.0

func (x *RouteOption) GetOptions() *v1.RouteOptions

func (*RouteOption) GetStatus added in v1.8.0

func (x *RouteOption) GetStatus() *core.Status

func (*RouteOption) GroupVersionKind added in v1.8.0

func (r *RouteOption) GroupVersionKind() schema.GroupVersionKind

func (*RouteOption) Hash added in v1.8.0

func (m *RouteOption) Hash(hasher hash.Hash64) (uint64, error)

Hash function

func (*RouteOption) MustHash added in v1.8.0

func (r *RouteOption) MustHash() uint64

func (*RouteOption) ProtoMessage added in v1.8.0

func (*RouteOption) ProtoMessage()

func (*RouteOption) ProtoReflect added in v1.8.0

func (x *RouteOption) ProtoReflect() protoreflect.Message

func (*RouteOption) Reset added in v1.8.0

func (x *RouteOption) Reset()

func (*RouteOption) SetMetadata added in v1.8.0

func (r *RouteOption) SetMetadata(meta *core.Metadata)

func (*RouteOption) SetStatus added in v1.8.0

func (r *RouteOption) SetStatus(status *core.Status)

func (*RouteOption) String added in v1.8.0

func (x *RouteOption) String() string

type RouteOptionClient added in v1.8.0

type RouteOptionClient interface {
	BaseClient() clients.ResourceClient
	Register() error
	Read(namespace, name string, opts clients.ReadOpts) (*RouteOption, error)
	Write(resource *RouteOption, opts clients.WriteOpts) (*RouteOption, error)
	Delete(namespace, name string, opts clients.DeleteOpts) error
	List(namespace string, opts clients.ListOpts) (RouteOptionList, error)
	RouteOptionWatcher
}

func NewRouteOptionClient added in v1.8.0

func NewRouteOptionClient(ctx context.Context, rcFactory factory.ResourceClientFactory) (RouteOptionClient, error)

func NewRouteOptionClientWithBase added in v1.8.0

func NewRouteOptionClientWithBase(rc clients.ResourceClient) RouteOptionClient

func NewRouteOptionClientWithToken added in v1.8.0

func NewRouteOptionClientWithToken(ctx context.Context, rcFactory factory.ResourceClientFactory, token string) (RouteOptionClient, error)

type RouteOptionList added in v1.8.0

type RouteOptionList []*RouteOption

func (RouteOptionList) AsInputResources added in v1.8.0

func (list RouteOptionList) AsInputResources() resources.InputResourceList

func (RouteOptionList) AsInterfaces added in v1.8.0

func (list RouteOptionList) AsInterfaces() []interface{}

func (RouteOptionList) AsResources added in v1.8.0

func (list RouteOptionList) AsResources() resources.ResourceList

func (RouteOptionList) Clone added in v1.8.0

func (list RouteOptionList) Clone() RouteOptionList

func (RouteOptionList) Each added in v1.8.0

func (list RouteOptionList) Each(f func(element *RouteOption))

func (RouteOptionList) EachResource added in v1.8.0

func (list RouteOptionList) EachResource(f func(element resources.Resource))

func (RouteOptionList) Find added in v1.8.0

func (list RouteOptionList) Find(namespace, name string) (*RouteOption, error)

func (RouteOptionList) Names added in v1.8.0

func (list RouteOptionList) Names() []string

func (RouteOptionList) NamespacesDotNames added in v1.8.0

func (list RouteOptionList) NamespacesDotNames() []string

func (RouteOptionList) Sort added in v1.8.0

func (list RouteOptionList) Sort() RouteOptionList

type RouteOptionReconciler added in v1.8.0

type RouteOptionReconciler interface {
	Reconcile(namespace string, desiredResources RouteOptionList, transition TransitionRouteOptionFunc, opts clients.ListOpts) error
}

func NewRouteOptionReconciler added in v1.8.0

func NewRouteOptionReconciler(client RouteOptionClient) RouteOptionReconciler

type RouteOptionWatcher added in v1.8.0

type RouteOptionWatcher interface {
	// watch namespace-scoped RouteOptions
	Watch(namespace string, opts clients.WatchOpts) (<-chan RouteOptionList, <-chan error, error)
}

type RouteTable added in v0.18.32

type RouteTable struct {

	// The list of routes for the route table
	Routes []*Route `protobuf:"bytes,1,rep,name=routes,proto3" json:"routes,omitempty"`
	// When a delegated route defines a `RouteTableSelector` that matches multiple route tables, Gloo will inspect this
	// field to determine the order in which the route tables are to be evaluated. This determines the order in which
	// the routes will appear on the final `Proxy` resource. The field is optional; if no value is specified, the weight
	// defaults to 0 (zero).
	//
	// Gloo will process the route tables matched by a selector in ascending order by weight and collect the routes of
	// each route table in the order they are defined. If multiple route tables define the same weight, Gloo will sort the
	// routes which belong to those tables to avoid short-circuiting (e.g. making sure `/foo/bar` comes before `/foo`).
	// In this scenario, Gloo will also alert the user by adding a warning to the status of the parent resource
	// (the one that specifies the `RouteTableSelector`).
	Weight *wrappers.Int32Value `protobuf:"bytes,2,opt,name=weight,proto3" json:"weight,omitempty"`
	// Status indicates the validation status of this resource.
	// Status is read-only by clients, and set by gloo during validation
	Status *core.Status `protobuf:"bytes,6,opt,name=status,proto3" json:"status,omitempty"`
	// Metadata contains the object metadata for this resource
	Metadata *core.Metadata `protobuf:"bytes,7,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// contains filtered or unexported fields
}

The **RouteTable** is a child routing object for the Gloo Gateway.

A **RouteTable** gets built into the complete routing configuration when it is referenced by a `delegateAction`, either in a parent VirtualService or another RouteTable.

Routes specified in a RouteTable must have their paths start with the prefix provided in the parent's matcher.

For example, the following configuration:

``` virtualService: mydomain.com match: /a delegate: a-routes --- routeTable: a-routes match: /1

```

would *not be valid*, while

``` virtualService: mydomain.com match: /a delegate: a-routes --- routeTable: a-routes match: /a/1

```

*would* be valid.

A complete configuration might look as follows:

```yaml apiVersion: gateway.solo.io/v1 kind: VirtualService metadata:

name: 'any'
namespace: 'any'

spec:

virtualHost:
  domains:
  - 'any.com'
  routes:
  - matchers:
    - prefix: '/a' # delegate ownership of routes for `any.com/a`
    delegateAction:
      ref:
        name: 'a-routes'
        namespace: 'a'
  - matchers:
    - prefix: '/b' # delegate ownership of routes for `any.com/b`
    delegateAction:
      ref:
        name: 'b-routes'
        namespace: 'b'

```

* A root-level **VirtualService** which delegates routing to to the `a-routes` and `b-routes` **RouteTables**. * Routes with `delegateActions` can only use a `prefix` matcher.

```yaml apiVersion: gateway.solo.io/v1 kind: RouteTable metadata:

name: 'a-routes'
namespace: 'a'

spec:

routes:
  - matchers:
    # the path matchers in this RouteTable must begin with the prefix `/a/`
    - prefix: '/a/1'
    routeAction:
      single:
        upstream:
          name: 'foo-upstream'

  - matchers:
    - prefix: '/a/2'
    routeAction:
      single:
        upstream:
          name: 'bar-upstream'

```

* A **RouteTable** which defines two routes.

```yaml apiVersion: gateway.solo.io/v1 kind: RouteTable metadata:

name: 'b-routes'
namespace: 'b'

spec:

routes:
  - matchers:
    # the path matchers in this RouteTable must begin with the prefix `/b/`
    - regex: '/b/3'
    routeAction:
      single:
        upstream:
          name: 'bar-upstream'
  - matchers:
    - prefix: '/b/c/'
    # routes in the RouteTable can perform any action, including a delegateAction
    delegateAction:
      ref:
        name: 'c-routes'
        namespace: 'c'

```

* A **RouteTable** which both *defines a route* and *delegates to* another **RouteTable**.

```yaml apiVersion: gateway.solo.io/v1 kind: RouteTable metadata:

name: 'c-routes'
namespace: 'c'

spec:

routes:
  - matchers:
    - exact: '/b/c/4'
    routeAction:
      single:
        upstream:
          name: 'qux-upstream'

```

* A RouteTable which is a child of another route table.

Would produce the following route config for `mydomain.com`:

``` /a/1 -> foo-upstream /a/2 -> bar-upstream /b/3 -> baz-upstream /b/c/4 -> qux-upstream ```

func NewRouteTable added in v0.18.32

func NewRouteTable(namespace, name string) *RouteTable

func (*RouteTable) DeepCopyInto added in v0.20.9

func (o *RouteTable) DeepCopyInto(out *RouteTable)

func (*RouteTable) DeepCopyObject added in v0.18.32

func (o *RouteTable) DeepCopyObject() runtime.Object

func (*RouteTable) Descriptor deprecated added in v0.18.32

func (*RouteTable) Descriptor() ([]byte, []int)

Deprecated: Use RouteTable.ProtoReflect.Descriptor instead.

func (*RouteTable) Equal added in v0.18.32

func (m *RouteTable) Equal(that interface{}) bool

Equal function

func (*RouteTable) GetMetadata added in v0.18.32

func (x *RouteTable) GetMetadata() *core.Metadata

func (*RouteTable) GetObjectKind added in v0.18.32

func (o *RouteTable) GetObjectKind() schema.ObjectKind

func (*RouteTable) GetRoutes added in v0.18.32

func (x *RouteTable) GetRoutes() []*Route

func (*RouteTable) GetStatus added in v0.18.32

func (x *RouteTable) GetStatus() *core.Status

func (*RouteTable) GetWeight added in v1.3.5

func (x *RouteTable) GetWeight() *wrappers.Int32Value

func (*RouteTable) GroupVersionKind added in v0.18.32

func (r *RouteTable) GroupVersionKind() schema.GroupVersionKind

func (*RouteTable) Hash added in v0.18.32

func (m *RouteTable) Hash(hasher hash.Hash64) (uint64, error)

Hash function

func (*RouteTable) MustHash added in v1.2.13

func (r *RouteTable) MustHash() uint64

func (*RouteTable) ProtoMessage added in v0.18.32

func (*RouteTable) ProtoMessage()

func (*RouteTable) ProtoReflect added in v1.6.0

func (x *RouteTable) ProtoReflect() protoreflect.Message

func (*RouteTable) Reset added in v0.18.32

func (x *RouteTable) Reset()

func (*RouteTable) SetMetadata added in v0.18.32

func (r *RouteTable) SetMetadata(meta *core.Metadata)

func (*RouteTable) SetStatus added in v0.18.32

func (r *RouteTable) SetStatus(status *core.Status)

func (*RouteTable) String added in v0.18.32

func (x *RouteTable) String() string

type RouteTableClient added in v0.18.32

type RouteTableClient interface {
	BaseClient() clients.ResourceClient
	Register() error
	Read(namespace, name string, opts clients.ReadOpts) (*RouteTable, error)
	Write(resource *RouteTable, opts clients.WriteOpts) (*RouteTable, error)
	Delete(namespace, name string, opts clients.DeleteOpts) error
	List(namespace string, opts clients.ListOpts) (RouteTableList, error)
	RouteTableWatcher
}

func NewRouteTableClient added in v0.18.32

func NewRouteTableClient(ctx context.Context, rcFactory factory.ResourceClientFactory) (RouteTableClient, error)

func NewRouteTableClientWithBase added in v0.18.32

func NewRouteTableClientWithBase(rc clients.ResourceClient) RouteTableClient

func NewRouteTableClientWithToken added in v0.18.32

func NewRouteTableClientWithToken(ctx context.Context, rcFactory factory.ResourceClientFactory, token string) (RouteTableClient, error)

type RouteTableList added in v0.18.32

type RouteTableList []*RouteTable

func (RouteTableList) AsInputResources added in v0.18.32

func (list RouteTableList) AsInputResources() resources.InputResourceList

func (RouteTableList) AsInterfaces added in v0.18.32

func (list RouteTableList) AsInterfaces() []interface{}

func (RouteTableList) AsResources added in v0.18.32

func (list RouteTableList) AsResources() resources.ResourceList

func (RouteTableList) Clone added in v0.18.32

func (list RouteTableList) Clone() RouteTableList

func (RouteTableList) Each added in v0.18.32

func (list RouteTableList) Each(f func(element *RouteTable))

func (RouteTableList) EachResource added in v0.18.32

func (list RouteTableList) EachResource(f func(element resources.Resource))

func (RouteTableList) Find added in v0.18.32

func (list RouteTableList) Find(namespace, name string) (*RouteTable, error)

func (RouteTableList) Names added in v0.18.32

func (list RouteTableList) Names() []string

func (RouteTableList) NamespacesDotNames added in v0.18.32

func (list RouteTableList) NamespacesDotNames() []string

func (RouteTableList) Sort added in v0.18.32

func (list RouteTableList) Sort() RouteTableList

type RouteTableReconciler added in v0.18.32

type RouteTableReconciler interface {
	Reconcile(namespace string, desiredResources RouteTableList, transition TransitionRouteTableFunc, opts clients.ListOpts) error
}

func NewRouteTableReconciler added in v0.18.32

func NewRouteTableReconciler(client RouteTableClient) RouteTableReconciler

type RouteTableSelector added in v1.2.15

type RouteTableSelector struct {

	// Delegate to Route Tables in these namespaces. If omitted, Gloo will only select Route Tables in the same namespace
	// as the resource (Virtual Service or Route Table) that owns this selector. The reserved value "*" can be used to
	// select Route Tables in all namespaces watched by Gloo.
	Namespaces []string `protobuf:"bytes,1,rep,name=namespaces,proto3" json:"namespaces,omitempty"`
	// Delegate to Route Tables whose labels match the ones specified here.
	Labels map[string]string `` /* 153-byte string literal not displayed */
	// Expressions allow for more flexible Route Tables label matching, such as equality-based requirements, set-based requirements, or a combination of both.
	// https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#equality-based-requirement
	Expressions []*RouteTableSelector_Expression `protobuf:"bytes,3,rep,name=expressions,proto3" json:"expressions,omitempty"`
	// contains filtered or unexported fields
}

Select route tables for delegation by namespace, labels, or both.

func (*RouteTableSelector) Descriptor deprecated added in v1.2.15

func (*RouteTableSelector) Descriptor() ([]byte, []int)

Deprecated: Use RouteTableSelector.ProtoReflect.Descriptor instead.

func (*RouteTableSelector) Equal added in v1.2.15

func (m *RouteTableSelector) Equal(that interface{}) bool

Equal function

func (*RouteTableSelector) GetExpressions added in v1.5.0

func (x *RouteTableSelector) GetExpressions() []*RouteTableSelector_Expression

func (*RouteTableSelector) GetLabels added in v1.2.15

func (x *RouteTableSelector) GetLabels() map[string]string

func (*RouteTableSelector) GetNamespaces added in v1.2.15

func (x *RouteTableSelector) GetNamespaces() []string

func (*RouteTableSelector) Hash added in v1.2.16

func (m *RouteTableSelector) Hash(hasher hash.Hash64) (uint64, error)

Hash function

func (*RouteTableSelector) ProtoMessage added in v1.2.15

func (*RouteTableSelector) ProtoMessage()

func (*RouteTableSelector) ProtoReflect added in v1.6.0

func (x *RouteTableSelector) ProtoReflect() protoreflect.Message

func (*RouteTableSelector) Reset added in v1.2.15

func (x *RouteTableSelector) Reset()

func (*RouteTableSelector) String added in v1.2.15

func (x *RouteTableSelector) String() string

type RouteTableSelector_Expression added in v1.5.0

type RouteTableSelector_Expression struct {

	// Kubernetes label key, must conform to Kubernetes syntax requirements
	// https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#syntax-and-character-set
	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// The operator can only be in, notin, =, ==, !=, exists, ! (DoesNotExist), gt (GreaterThan), lt (LessThan).
	Operator RouteTableSelector_Expression_Operator `` /* 130-byte string literal not displayed */
	Values   []string                               `protobuf:"bytes,3,rep,name=values,proto3" json:"values,omitempty"`
	// contains filtered or unexported fields
}

func (*RouteTableSelector_Expression) Descriptor deprecated added in v1.5.0

func (*RouteTableSelector_Expression) Descriptor() ([]byte, []int)

Deprecated: Use RouteTableSelector_Expression.ProtoReflect.Descriptor instead.

func (*RouteTableSelector_Expression) Equal added in v1.5.0

func (m *RouteTableSelector_Expression) Equal(that interface{}) bool

Equal function

func (*RouteTableSelector_Expression) GetKey added in v1.5.0

func (*RouteTableSelector_Expression) GetOperator added in v1.5.0

func (*RouteTableSelector_Expression) GetValues added in v1.5.0

func (x *RouteTableSelector_Expression) GetValues() []string

func (*RouteTableSelector_Expression) Hash added in v1.5.0

Hash function

func (*RouteTableSelector_Expression) ProtoMessage added in v1.5.0

func (*RouteTableSelector_Expression) ProtoMessage()

func (*RouteTableSelector_Expression) ProtoReflect added in v1.6.0

func (*RouteTableSelector_Expression) Reset added in v1.5.0

func (x *RouteTableSelector_Expression) Reset()

func (*RouteTableSelector_Expression) String added in v1.5.0

type RouteTableSelector_Expression_Operator added in v1.5.0

type RouteTableSelector_Expression_Operator int32

Route Table Selector expression operator, while the set-based syntax differs from Kubernetes (kubernetes: `key: !mylabel`, gloo: `key: mylabel, operator: "!"` | kubernetes: `key: mylabel`, gloo: `key: mylabel, operator: exists`), the functionality remains the same.

const (
	// =
	RouteTableSelector_Expression_Equals RouteTableSelector_Expression_Operator = 0
	// ==
	RouteTableSelector_Expression_DoubleEquals RouteTableSelector_Expression_Operator = 1
	// !=
	RouteTableSelector_Expression_NotEquals RouteTableSelector_Expression_Operator = 2
	// in
	RouteTableSelector_Expression_In RouteTableSelector_Expression_Operator = 3
	// notin
	RouteTableSelector_Expression_NotIn RouteTableSelector_Expression_Operator = 4
	// exists
	RouteTableSelector_Expression_Exists RouteTableSelector_Expression_Operator = 5
	// !
	RouteTableSelector_Expression_DoesNotExist RouteTableSelector_Expression_Operator = 6
	// gt
	RouteTableSelector_Expression_GreaterThan RouteTableSelector_Expression_Operator = 7
	// lt
	RouteTableSelector_Expression_LessThan RouteTableSelector_Expression_Operator = 8
)

func (RouteTableSelector_Expression_Operator) Descriptor added in v1.6.0

func (RouteTableSelector_Expression_Operator) Enum added in v1.6.0

func (RouteTableSelector_Expression_Operator) EnumDescriptor deprecated added in v1.5.0

func (RouteTableSelector_Expression_Operator) EnumDescriptor() ([]byte, []int)

Deprecated: Use RouteTableSelector_Expression_Operator.Descriptor instead.

func (RouteTableSelector_Expression_Operator) Number added in v1.6.0

func (RouteTableSelector_Expression_Operator) String added in v1.5.0

func (RouteTableSelector_Expression_Operator) Type added in v1.6.0

type RouteTableWatcher added in v0.18.32

type RouteTableWatcher interface {
	// watch namespace-scoped RouteTables
	Watch(namespace string, opts clients.WatchOpts) (<-chan RouteTableList, <-chan error, error)
}

type Route_DelegateAction added in v0.18.32

type Route_DelegateAction struct {
	// Delegate routing actions for the given matcher to one or more RouteTables.
	DelegateAction *DelegateAction `protobuf:"bytes,5,opt,name=delegate_action,json=delegateAction,proto3,oneof"`
}

type Route_DirectResponseAction added in v0.18.32

type Route_DirectResponseAction struct {
	// Return an arbitrary HTTP response directly, without proxying.
	DirectResponseAction *v1.DirectResponseAction `protobuf:"bytes,4,opt,name=direct_response_action,json=directResponseAction,proto3,oneof"`
}

type Route_OptionsConfigRefs added in v1.8.0

type Route_OptionsConfigRefs struct {
	// Delegate the Route options to an external RouteOption Resource.
	//Any options configured in the Route's `options` field will override all
	//delegated options. If multiple RouteOption CRs are delegated to, configuration will
	//be taken from prior RouteOption CRs over later ones.
	//For example if `headerManipulation` is specified on the route options, a delegated
	//`RouteOption` route-opt-1, and a second delegated `RouteOption` route-opt-2, the `headerManipulation`
	//config from only the Route-level `options` will be applied. If the config is removed from the Route-level `options` field,
	//then the config from the first delegated `RouteOption`, route-opt-1, is applied.
	OptionsConfigRefs *DelegateOptionsRefs `protobuf:"bytes,10,opt,name=options_config_refs,json=optionsConfigRefs,proto3,oneof"`
}

type Route_RedirectAction added in v0.18.32

type Route_RedirectAction struct {
	// Redirect actions tell the proxy to return a redirect response to the downstream client.
	RedirectAction *v1.RedirectAction `protobuf:"bytes,3,opt,name=redirect_action,json=redirectAction,proto3,oneof"`
}

type Route_RouteAction added in v0.18.32

type Route_RouteAction struct {
	// This action is the primary action to be selected for most routes. The RouteAction tells the proxy to
	// route requests to an upstream.
	RouteAction *v1.RouteAction `protobuf:"bytes,2,opt,name=route_action,json=routeAction,proto3,oneof"`
}

type TcpGateway added in v1.0.0

type TcpGateway struct {

	// TCP hosts that the gateway can route to
	TcpHosts []*v1.TcpHost `protobuf:"bytes,1,rep,name=tcp_hosts,json=tcpHosts,proto3" json:"tcp_hosts,omitempty"`
	// TCP Gateway configuration
	Options *v1.TcpListenerOptions `protobuf:"bytes,8,opt,name=options,proto3" json:"options,omitempty"`
	// contains filtered or unexported fields
}

func (*TcpGateway) Descriptor deprecated added in v1.0.0

func (*TcpGateway) Descriptor() ([]byte, []int)

Deprecated: Use TcpGateway.ProtoReflect.Descriptor instead.

func (*TcpGateway) Equal added in v1.0.0

func (m *TcpGateway) Equal(that interface{}) bool

Equal function

func (*TcpGateway) GetOptions added in v1.0.0

func (x *TcpGateway) GetOptions() *v1.TcpListenerOptions

func (*TcpGateway) GetTcpHosts added in v1.0.0

func (x *TcpGateway) GetTcpHosts() []*v1.TcpHost

func (*TcpGateway) Hash added in v1.2.13

func (m *TcpGateway) Hash(hasher hash.Hash64) (uint64, error)

Hash function

func (*TcpGateway) ProtoMessage added in v1.0.0

func (*TcpGateway) ProtoMessage()

func (*TcpGateway) ProtoReflect added in v1.6.0

func (x *TcpGateway) ProtoReflect() protoreflect.Message

func (*TcpGateway) Reset added in v1.0.0

func (x *TcpGateway) Reset()

func (*TcpGateway) String added in v1.0.0

func (x *TcpGateway) String() string

type TransitionGatewayFunc

type TransitionGatewayFunc func(original, desired *Gateway) (bool, error)

Option to copy anything from the original to the desired before writing. Return value of false means don't update

type TransitionRouteOptionFunc added in v1.8.0

type TransitionRouteOptionFunc func(original, desired *RouteOption) (bool, error)

Option to copy anything from the original to the desired before writing. Return value of false means don't update

type TransitionRouteTableFunc added in v0.18.32

type TransitionRouteTableFunc func(original, desired *RouteTable) (bool, error)

Option to copy anything from the original to the desired before writing. Return value of false means don't update

type TransitionVirtualHostOptionFunc added in v1.8.0

type TransitionVirtualHostOptionFunc func(original, desired *VirtualHostOption) (bool, error)

Option to copy anything from the original to the desired before writing. Return value of false means don't update

type TransitionVirtualServiceFunc

type TransitionVirtualServiceFunc func(original, desired *VirtualService) (bool, error)

Option to copy anything from the original to the desired before writing. Return value of false means don't update

type VirtualHost added in v0.18.32

type VirtualHost struct {

	// The list of domains (i.e.: matching the `Host` header of a request) that belong to this virtual host.
	// Note that the wildcard will not match the empty string. e.g. “\*-bar.foo.com” will match “baz-bar.foo.com”
	// but not “-bar.foo.com”. Additionally, a special entry “*” is allowed which will match any host/authority header.
	// Only a single virtual host on a gateway can match on “*”. A domain must be unique across all
	// virtual hosts on a gateway or the config will be invalidated by Gloo
	// Domains on virtual hosts obey the same rules as [Envoy Virtual Hosts](https://github.com/envoyproxy/envoy/blob/master/api/envoy/api/v2/route/route.proto)
	Domains []string `protobuf:"bytes,2,rep,name=domains,proto3" json:"domains,omitempty"`
	// The list of HTTP routes define routing actions to be taken for incoming HTTP requests whose host header matches
	// this virtual host. If the request matches more than one route in the list, the first route matched will be selected.
	// If the list of routes is empty, the virtual host will be ignored by Gloo.
	Routes []*Route `protobuf:"bytes,3,rep,name=routes,proto3" json:"routes,omitempty"`
	// Virtual host options contain additional configuration to be applied to all traffic served by the Virtual Host.
	// Some configuration here can be overridden by Route Options.
	Options *v1.VirtualHostOptions `protobuf:"bytes,4,opt,name=options,proto3" json:"options,omitempty"`
	// Types that are assignable to ExternalOptionsConfig:
	//	*VirtualHost_OptionsConfigRefs
	ExternalOptionsConfig isVirtualHost_ExternalOptionsConfig `protobuf_oneof:"external_options_config"`
	// contains filtered or unexported fields
}

Virtual Hosts serve an ordered list of routes for a set of domains.

An HTTP request is first matched to a virtual host based on its host header, then to a route within the virtual host.

If a request is not matched to any virtual host or a route therein, the target proxy will reply with a 404.

Unlike the [Gloo Virtual Host]({{< ref "/reference/api/github.com/solo-io/gloo/projects/gloo/api/v1/proxy.proto.sk.md" >}}/#virtualhost), Gateway* Virtual Hosts can **delegate** their routes to `RouteTables`.

func (*VirtualHost) Descriptor deprecated added in v0.18.32

func (*VirtualHost) Descriptor() ([]byte, []int)

Deprecated: Use VirtualHost.ProtoReflect.Descriptor instead.

func (*VirtualHost) Equal added in v0.18.32

func (m *VirtualHost) Equal(that interface{}) bool

Equal function

func (*VirtualHost) GetDomains added in v0.18.32

func (x *VirtualHost) GetDomains() []string

func (*VirtualHost) GetExternalOptionsConfig added in v1.8.0

func (m *VirtualHost) GetExternalOptionsConfig() isVirtualHost_ExternalOptionsConfig

func (*VirtualHost) GetOptions added in v1.0.0

func (x *VirtualHost) GetOptions() *v1.VirtualHostOptions

func (*VirtualHost) GetOptionsConfigRefs added in v1.8.0

func (x *VirtualHost) GetOptionsConfigRefs() *DelegateOptionsRefs

func (*VirtualHost) GetRoutes added in v0.18.32

func (x *VirtualHost) GetRoutes() []*Route

func (*VirtualHost) Hash added in v1.2.13

func (m *VirtualHost) Hash(hasher hash.Hash64) (uint64, error)

Hash function

func (*VirtualHost) ProtoMessage added in v0.18.32

func (*VirtualHost) ProtoMessage()

func (*VirtualHost) ProtoReflect added in v1.6.0

func (x *VirtualHost) ProtoReflect() protoreflect.Message

func (*VirtualHost) Reset added in v0.18.32

func (x *VirtualHost) Reset()

func (*VirtualHost) String added in v0.18.32

func (x *VirtualHost) String() string

type VirtualHostOption added in v1.8.0

type VirtualHostOption struct {

	// Status indicates the validation status of this resource.
	// Status is read-only by clients, and set by gateway during validation
	Status *core.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	// Metadata contains the object metadata for this resource
	Metadata *core.Metadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// VirtualHost options. See VirtualHost for delegation behavior.
	Options *v1.VirtualHostOptions `protobuf:"bytes,3,opt,name=options,proto3" json:"options,omitempty"`
	// contains filtered or unexported fields
}

The **VirtualHostOption** holds `options` configuration for a VirtualHost. VirtualHosts can inherit `options` config from `VirtualHostOption` objects by delegating to them.

When a VirtualHost delegates to an external VirtualHostOptions object, any options config defined on the VirtualHost will override the external options config. Similarly, `VirtualHostOption`s which are delegated to first will get priority over following `VirtualHostOption`s.

An example configuration with a VirtualService with its own options config and delegating to two VirtualHostOption objects:

```yaml apiVersion: gateway.solo.io/v1 kind: VirtualService metadata:

name: http
namespace: gloo-system

spec:

virtualHost:
  domains:
  - '*'
  options:
    headerManipulation:
      requestHeadersToRemove: "header-from-vhost"
  delegateOptions:
    - name: virtualhost-external-options-1
      namespace: opt-namespace
    - name: virtualhost-external-options-2
      namespace: opt-namespace

```

```yaml apiVersion: gateway.solo.io/v1 kind: VirtualHostOption metadata:

name: virtualhost-external-options-1
namespace: opt-namespace

spec:

options:
  headerManipulation:
    requestHeadersToRemove: "header-from-external-options1"
  corsPolicy:
    exposeHeaders:
      - header-from-extopt1

```

```yaml apiVersion: gateway.solo.io/v1 kind: VirtualHostOption metadata:

name: virtualhost-external-options-2
namespace: opt-namespace

spec:

options:
  headerManipulation:
    requestHeadersToRemove: "header-from-external-options2"
  corsPolicy:
    exposeHeaders:
      - header-from-extopt2
    maxAge: 2s
  transformations:
    requestTransformation:
      transformationTemplate:
        headers:
          x-header-added-in-opt2:
            value: this header was added in the VirtualHostOption object - #2

```

The final virtual host options (visible in the Proxy CR) would be: ```yaml spec:

virtualHost:
  domains:
  - '*'
  options:
    # from Virtual host options
    headerManipulation:
      requestHeadersToRemove: "header-from-vhost"
    # from delegated virtualhost-external-options-1
    corsPolicy:
      exposeHeaders:
        - header-from-extopt1
    # from delegated virtualhost-external-options-2
    transformations:
      requestTransformation:
        transformationTemplate:
          headers:
            x-header-added-in-opt2:
              value: this header was added in the VirtualHostOption object - #2

```

Notice how the order of VirtualHostOption delegations matters, and that the VirtualHost-level config overrides all delegated configs.

func NewVirtualHostOption added in v1.8.0

func NewVirtualHostOption(namespace, name string) *VirtualHostOption

func (*VirtualHostOption) DeepCopyInto added in v1.8.0

func (o *VirtualHostOption) DeepCopyInto(out *VirtualHostOption)

func (*VirtualHostOption) DeepCopyObject added in v1.8.0

func (o *VirtualHostOption) DeepCopyObject() runtime.Object

func (*VirtualHostOption) Descriptor deprecated added in v1.8.0

func (*VirtualHostOption) Descriptor() ([]byte, []int)

Deprecated: Use VirtualHostOption.ProtoReflect.Descriptor instead.

func (*VirtualHostOption) Equal added in v1.8.0

func (m *VirtualHostOption) Equal(that interface{}) bool

Equal function

func (*VirtualHostOption) GetMetadata added in v1.8.0

func (x *VirtualHostOption) GetMetadata() *core.Metadata

func (*VirtualHostOption) GetObjectKind added in v1.8.0

func (o *VirtualHostOption) GetObjectKind() schema.ObjectKind

func (*VirtualHostOption) GetOptions added in v1.8.0

func (x *VirtualHostOption) GetOptions() *v1.VirtualHostOptions

func (*VirtualHostOption) GetStatus added in v1.8.0

func (x *VirtualHostOption) GetStatus() *core.Status

func (*VirtualHostOption) GroupVersionKind added in v1.8.0

func (r *VirtualHostOption) GroupVersionKind() schema.GroupVersionKind

func (*VirtualHostOption) Hash added in v1.8.0

func (m *VirtualHostOption) Hash(hasher hash.Hash64) (uint64, error)

Hash function

func (*VirtualHostOption) MustHash added in v1.8.0

func (r *VirtualHostOption) MustHash() uint64

func (*VirtualHostOption) ProtoMessage added in v1.8.0

func (*VirtualHostOption) ProtoMessage()

func (*VirtualHostOption) ProtoReflect added in v1.8.0

func (x *VirtualHostOption) ProtoReflect() protoreflect.Message

func (*VirtualHostOption) Reset added in v1.8.0

func (x *VirtualHostOption) Reset()

func (*VirtualHostOption) SetMetadata added in v1.8.0

func (r *VirtualHostOption) SetMetadata(meta *core.Metadata)

func (*VirtualHostOption) SetStatus added in v1.8.0

func (r *VirtualHostOption) SetStatus(status *core.Status)

func (*VirtualHostOption) String added in v1.8.0

func (x *VirtualHostOption) String() string

type VirtualHostOptionClient added in v1.8.0

type VirtualHostOptionClient interface {
	BaseClient() clients.ResourceClient
	Register() error
	Read(namespace, name string, opts clients.ReadOpts) (*VirtualHostOption, error)
	Write(resource *VirtualHostOption, opts clients.WriteOpts) (*VirtualHostOption, error)
	Delete(namespace, name string, opts clients.DeleteOpts) error
	List(namespace string, opts clients.ListOpts) (VirtualHostOptionList, error)
	VirtualHostOptionWatcher
}

func NewVirtualHostOptionClient added in v1.8.0

func NewVirtualHostOptionClient(ctx context.Context, rcFactory factory.ResourceClientFactory) (VirtualHostOptionClient, error)

func NewVirtualHostOptionClientWithBase added in v1.8.0

func NewVirtualHostOptionClientWithBase(rc clients.ResourceClient) VirtualHostOptionClient

func NewVirtualHostOptionClientWithToken added in v1.8.0

func NewVirtualHostOptionClientWithToken(ctx context.Context, rcFactory factory.ResourceClientFactory, token string) (VirtualHostOptionClient, error)

type VirtualHostOptionList added in v1.8.0

type VirtualHostOptionList []*VirtualHostOption

func (VirtualHostOptionList) AsInputResources added in v1.8.0

func (list VirtualHostOptionList) AsInputResources() resources.InputResourceList

func (VirtualHostOptionList) AsInterfaces added in v1.8.0

func (list VirtualHostOptionList) AsInterfaces() []interface{}

func (VirtualHostOptionList) AsResources added in v1.8.0

func (list VirtualHostOptionList) AsResources() resources.ResourceList

func (VirtualHostOptionList) Clone added in v1.8.0

func (VirtualHostOptionList) Each added in v1.8.0

func (list VirtualHostOptionList) Each(f func(element *VirtualHostOption))

func (VirtualHostOptionList) EachResource added in v1.8.0

func (list VirtualHostOptionList) EachResource(f func(element resources.Resource))

func (VirtualHostOptionList) Find added in v1.8.0

func (list VirtualHostOptionList) Find(namespace, name string) (*VirtualHostOption, error)

func (VirtualHostOptionList) Names added in v1.8.0

func (list VirtualHostOptionList) Names() []string

func (VirtualHostOptionList) NamespacesDotNames added in v1.8.0

func (list VirtualHostOptionList) NamespacesDotNames() []string

func (VirtualHostOptionList) Sort added in v1.8.0

type VirtualHostOptionReconciler added in v1.8.0

type VirtualHostOptionReconciler interface {
	Reconcile(namespace string, desiredResources VirtualHostOptionList, transition TransitionVirtualHostOptionFunc, opts clients.ListOpts) error
}

func NewVirtualHostOptionReconciler added in v1.8.0

func NewVirtualHostOptionReconciler(client VirtualHostOptionClient) VirtualHostOptionReconciler

type VirtualHostOptionWatcher added in v1.8.0

type VirtualHostOptionWatcher interface {
	// watch namespace-scoped VirtualHostOptions
	Watch(namespace string, opts clients.WatchOpts) (<-chan VirtualHostOptionList, <-chan error, error)
}

type VirtualHost_OptionsConfigRefs added in v1.8.0

type VirtualHost_OptionsConfigRefs struct {
	// Delegate the VirtualHost options to an external VirtualHostOption Resource.
	//Any options configured in the VirtualHost's `options` field will override all
	//delegated options. If multiple VirtualHostOption CRs are delegated to, configuration will
	//be taken from prior VirtualHostOption CRs over later ones.
	//For example if `headerManipulation` is specified on the VirtualHost options, a delegated
	//`VirtualHostOption` vhost-opt-1, and a second delegated `VirtualHostOption` vhost-opt-2, the `headerManipulation`
	//config from only the VirtualHost-level `options` will be applied. If the config is removed from the VirtualHost-level `options` field,
	//then the config from the first delegated `VirtualHostOption`, vhost-opt-1, is applied.
	OptionsConfigRefs *DelegateOptionsRefs `protobuf:"bytes,5,opt,name=options_config_refs,json=optionsConfigRefs,proto3,oneof"`
}

type VirtualService

type VirtualService struct {

	// The VirtualHost contains the
	// The list of HTTP routes define routing actions to be taken
	// for incoming HTTP requests whose host header matches
	// this virtual host. If the request matches more than one route in the list, the first route matched will be selected.
	// If the list of routes is empty, the virtual host will be ignored by Gloo.
	VirtualHost *VirtualHost `protobuf:"bytes,1,opt,name=virtual_host,json=virtualHost,proto3" json:"virtual_host,omitempty"`
	// If provided, the Gateway will serve TLS/SSL traffic for this set of routes
	SslConfig *v1.SslConfig `protobuf:"bytes,2,opt,name=ssl_config,json=sslConfig,proto3" json:"ssl_config,omitempty"`
	// Display only, optional descriptive name.
	// Unlike metadata.name, DisplayName can be any string
	// and can be changed after creating the resource.
	DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
	// Status indicates the validation status of this resource.
	// Status is read-only by clients, and set by gloo during validation
	Status *core.Status `protobuf:"bytes,6,opt,name=status,proto3" json:"status,omitempty"`
	// Metadata contains the object metadata for this resource
	Metadata *core.Metadata `protobuf:"bytes,7,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// contains filtered or unexported fields
}

The **VirtualService** is the root routing object for the Gloo Gateway. A virtual service describes the set of routes to match for a set of domains.

It defines: - a set of domains - the root set of routes for those domains - an optional SSL configuration for server TLS Termination - VirtualHostOptions that will apply configuration to all routes that live on the VirtualService.

Domains must be unique across all virtual services within a gateway (i.e. no overlap between sets).

VirtualServices can delegate routing behavior to the RouteTable resource by using the `delegateAction` on routes.

An example configuration using two VirtualServices (one with TLS termination and one without) which share a RouteTable looks as follows:

```yaml # HTTP VirtualService: apiVersion: gateway.solo.io/v1 kind: VirtualService metadata:

name: 'http'
namespace: 'usernamespace'

spec:

virtualHost:
  domains:
  - '*.mydomain.com'
  - 'mydomain.com'
  routes:
  - matchers:
    - prefix: '/'
    # delegate all traffic to the `shared-routes` RouteTable
    delegateAction:
      ref:
        name: 'shared-routes'
        namespace: 'usernamespace'

```

```yaml # HTTPS VirtualService: apiVersion: gateway.solo.io/v1 kind: VirtualService metadata:

name: 'https'
namespace: 'usernamespace'

spec:

virtualHost:
  domains:
  - '*.mydomain.com'
  - 'mydomain.com'
  routes:
  - matchers:
    - prefix: '/'
    # delegate all traffic to the `shared-routes` RouteTable
    delegateAction:
      ref:
        name: 'shared-routes'
        namespace: 'usernamespace'
sslConfig:
  secretRef:
    name: gateway-tls
    namespace: gloo-system

```

```yaml # the RouteTable shared by both VirtualServices: apiVersion: gateway.solo.io/v1 kind: RouteTable metadata:

name: 'shared-routes'
namespace: 'usernamespace'

spec:

routes:
  - matchers:
    - prefix: '/some-route'
    routeAction:
      single:
        upstream:
          name: 'some-upstream'
   ...

```

**Delegated Routes** are routes that use the `delegateAction` routing action. Delegated Routes obey the following constraints:

- delegate routes must use `prefix` path matchers - delegated routes cannot specify header, query, or methods portion of the normal route matcher. - `routeOptions` configuration will be inherited from parent routes, but can be overridden by the child

func NewVirtualService

func NewVirtualService(namespace, name string) *VirtualService

func (*VirtualService) DeepCopyInto added in v0.20.9

func (o *VirtualService) DeepCopyInto(out *VirtualService)

func (*VirtualService) DeepCopyObject

func (o *VirtualService) DeepCopyObject() runtime.Object

func (*VirtualService) Descriptor deprecated

func (*VirtualService) Descriptor() ([]byte, []int)

Deprecated: Use VirtualService.ProtoReflect.Descriptor instead.

func (*VirtualService) Equal

func (m *VirtualService) Equal(that interface{}) bool

Equal function

func (*VirtualService) GetDisplayName

func (x *VirtualService) GetDisplayName() string

func (*VirtualService) GetMetadata

func (x *VirtualService) GetMetadata() *core.Metadata

func (*VirtualService) GetObjectKind

func (o *VirtualService) GetObjectKind() schema.ObjectKind

func (*VirtualService) GetSslConfig

func (x *VirtualService) GetSslConfig() *v1.SslConfig

func (*VirtualService) GetStatus

func (x *VirtualService) GetStatus() *core.Status

func (*VirtualService) GetVirtualHost

func (x *VirtualService) GetVirtualHost() *VirtualHost

func (*VirtualService) GroupVersionKind added in v0.18.0

func (r *VirtualService) GroupVersionKind() schema.GroupVersionKind

func (*VirtualService) Hash

func (m *VirtualService) Hash(hasher hash.Hash64) (uint64, error)

Hash function

func (*VirtualService) MustHash added in v1.2.13

func (r *VirtualService) MustHash() uint64

func (*VirtualService) ProtoMessage

func (*VirtualService) ProtoMessage()

func (*VirtualService) ProtoReflect added in v1.6.0

func (x *VirtualService) ProtoReflect() protoreflect.Message

func (*VirtualService) Reset

func (x *VirtualService) Reset()

func (*VirtualService) SetMetadata

func (r *VirtualService) SetMetadata(meta *core.Metadata)

func (*VirtualService) SetStatus

func (r *VirtualService) SetStatus(status *core.Status)

func (*VirtualService) String

func (x *VirtualService) String() string

type VirtualServiceClient

type VirtualServiceClient interface {
	BaseClient() clients.ResourceClient
	Register() error
	Read(namespace, name string, opts clients.ReadOpts) (*VirtualService, error)
	Write(resource *VirtualService, opts clients.WriteOpts) (*VirtualService, error)
	Delete(namespace, name string, opts clients.DeleteOpts) error
	List(namespace string, opts clients.ListOpts) (VirtualServiceList, error)
	VirtualServiceWatcher
}

func NewVirtualServiceClient

func NewVirtualServiceClient(ctx context.Context, rcFactory factory.ResourceClientFactory) (VirtualServiceClient, error)

func NewVirtualServiceClientWithBase

func NewVirtualServiceClientWithBase(rc clients.ResourceClient) VirtualServiceClient

func NewVirtualServiceClientWithToken

func NewVirtualServiceClientWithToken(ctx context.Context, rcFactory factory.ResourceClientFactory, token string) (VirtualServiceClient, error)

type VirtualServiceList

type VirtualServiceList []*VirtualService

func (VirtualServiceList) AsInputResources

func (list VirtualServiceList) AsInputResources() resources.InputResourceList

func (VirtualServiceList) AsInterfaces

func (list VirtualServiceList) AsInterfaces() []interface{}

func (VirtualServiceList) AsResources

func (list VirtualServiceList) AsResources() resources.ResourceList

func (VirtualServiceList) Clone

func (VirtualServiceList) Each

func (list VirtualServiceList) Each(f func(element *VirtualService))

func (VirtualServiceList) EachResource added in v0.13.21

func (list VirtualServiceList) EachResource(f func(element resources.Resource))

func (VirtualServiceList) Find

func (list VirtualServiceList) Find(namespace, name string) (*VirtualService, error)

func (VirtualServiceList) Names

func (list VirtualServiceList) Names() []string

func (VirtualServiceList) NamespacesDotNames

func (list VirtualServiceList) NamespacesDotNames() []string

func (VirtualServiceList) Sort

type VirtualServiceReconciler

type VirtualServiceReconciler interface {
	Reconcile(namespace string, desiredResources VirtualServiceList, transition TransitionVirtualServiceFunc, opts clients.ListOpts) error
}

func NewVirtualServiceReconciler

func NewVirtualServiceReconciler(client VirtualServiceClient) VirtualServiceReconciler

type VirtualServiceSelectorExpressions added in v1.8.1

type VirtualServiceSelectorExpressions struct {

	// Expressions allow for more flexible virtual service label matching, such as equality-based requirements, set-based requirements, or a combination of both.
	// https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#equality-based-requirement
	Expressions []*VirtualServiceSelectorExpressions_Expression `protobuf:"bytes,3,rep,name=expressions,proto3" json:"expressions,omitempty"`
	// contains filtered or unexported fields
}

Expressions to define which virtual services to select Example: expressions:

  • key: domain operator: in values: example.com

func (*VirtualServiceSelectorExpressions) Descriptor deprecated added in v1.8.1

func (*VirtualServiceSelectorExpressions) Descriptor() ([]byte, []int)

Deprecated: Use VirtualServiceSelectorExpressions.ProtoReflect.Descriptor instead.

func (*VirtualServiceSelectorExpressions) Equal added in v1.8.1

func (m *VirtualServiceSelectorExpressions) Equal(that interface{}) bool

Equal function

func (*VirtualServiceSelectorExpressions) GetExpressions added in v1.8.1

func (*VirtualServiceSelectorExpressions) Hash added in v1.8.1

Hash function

func (*VirtualServiceSelectorExpressions) ProtoMessage added in v1.8.1

func (*VirtualServiceSelectorExpressions) ProtoMessage()

func (*VirtualServiceSelectorExpressions) ProtoReflect added in v1.8.1

func (*VirtualServiceSelectorExpressions) Reset added in v1.8.1

func (*VirtualServiceSelectorExpressions) String added in v1.8.1

type VirtualServiceSelectorExpressions_Expression added in v1.8.1

type VirtualServiceSelectorExpressions_Expression struct {

	// Kubernetes label key, must conform to Kubernetes syntax requirements
	// https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#syntax-and-character-set
	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// The operator can only be in, notin, =, ==, !=, exists, ! (DoesNotExist), gt (GreaterThan), lt (LessThan).
	Operator VirtualServiceSelectorExpressions_Expression_Operator `` /* 145-byte string literal not displayed */
	Values   []string                                              `protobuf:"bytes,3,rep,name=values,proto3" json:"values,omitempty"`
	// contains filtered or unexported fields
}

func (*VirtualServiceSelectorExpressions_Expression) Descriptor deprecated added in v1.8.1

Deprecated: Use VirtualServiceSelectorExpressions_Expression.ProtoReflect.Descriptor instead.

func (*VirtualServiceSelectorExpressions_Expression) Equal added in v1.8.1

func (m *VirtualServiceSelectorExpressions_Expression) Equal(that interface{}) bool

Equal function

func (*VirtualServiceSelectorExpressions_Expression) GetKey added in v1.8.1

func (*VirtualServiceSelectorExpressions_Expression) GetOperator added in v1.8.1

func (*VirtualServiceSelectorExpressions_Expression) GetValues added in v1.8.1

func (*VirtualServiceSelectorExpressions_Expression) Hash added in v1.8.1

Hash function

func (*VirtualServiceSelectorExpressions_Expression) ProtoMessage added in v1.8.1

func (*VirtualServiceSelectorExpressions_Expression) ProtoReflect added in v1.8.1

func (*VirtualServiceSelectorExpressions_Expression) Reset added in v1.8.1

func (*VirtualServiceSelectorExpressions_Expression) String added in v1.8.1

type VirtualServiceSelectorExpressions_Expression_Operator added in v1.8.1

type VirtualServiceSelectorExpressions_Expression_Operator int32

Virtual Service Selector expression operator, while the set-based syntax differs from Kubernetes (kubernetes: `key: !mylabel`, gloo: `key: mylabel, operator: "!"` | kubernetes: `key: mylabel`, gloo: `key: mylabel, operator: exists`), the functionality remains the same.

const (
	// =
	VirtualServiceSelectorExpressions_Expression_Equals VirtualServiceSelectorExpressions_Expression_Operator = 0
	// ==
	VirtualServiceSelectorExpressions_Expression_DoubleEquals VirtualServiceSelectorExpressions_Expression_Operator = 1
	// !=
	VirtualServiceSelectorExpressions_Expression_NotEquals VirtualServiceSelectorExpressions_Expression_Operator = 2
	// in
	VirtualServiceSelectorExpressions_Expression_In VirtualServiceSelectorExpressions_Expression_Operator = 3
	// notin
	VirtualServiceSelectorExpressions_Expression_NotIn VirtualServiceSelectorExpressions_Expression_Operator = 4
	// exists
	VirtualServiceSelectorExpressions_Expression_Exists VirtualServiceSelectorExpressions_Expression_Operator = 5
	// !
	VirtualServiceSelectorExpressions_Expression_DoesNotExist VirtualServiceSelectorExpressions_Expression_Operator = 6
	// gt
	VirtualServiceSelectorExpressions_Expression_GreaterThan VirtualServiceSelectorExpressions_Expression_Operator = 7
	// lt
	VirtualServiceSelectorExpressions_Expression_LessThan VirtualServiceSelectorExpressions_Expression_Operator = 8
)

func (VirtualServiceSelectorExpressions_Expression_Operator) Descriptor added in v1.8.1

func (VirtualServiceSelectorExpressions_Expression_Operator) Enum added in v1.8.1

func (VirtualServiceSelectorExpressions_Expression_Operator) EnumDescriptor deprecated added in v1.8.1

Deprecated: Use VirtualServiceSelectorExpressions_Expression_Operator.Descriptor instead.

func (VirtualServiceSelectorExpressions_Expression_Operator) Number added in v1.8.1

func (VirtualServiceSelectorExpressions_Expression_Operator) String added in v1.8.1

func (VirtualServiceSelectorExpressions_Expression_Operator) Type added in v1.8.1

type VirtualServiceWatcher added in v0.13.21

type VirtualServiceWatcher interface {
	// watch namespace-scoped VirtualServices
	Watch(namespace string, opts clients.WatchOpts) (<-chan VirtualServiceList, <-chan error, error)
}

Directories

Path Synopsis
kube
apis/gateway.solo.io/v1
Package v1 is the v1 version of the API.
Package v1 is the v1 version of the API.
client/clientset/versioned
This package has the automatically generated clientset.
This package has the automatically generated clientset.
client/clientset/versioned/fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
client/clientset/versioned/scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
client/clientset/versioned/typed/gateway.solo.io/v1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
client/clientset/versioned/typed/gateway.solo.io/v1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.

Jump to

Keyboard shortcuts

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