Comments (4)
from gloo.
Option A: Routing to the Kubernetes Service directly
This works by routing traffic from the client, through the gateway-proxy, directly to the Kubernetes Service. As @DuncanDoyle points out, this means that we are relying on the kube-proxy as opposed to our gateway-proxy for upstream load balancing.
This option is configured via the API:
routes:
- matchers:
- prefix: /petstore
routeAction:
single:
kube:
ref:
name: petstore
namespace: default
port: 8080
The ControlPlane relies on a Gloo primitive, the Upstream CR, to define upstream workloads. This is meant as a generic API to apply to upstream workloads as this may be a kubernetes service, or any other type of destination. Because of this API, we have logic to validate that upstream destinations are in fact valid. This works by performing the following steps:
- Convert a "destination" into the Upstream reference (name/namespace)
- Inspect the API Snapshot (the full set of resources that Gloo is aware of) to see if that Upstream ref exists
- Error if not
As a result, to allow for routing to a Kubernetes Service directly, Gloo must create an Upstream CR to represent the config (and therefore it is in the API Snapshot, and the above linked code does not return an error).
In order to generate the Upstream, Gloo must:
- Poll the list of Kubernetes Services (https://github.com/solo-io/gloo/blob/main/projects/gloo/pkg/upstreams/hybrid_client.go#L50)
- Update the internal memory to store those Upstream representations
This action has been proven to be more resource exhaustive
Option B: Routing to the Kubernetes Service via the Standard Upstream API
Instead of routing to a Kubernetes Service, you can route to the endpoints that a Kubernetes Service represents.
This is done via the Upstream API:
The ControlPlane will then execute an EDS loop (https://github.com/solo-io/gloo/blob/main/projects/gloo/pkg/plugins/kubernetes/eds.go#L88) in which the Upstreams are processed, and the ControlPlane continually resolves the available pods/endpoints to pass along to the gateway-proxy.
from gloo.
from gloo.
this is in prod https://docs.solo.io/gloo-edge/latest/guides/traffic_management/destination_types/kubernetes_services/ closing
from gloo.
Related Issues (20)
- Sizing Guide
- Envoy OpenTelemetry Extension
- Being able to set log level for Gloo Ingress Controller from Helm Chart
- 1.17 Backport %Common_duration HOT 2
- Support StatefulSessionPerRoute
- Allow management of the Envoy configuration parameter: `close_connections_on_host_set_change`.
- Gloo Gateway: Deletion of HTTPRoute does not update proxy
- Add "Front-Channel Logout" support to Gloo HOT 2
- "rate-limit" deployment fails if redis.disabled is set to "true" HOT 3
- Policy APIs (Route, VirtualHost, Listener): Support Status Reporting HOT 1
- Support per-LTS branch .trivyignore files
- Gloo Edge does not populate the identity object with the relevant data when wrapAsApiGateway is enabled HOT 1
- gRPC upstream example doesn't work
- Upgrade notes for 1.17 release
- HTTP Local RateLimit filter not honoring the tokens bucket refills HOT 1
- Defining a failover policy in an Upstream pointing to AWS Lambda function causes out-of-sync HOT 2
- Gloo APIs related to Kube Gateway API are not synced to solo-apis repo
- CurlEventuallyShouldOutput will succeed on error
- Curl results can be returned out of order
- oidcAuthorizationCode AuthConfig redirects to afterLogoutUrl instead of issuerUrl when access-token and refresh-token in Redis cache have expired HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gloo.