-
Notifications
You must be signed in to change notification settings - Fork 351
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
skipper: discover redis shards without fetching full cluster state #2934
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AlexanderYastrebov
added
the
major
moderate risk, for example new API, small filter changes that have no risk like refactoring or logs
label
Feb 13, 2024
AlexanderYastrebov
force-pushed
the
standalone-redis-updater-3
branch
from
February 13, 2024 13:30
106e764
to
114eac9
Compare
AlexanderYastrebov
changed the title
skipper: use kubernetes cluster client to discover redis shards
skipper: discover redis shards without fetching full cluster state
Feb 13, 2024
This was referenced Feb 13, 2024
AlexanderYastrebov
force-pushed
the
standalone-redis-updater-3
branch
5 times, most recently
from
February 14, 2024 20:32
7f9f986
to
43f7221
Compare
AlexanderYastrebov
force-pushed
the
standalone-redis-updater-3
branch
4 times, most recently
from
February 14, 2024 20:54
5d8e4f9
to
a3da67c
Compare
szuecs
reviewed
Feb 15, 2024
szuecs
reviewed
Feb 15, 2024
szuecs
reviewed
Feb 15, 2024
szuecs
reviewed
Feb 15, 2024
AlexanderYastrebov
force-pushed
the
standalone-redis-updater-3
branch
5 times, most recently
from
February 15, 2024 11:14
be8804c
to
9d9056f
Compare
Skipper supports Redis based Cluster Ratelimits and dynamic discovery of Redis instances using Kubernetes Service, see https://github.com/zalando/skipper/blob/master/docs/tutorials/ratelimit.md#redis-based-cluster-ratelimits Dynamic discovery relies on Kubernetes Dataclient that also fetches Ingresses and RouteGroups and creates routes from them. This change enables dynamic discovery of Redis instances using Kubernetes without fetching Ingresses and RouteGroups. When `-kubernetes` flag is not set but `-enable-swarm`, `-kubernetes-redis-service-namespace`, `-kubernetes-redis-service-name` and `-kubernetes-redis-service-port` are provided then Skipper creates Kubernetes dataclient to discover Redis instances but does not use this dataclient for routing. The change adds LoadEndpointAddresses to Kubernetes dataclient that is similar to caching GetEndpointAddresses but does not rely on previous call to Load or LoadAll to allow discovery of Redis shards without fetching full cluster state. Fixes #2476 Signed-off-by: Alexander Yastrebov <alexander.yastrebov@zalando.de>
AlexanderYastrebov
force-pushed
the
standalone-redis-updater-3
branch
from
February 15, 2024 11:30
9d9056f
to
540da27
Compare
szuecs
reviewed
Feb 15, 2024
|
||
When working with Redis swarm, use Kubernetes service selector. Configure it with `-kubernetes-redis-service-namespace` and `-kubernetes-redis-service-name` flags. | ||
#### HTTP Endpoint |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
👍 |
1 similar comment
👍 |
AlexanderYastrebov
added a commit
that referenced
this pull request
Feb 23, 2024
Routesrv supports dynamic discovery of Redis instances using Kubernetes Service, see https://github.com/zalando/skipper/blob/master/docs/tutorials/ratelimit.md#redis-based-cluster-ratelimits Dynamic discovery relies on Kubernetes Dataclient that also fetches Ingresses and RouteGroups and creates routes from them. This change enables dynamic discovery of Redis instances using Kubernetes without fetching Ingresses and RouteGroups. When -kubernetes flag is not set but -kubernetes-redis-service-namespace, -kubernetes-redis-service-name and -kubernetes-redis-service-port are provided then `routesrv` creates Kubernetes dataclient to discover Redis instances but does not use this dataclient to load routes. See previous #2934 Signed-off-by: Alexander Yastrebov <alexander.yastrebov@zalando.de>
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
major
moderate risk, for example new API, small filter changes that have no risk like refactoring or logs
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Skipper supports Redis based Cluster Ratelimits and
dynamic discovery of Redis instances using Kubernetes Service,
see https://github.com/zalando/skipper/blob/master/docs/tutorials/ratelimit.md#redis-based-cluster-ratelimits
Dynamic discovery relies on Kubernetes Dataclient that also fetches
Ingresses and RouteGroups and creates routes from them.
This change enables dynamic discovery of Redis instances using
Kubernetes without fetching Ingresses and RouteGroups.
When
-kubernetes
flag is not set but-enable-swarm
,-kubernetes-redis-service-namespace
,-kubernetes-redis-service-name
and-kubernetes-redis-service-port
are provided then Skipper createsKubernetes dataclient to discover Redis instances
but does not use this dataclient for routing.
The change adds LoadEndpointAddresses to Kubernetes dataclient that is
similar to caching GetEndpointAddresses but does not rely on
previous call to Load or LoadAll to allow discovery of
Redis shards without fetching full cluster state.
Fixes #2476