Skip to content

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

Draft
AlexanderYastrebov wants to merge 1 commit intomasterfrom
routesrv/standalone-redis-updater
Draft

routesrv: discover redis shards without fetching full cluster state#2956
AlexanderYastrebov wants to merge 1 commit intomasterfrom
routesrv/standalone-redis-updater

Conversation

@AlexanderYastrebov
Copy link
Copy Markdown
Contributor

  • 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
Comment thread routesrv/routesrv.go
dataclient routing.DataClient
)
if opts.Kubernetes {
kdc, err = kubernetes.New(opts.KubernetesDataClientOptions())
Copy link
Copy Markdown
Contributor 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.

1 participant