Documentation ¶
Index ¶
- Variables
- type Gatewaydeprecated
- func (o *Gateway) DeepCopyObject() runtime.Object
- func (*Gateway) Descriptor() ([]byte, []int)
- func (this *Gateway) Equal(that interface{}) bool
- func (m *Gateway) GetBindAddress() string
- func (m *Gateway) GetBindPort() uint32
- func (m *Gateway) GetMetadata() core.Metadata
- func (o *Gateway) GetObjectKind() schema.ObjectKind
- func (m *Gateway) GetPlugins() *v1.HttpListenerPlugins
- func (m *Gateway) GetSsl() bool
- func (m *Gateway) GetStatus() core.Status
- func (m *Gateway) GetUseProxyProto() *types.BoolValue
- func (m *Gateway) GetVirtualServices() []core.ResourceRef
- func (r *Gateway) GroupVersionKind() schema.GroupVersionKind
- func (r *Gateway) Hash() uint64
- func (*Gateway) ProtoMessage()
- func (m *Gateway) Reset()
- func (r *Gateway) SetMetadata(meta core.Metadata)
- func (r *Gateway) SetStatus(status core.Status)
- func (m *Gateway) String() string
- func (m *Gateway) XXX_DiscardUnknown()
- func (m *Gateway) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Gateway) XXX_Merge(src proto.Message)
- func (m *Gateway) XXX_Size() int
- func (m *Gateway) XXX_Unmarshal(b []byte) error
- type GatewayClient
- type GatewayList
- func (list GatewayList) AsInputResources() resources.InputResourceList
- func (list GatewayList) AsInterfaces() []interface{}
- func (list GatewayList) AsResources() resources.ResourceList
- func (list GatewayList) Clone() GatewayList
- func (list GatewayList) Each(f func(element *Gateway))
- func (list GatewayList) EachResource(f func(element resources.Resource))
- func (list GatewayList) Find(namespace, name string) (*Gateway, error)
- func (list GatewayList) Names() []string
- func (list GatewayList) NamespacesDotNames() []string
- func (list GatewayList) Sort() GatewayList
- type GatewayReconciler
- type GatewayWatcher
- type Route
- func (*Route) Descriptor() ([]byte, []int)
- func (this *Route) Equal(that interface{}) bool
- func (m *Route) GetAction() isRoute_Action
- func (m *Route) GetDelegateAction() *core.ResourceRef
- func (m *Route) GetDirectResponseAction() *v1.DirectResponseAction
- func (m *Route) GetMatcher() *v1.Matcher
- func (m *Route) GetRedirectAction() *v1.RedirectAction
- func (m *Route) GetRouteAction() *v1.RouteAction
- func (m *Route) GetRoutePlugins() *v1.RoutePlugins
- func (*Route) ProtoMessage()
- func (m *Route) Reset()
- func (m *Route) String() string
- func (m *Route) XXX_DiscardUnknown()
- func (m *Route) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Route) XXX_Merge(src proto.Message)
- func (*Route) XXX_OneofWrappers() []interface{}
- func (m *Route) XXX_Size() int
- func (m *Route) XXX_Unmarshal(b []byte) error
- type RouteTable
- func (o *RouteTable) DeepCopyObject() runtime.Object
- func (*RouteTable) Descriptor() ([]byte, []int)
- func (this *RouteTable) Equal(that interface{}) bool
- func (m *RouteTable) GetMetadata() core.Metadata
- func (o *RouteTable) GetObjectKind() schema.ObjectKind
- func (m *RouteTable) GetRoutes() []*Route
- func (m *RouteTable) GetStatus() core.Status
- func (r *RouteTable) GroupVersionKind() schema.GroupVersionKind
- func (r *RouteTable) Hash() uint64
- func (*RouteTable) ProtoMessage()
- func (m *RouteTable) Reset()
- func (r *RouteTable) SetMetadata(meta core.Metadata)
- func (r *RouteTable) SetStatus(status core.Status)
- func (m *RouteTable) String() string
- func (m *RouteTable) XXX_DiscardUnknown()
- func (m *RouteTable) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RouteTable) XXX_Merge(src proto.Message)
- func (m *RouteTable) XXX_Size() int
- func (m *RouteTable) XXX_Unmarshal(b []byte) error
- type RouteTableClient
- type RouteTableList
- func (list RouteTableList) AsInputResources() resources.InputResourceList
- func (list RouteTableList) AsInterfaces() []interface{}
- func (list RouteTableList) AsResources() resources.ResourceList
- func (list RouteTableList) Clone() RouteTableList
- func (list RouteTableList) Each(f func(element *RouteTable))
- func (list RouteTableList) EachResource(f func(element resources.Resource))
- func (list RouteTableList) Find(namespace, name string) (*RouteTable, error)
- func (list RouteTableList) Names() []string
- func (list RouteTableList) NamespacesDotNames() []string
- func (list RouteTableList) Sort() RouteTableList
- type RouteTableReconciler
- type RouteTableWatcher
- type Route_DelegateAction
- type Route_DirectResponseAction
- type Route_RedirectAction
- type Route_RouteAction
- type TransitionGatewayFunc
- type TransitionRouteTableFunc
- type TransitionVirtualServiceFunc
- type VirtualHost
- func (*VirtualHost) Descriptor() ([]byte, []int)
- func (this *VirtualHost) Equal(that interface{}) bool
- func (m *VirtualHost) GetCorsPolicy() *v1.CorsPolicy
- func (m *VirtualHost) GetDomains() []string
- func (m *VirtualHost) GetName() string
- func (m *VirtualHost) GetRoutes() []*Route
- func (m *VirtualHost) GetVirtualHostPlugins() *v1.VirtualHostPlugins
- func (*VirtualHost) ProtoMessage()
- func (m *VirtualHost) Reset()
- func (m *VirtualHost) String() string
- func (m *VirtualHost) XXX_DiscardUnknown()
- func (m *VirtualHost) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *VirtualHost) XXX_Merge(src proto.Message)
- func (m *VirtualHost) XXX_Size() int
- func (m *VirtualHost) XXX_Unmarshal(b []byte) error
- type VirtualService
- func (o *VirtualService) DeepCopyObject() runtime.Object
- func (*VirtualService) Descriptor() ([]byte, []int)
- func (this *VirtualService) Equal(that interface{}) bool
- func (m *VirtualService) GetDisplayName() string
- func (m *VirtualService) GetMetadata() core.Metadata
- func (o *VirtualService) GetObjectKind() schema.ObjectKind
- func (m *VirtualService) GetSslConfig() *v1.SslConfig
- func (m *VirtualService) GetStatus() core.Status
- func (m *VirtualService) GetVirtualHost() *VirtualHost
- func (r *VirtualService) GroupVersionKind() schema.GroupVersionKind
- func (r *VirtualService) Hash() uint64
- func (*VirtualService) ProtoMessage()
- func (m *VirtualService) Reset()
- func (r *VirtualService) SetMetadata(meta core.Metadata)
- func (r *VirtualService) SetStatus(status core.Status)
- func (m *VirtualService) String() string
- func (m *VirtualService) XXX_DiscardUnknown()
- func (m *VirtualService) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *VirtualService) XXX_Merge(src proto.Message)
- func (m *VirtualService) XXX_Size() int
- func (m *VirtualService) XXX_Unmarshal(b []byte) error
- type VirtualServiceClient
- func NewVirtualServiceClient(rcFactory factory.ResourceClientFactory) (VirtualServiceClient, error)
- func NewVirtualServiceClientWithBase(rc clients.ResourceClient) VirtualServiceClient
- func NewVirtualServiceClientWithToken(rcFactory factory.ResourceClientFactory, token string) (VirtualServiceClient, error)
- type VirtualServiceList
- func (list VirtualServiceList) AsInputResources() resources.InputResourceList
- func (list VirtualServiceList) AsInterfaces() []interface{}
- func (list VirtualServiceList) AsResources() resources.ResourceList
- func (list VirtualServiceList) Clone() VirtualServiceList
- func (list VirtualServiceList) Each(f func(element *VirtualService))
- func (list VirtualServiceList) EachResource(f func(element resources.Resource))
- func (list VirtualServiceList) Find(namespace, name string) (*VirtualService, error)
- func (list VirtualServiceList) Names() []string
- func (list VirtualServiceList) NamespacesDotNames() []string
- func (list VirtualServiceList) Sort() VirtualServiceList
- type VirtualServiceReconciler
- type VirtualServiceWatcher
Constants ¶
This section is empty.
Variables ¶
var ( GatewayCrd = crd.NewCrd( "gateways", GatewayGVK.Group, GatewayGVK.Version, GatewayGVK.Kind, "gw", false, &Gateway{}) )
var (
GatewayGVK = schema.GroupVersionKind{
Version: "v1",
Group: "gateway.solo.io",
Kind: "Gateway",
}
)
var ( RouteTableCrd = crd.NewCrd( "routetables", RouteTableGVK.Group, RouteTableGVK.Version, RouteTableGVK.Kind, "rt", false, &RouteTable{}) )
var (
RouteTableGVK = schema.GroupVersionKind{
Version: "v1",
Group: "gateway.solo.io",
Kind: "RouteTable",
}
)
var ( VirtualServiceCrd = crd.NewCrd( "virtualservices", VirtualServiceGVK.Group, VirtualServiceGVK.Version, VirtualServiceGVK.Kind, "vs", false, &VirtualService{}) )
var (
VirtualServiceGVK = schema.GroupVersionKind{
Version: "v1",
Group: "gateway.solo.io",
Kind: "VirtualService",
}
)
Functions ¶
This section is empty.
Types ¶
type Gateway
deprecated
type Gateway struct { // if set to false, only use virtual services with no 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"` // names of the the virtual services, which contain the actual routes for the gateway // if the list is empty, all virtual services will apply to this gateway (with accordance to tls flag above). VirtualServices []core.ResourceRef `protobuf:"bytes,2,rep,name=virtual_services,json=virtualServices,proto3" json:"virtual_services"` // 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 in a namespace BindPort uint32 `protobuf:"varint,4,opt,name=bind_port,json=bindPort,proto3" json:"bind_port,omitempty"` // top level plugin configuration for all routes on the gateway Plugins *v1.HttpListenerPlugins `protobuf:"bytes,5,opt,name=plugins,proto3" json:"plugins,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" testdiff:"ignore"` // Metadata contains the object metadata for this resource Metadata core.Metadata `protobuf:"bytes,7,opt,name=metadata,proto3" json:"metadata"` // Enable ProxyProtocol support for this listener UseProxyProto *types.BoolValue `protobuf:"bytes,8,opt,name=use_proxy_proto,json=useProxyProto,proto3" json:"use_proxy_proto,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
A gateway describes the routes to upstreams that are reachable via a specific port on the Gateway Proxy itself.
Deprecated: see gateway.solo.io.v2.Gateway
func NewGateway ¶
func (*Gateway) DeepCopyObject ¶
func (*Gateway) Descriptor ¶
func (*Gateway) GetBindAddress ¶
func (*Gateway) GetBindPort ¶
func (*Gateway) GetMetadata ¶
func (*Gateway) GetObjectKind ¶
func (o *Gateway) GetObjectKind() schema.ObjectKind
func (*Gateway) GetPlugins ¶
func (m *Gateway) GetPlugins() *v1.HttpListenerPlugins
func (*Gateway) GetUseProxyProto ¶ added in v0.13.15
func (*Gateway) GetVirtualServices ¶
func (m *Gateway) GetVirtualServices() []core.ResourceRef
func (*Gateway) GroupVersionKind ¶ added in v0.18.0
func (r *Gateway) GroupVersionKind() schema.GroupVersionKind
func (*Gateway) ProtoMessage ¶
func (*Gateway) ProtoMessage()
func (*Gateway) SetMetadata ¶
func (*Gateway) XXX_DiscardUnknown ¶
func (m *Gateway) XXX_DiscardUnknown()
func (*Gateway) XXX_Marshal ¶
func (*Gateway) XXX_Unmarshal ¶
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(rcFactory factory.ResourceClientFactory) (GatewayClient, error)
func NewGatewayClientWithBase ¶
func NewGatewayClientWithBase(rc clients.ResourceClient) GatewayClient
func NewGatewayClientWithToken ¶
func NewGatewayClientWithToken(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)
namespace is optional, if left empty, names can collide if the list contains more than one with the same name
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 Route ¶ added in v0.18.32
type Route struct { // The matcher contains parameters for matching requests (i.e.: based on HTTP path, headers, etc.) // For delegated routes, the matcher must contain only a `prefix` path matcher and no other config Matcher *v1.Matcher `protobuf:"bytes,1,opt,name=matcher,proto3" json:"matcher,omitempty"` // The Route Action Defines what action the proxy should take when a request matches the route. // // Types that are valid to be assigned to Action: // *Route_RouteAction // *Route_RedirectAction // *Route_DirectResponseAction // *Route_DelegateAction Action isRoute_Action `protobuf_oneof:"action"` // Route Plugins extend the behavior of routes. // Route plugins include configuration such as retries, rate limiting, and request/response transformation. // RoutePlugin behavior will be inherited by delegated routes which do not specify their own `routePlugins` RoutePlugins *v1.RoutePlugins `protobuf:"bytes,6,opt,name=route_plugins,json=routePlugins,proto3" json:"route_plugins,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Routes declare the entry points on virtual hosts and the action to take for matched requests.
DelegateActions can be used to delegate the behavior for a set out routes with a given *prefix* to a top-level `RouteTable` resource.
Routes specified in the RouteTable will have their paths prefixed by 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 delegate: 1-routes match: /2 delegate: 2-routes --- routeTable: 1-routes match: /foo destination: foo-svc match: /bar destination: bar-svc ---- routeTable: 2-routes match: /baz destination: baz-svc match: /qux destination: qux-svc ```
```yaml apiVersion: gateway.solo.io/v1 kind: VirtualService metadata:
name: 'any' namespace: 'any'
spec:
virtualHost: domains: - 'any.com' routes: - matcher: prefix: '/a' delegateAction: name: 'a-routes' namespace: 'a'
```
```yaml apiVersion: gateway.solo.io/v1 kind: RouteTable metadata:
name: 'a-routes' namespace: 'a'
spec:
routes: - matcher: prefix: '/1' delegateAction: name: 'one-routes' namespace: 'one' - matcher: prefix: '/2' delegateAction: name: 'two-routes' namespace: 'two'
```
```yaml apiVersion: gateway.solo.io/v1 kind: RouteTable metadata:
name: 'one-routes' namespace: 'one'
spec:
routes: - matcher: prefix: '/foo' routeAction: single: upstream: name: 'foo-upstream' - matcher: prefix: '/bar' routeAction: single: upstream: name: 'bar-upstream'
```
```yaml apiVersion: gateway.solo.io/v1 kind: RouteTable metadata:
name: 'two-routes' namespace: 'two'
spec:
routes: - matcher: prefix: '/baz' routeAction: single: upstream: name: 'baz-upstream' - matcher: prefix: '/qux' routeAction: single: upstream: name: 'qux-upstream'
```
Would produce the following route config for `mydomain.com`:
``` /a/1/foo -> foo-svc /a/1/bar -> bar-svc /a/2/baz -> baz-svc /a/2/qux -> qux-svc ```
func (*Route) Descriptor ¶ added in v0.18.32
func (*Route) GetDelegateAction ¶ added in v0.18.32
func (m *Route) GetDelegateAction() *core.ResourceRef
func (*Route) GetDirectResponseAction ¶ added in v0.18.32
func (m *Route) GetDirectResponseAction() *v1.DirectResponseAction
func (*Route) GetMatcher ¶ added in v0.18.32
func (*Route) GetRedirectAction ¶ added in v0.18.32
func (m *Route) GetRedirectAction() *v1.RedirectAction
func (*Route) GetRouteAction ¶ added in v0.18.32
func (m *Route) GetRouteAction() *v1.RouteAction
func (*Route) GetRoutePlugins ¶ added in v0.18.32
func (m *Route) GetRoutePlugins() *v1.RoutePlugins
func (*Route) ProtoMessage ¶ added in v0.18.32
func (*Route) ProtoMessage()
func (*Route) XXX_DiscardUnknown ¶ added in v0.18.32
func (m *Route) XXX_DiscardUnknown()
func (*Route) XXX_Marshal ¶ added in v0.18.32
func (*Route) XXX_OneofWrappers ¶ added in v0.18.32
func (*Route) XXX_OneofWrappers() []interface{}
XXX_OneofWrappers is for the internal use of the proto package.
func (*Route) XXX_Unmarshal ¶ added in v0.18.32
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"` // 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" testdiff:"ignore"` // Metadata contains the object metadata for this resource Metadata core.Metadata `protobuf:"bytes,7,opt,name=metadata,proto3" json:"metadata"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
The **RouteTable** is a child Routing object for the Gloo Gateway.
A **RouteTable** must always be referenced by a `delegateAction`, either in a parent VirtualService or another RouteTable.
The routes specified in route tables will have their paths prefixed by the prefixes of the parent routes which delegate to them.
For example, the following (abridged) configuration:
``` virtualService: mydomain.com match: /a delegate: a-routes --- routeTable: a-routes match: /1 delegate: 1-routes match: /2 delegate: 2-routes --- routeTable: 1-routes match: /foo destination: foo-svc match: /bar destination: bar-svc ---- routeTable: 2-routes match: /baz destination: baz-svc match: /qux destination: qux-svc
```
Would produce the following route config for `mydomain.com`:
``` /a/1/foo -> foo-svc /a/1/bar -> bar-svc /a/2/baz -> baz-svc /a/2/qux -> qux-svc
```
Only **VirtualServices** will be loaded by Gloo. If a **RouteTable** or its parents are not referenced within a **VirtualService**, it will be ignored.
func NewRouteTable ¶ added in v0.18.32
func NewRouteTable(namespace, name string) *RouteTable
func (*RouteTable) DeepCopyObject ¶ added in v0.18.32
func (o *RouteTable) DeepCopyObject() runtime.Object
func (*RouteTable) Descriptor ¶ added in v0.18.32
func (*RouteTable) Descriptor() ([]byte, []int)
func (*RouteTable) Equal ¶ added in v0.18.32
func (this *RouteTable) Equal(that interface{}) bool
func (*RouteTable) GetMetadata ¶ added in v0.18.32
func (m *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 (m *RouteTable) GetRoutes() []*Route
func (*RouteTable) GetStatus ¶ added in v0.18.32
func (m *RouteTable) GetStatus() core.Status
func (*RouteTable) GroupVersionKind ¶ added in v0.18.32
func (r *RouteTable) GroupVersionKind() schema.GroupVersionKind
func (*RouteTable) Hash ¶ added in v0.18.32
func (r *RouteTable) Hash() uint64
func (*RouteTable) ProtoMessage ¶ added in v0.18.32
func (*RouteTable) ProtoMessage()
func (*RouteTable) Reset ¶ added in v0.18.32
func (m *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 (m *RouteTable) String() string
func (*RouteTable) XXX_DiscardUnknown ¶ added in v0.18.32
func (m *RouteTable) XXX_DiscardUnknown()
func (*RouteTable) XXX_Marshal ¶ added in v0.18.32
func (m *RouteTable) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RouteTable) XXX_Merge ¶ added in v0.18.32
func (m *RouteTable) XXX_Merge(src proto.Message)
func (*RouteTable) XXX_Size ¶ added in v0.18.32
func (m *RouteTable) XXX_Size() int
func (*RouteTable) XXX_Unmarshal ¶ added in v0.18.32
func (m *RouteTable) XXX_Unmarshal(b []byte) error
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(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(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)
namespace is optional, if left empty, names can collide if the list contains more than one with the same name
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 RouteTableWatcher ¶ added in v0.18.32
type Route_DelegateAction ¶ added in v0.18.32
type Route_DelegateAction struct {
DelegateAction *core.ResourceRef `protobuf:"bytes,5,opt,name=delegate_action,json=delegateAction,proto3,oneof" json:"delegate_action,omitempty"`
}
func (*Route_DelegateAction) Equal ¶ added in v0.18.32
func (this *Route_DelegateAction) Equal(that interface{}) bool
type Route_DirectResponseAction ¶ added in v0.18.32
type Route_DirectResponseAction struct {
DirectResponseAction *v1.DirectResponseAction `` /* 129-byte string literal not displayed */
}
func (*Route_DirectResponseAction) Equal ¶ added in v0.18.32
func (this *Route_DirectResponseAction) Equal(that interface{}) bool
type Route_RedirectAction ¶ added in v0.18.32
type Route_RedirectAction struct {
RedirectAction *v1.RedirectAction `protobuf:"bytes,3,opt,name=redirect_action,json=redirectAction,proto3,oneof" json:"redirect_action,omitempty"`
}
func (*Route_RedirectAction) Equal ¶ added in v0.18.32
func (this *Route_RedirectAction) Equal(that interface{}) bool
type Route_RouteAction ¶ added in v0.18.32
type Route_RouteAction struct {
RouteAction *v1.RouteAction `protobuf:"bytes,2,opt,name=route_action,json=routeAction,proto3,oneof" json:"route_action,omitempty"`
}
func (*Route_RouteAction) Equal ¶ added in v0.18.32
func (this *Route_RouteAction) Equal(that interface{}) bool
type TransitionGatewayFunc ¶
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 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 { // deprecated. this field is ignored Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // 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 plugins contain additional configuration to be applied to all traffic served by the Virtual Host. // Some configuration here can be overridden by Route Plugins. VirtualHostPlugins *v1.VirtualHostPlugins `protobuf:"bytes,4,opt,name=virtual_host_plugins,json=virtualHostPlugins,proto3" json:"virtual_host_plugins,omitempty"` // Defines a CORS policy for the virtual host // If a CORS policy is also defined on the route matched by the request, the policies are merged. // DEPRECATED set cors policy through the Virtual Host Plugin CorsPolicy *v1.CorsPolicy `protobuf:"bytes,5,opt,name=cors_policy,json=corsPolicy,proto3" json:"cors_policy,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
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 "/v1/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 ¶ added in v0.18.32
func (*VirtualHost) Descriptor() ([]byte, []int)
func (*VirtualHost) Equal ¶ added in v0.18.32
func (this *VirtualHost) Equal(that interface{}) bool
func (*VirtualHost) GetCorsPolicy ¶ added in v0.18.34
func (m *VirtualHost) GetCorsPolicy() *v1.CorsPolicy
func (*VirtualHost) GetDomains ¶ added in v0.18.32
func (m *VirtualHost) GetDomains() []string
func (*VirtualHost) GetName ¶ added in v0.18.34
func (m *VirtualHost) GetName() string
func (*VirtualHost) GetRoutes ¶ added in v0.18.32
func (m *VirtualHost) GetRoutes() []*Route
func (*VirtualHost) GetVirtualHostPlugins ¶ added in v0.18.32
func (m *VirtualHost) GetVirtualHostPlugins() *v1.VirtualHostPlugins
func (*VirtualHost) ProtoMessage ¶ added in v0.18.32
func (*VirtualHost) ProtoMessage()
func (*VirtualHost) Reset ¶ added in v0.18.32
func (m *VirtualHost) Reset()
func (*VirtualHost) String ¶ added in v0.18.32
func (m *VirtualHost) String() string
func (*VirtualHost) XXX_DiscardUnknown ¶ added in v0.18.32
func (m *VirtualHost) XXX_DiscardUnknown()
func (*VirtualHost) XXX_Marshal ¶ added in v0.18.32
func (m *VirtualHost) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*VirtualHost) XXX_Merge ¶ added in v0.18.32
func (m *VirtualHost) XXX_Merge(src proto.Message)
func (*VirtualHost) XXX_Size ¶ added in v0.18.32
func (m *VirtualHost) XXX_Size() int
func (*VirtualHost) XXX_Unmarshal ¶ added in v0.18.32
func (m *VirtualHost) XXX_Unmarshal(b []byte) error
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" testdiff:"ignore"` // Metadata contains the object metadata for this resource Metadata core.Metadata `protobuf:"bytes,7,opt,name=metadata,proto3" json:"metadata"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
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 - VirtualHostPlugins 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: - matcher: prefix: '/' # delegate all traffic to the `shared-routes` RouteTable delegateAction: 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: - matcher: prefix: '/' # delegate all traffic to the `shared-routes` RouteTable delegateAction: 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: - matcher: 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. - `routePlugin` configuration will be inherited from parent routes, but can be overridden by the child
func NewVirtualService ¶
func NewVirtualService(namespace, name string) *VirtualService
func (*VirtualService) DeepCopyObject ¶
func (o *VirtualService) DeepCopyObject() runtime.Object
func (*VirtualService) Descriptor ¶
func (*VirtualService) Descriptor() ([]byte, []int)
func (*VirtualService) Equal ¶
func (this *VirtualService) Equal(that interface{}) bool
func (*VirtualService) GetDisplayName ¶
func (m *VirtualService) GetDisplayName() string
func (*VirtualService) GetMetadata ¶
func (m *VirtualService) GetMetadata() core.Metadata
func (*VirtualService) GetObjectKind ¶
func (o *VirtualService) GetObjectKind() schema.ObjectKind
func (*VirtualService) GetSslConfig ¶
func (m *VirtualService) GetSslConfig() *v1.SslConfig
func (*VirtualService) GetStatus ¶
func (m *VirtualService) GetStatus() core.Status
func (*VirtualService) GetVirtualHost ¶
func (m *VirtualService) GetVirtualHost() *VirtualHost
func (*VirtualService) GroupVersionKind ¶ added in v0.18.0
func (r *VirtualService) GroupVersionKind() schema.GroupVersionKind
func (*VirtualService) Hash ¶
func (r *VirtualService) Hash() uint64
func (*VirtualService) ProtoMessage ¶
func (*VirtualService) ProtoMessage()
func (*VirtualService) Reset ¶
func (m *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 (m *VirtualService) String() string
func (*VirtualService) XXX_DiscardUnknown ¶
func (m *VirtualService) XXX_DiscardUnknown()
func (*VirtualService) XXX_Marshal ¶
func (m *VirtualService) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*VirtualService) XXX_Merge ¶
func (m *VirtualService) XXX_Merge(src proto.Message)
func (*VirtualService) XXX_Size ¶
func (m *VirtualService) XXX_Size() int
func (*VirtualService) XXX_Unmarshal ¶
func (m *VirtualService) XXX_Unmarshal(b []byte) error
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(rcFactory factory.ResourceClientFactory) (VirtualServiceClient, error)
func NewVirtualServiceClientWithBase ¶
func NewVirtualServiceClientWithBase(rc clients.ResourceClient) VirtualServiceClient
func NewVirtualServiceClientWithToken ¶
func NewVirtualServiceClientWithToken(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 (list VirtualServiceList) Clone() VirtualServiceList
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)
namespace is optional, if left empty, names can collide if the list contains more than one with the same name
func (VirtualServiceList) Names ¶
func (list VirtualServiceList) Names() []string
func (VirtualServiceList) NamespacesDotNames ¶
func (list VirtualServiceList) NamespacesDotNames() []string
func (VirtualServiceList) Sort ¶
func (list VirtualServiceList) Sort() VirtualServiceList
type VirtualServiceReconciler ¶
type VirtualServiceReconciler interface {
Reconcile(namespace string, desiredResources VirtualServiceList, transition TransitionVirtualServiceFunc, opts clients.ListOpts) error
}
func NewVirtualServiceReconciler ¶
func NewVirtualServiceReconciler(client VirtualServiceClient) VirtualServiceReconciler