Gloo invites invites developers to extend Gloo’s functionality and adapt to new use cases via the addition of plugins.
Gloo’s plugin based architecture makes it easy to extend functionality in a variety of areas:
- Gloo’s API: extensible through the use of Protocol Buffers along with Solo-Kit
- Service Discovery Plugins: automatically discover service endpoints from catalogs such as Kubernetes and Consul
- Function Discovery Plugins: annotate services with information discovered by polling services directly (such as OpenAPI endpoints and gRPC methods).
- Routing Plugins: customize what happens to requests when they match a route or virtual host
- Upstream Plugins: customize what happens to requests when they are routed to a service
- Operators for Configuration: Gloo exposes its intermediate language for proxy configuration via the
gloo.solo.io/ProxyCustom Resource, allowing operators to leverage Gloo for multiple use cases. The Gloo Gateway and Sqoop provide API Gateway and GraphQL Server functionality respectively, without needing to run in the same process (or even the same container) as Gloo.
Gloo API Concepts
- v1.Proxies provide the routing configuration which Gloo will translate and apply to Envoy.
v1.Upstreams describe routable destinations for Gloo.
Proxies represent a unified configuration to be applied to one or more instances of a proxy. You can think of the proxy of as tree like such:
proxy ├─ bind-address │ ├── domain-set │ │ ├── /route │ │ ├── /route │ │ ├── /route │ │ └── tls-config │ └── domain-set │ ├── /route │ ├── /route │ ├── /route │ └── tls-config └─ bind-address ├── domain-set │ ├── /route │ ├── /route │ ├── /route │ └── tls-config └── domain-set ├── /route ├── /route ├── /route └── tls-config
A single proxy CRD contains all the configuration necessary to be applied to an instance of Envoy. In the Gloo system, Proxies are treated as an intermediary representation of config, while user-facing config is imported from simpler, more opinionated resources such as the gateway.VirtualService or Kubernetes Ingress objects.
For this reason, a standard Gloo deployment contains one or more controllers which programmatically generate and write these CRDs to provide simpler, use-case specific APIs such as API Gateway and Ingress. Sqoop is an advanced controller which creates routing configuration for Gloo from GraphQL Schemas.
Click here for a tutorial providing a simple example utilizing this lower-level Proxy API. This tutorial will walk you through building a Kubernetes controller to automatically configure Gloo without any user interaction](example-proxy-controller.go).
- Upstreams represent destinations for routing requests in Gloo. Routes in Gloo specify one or more Upstreams (by name) as their destination. Upstreams have a
typewhich is provided in their
upstreamSpecfield. Each type of upstream corresponds to an Upstream Plugin, which tells Gloo how to translate upstreams of that type to Envoy clusters. When a route is declared for an upstream, Gloo invokes the corresponding plugin for that type
This Section includes the following developer guides:
Building External Auth Plugins: Guidelines and best practices for developing and configuring Go plugins to extend Gloo's ext auth server
Note: the Controller tutorial does not require modifying any Gloo code.