Skip to content
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

routesrv: discover redis shards without fetching full cluster state #2956

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AlexanderYastrebov
Copy link
Member

  • tests

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

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>
@AlexanderYastrebov AlexanderYastrebov added the major moderate risk, for example new API, small filter changes that have no risk like refactoring or logs label Feb 23, 2024
dataclient routing.DataClient
)
if opts.Kubernetes {
kdc, err = kubernetes.New(opts.KubernetesDataClientOptions())
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: close

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant