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: reuse skipper.Options #2416

Merged
merged 1 commit into from
Jun 22, 2023

Conversation

AlexanderYastrebov
Copy link
Member

@AlexanderYastrebov AlexanderYastrebov commented Jun 21, 2023

Reuse skipper.Options datastructure to avoid duplicate work of adding
the same flags/options to both skipper and routesrv.

Followup on #1873

Signed-off-by: Alexander Yastrebov alexander.yastrebov@zalando.de

remote_redis_test.go Outdated Show resolved Hide resolved
@AlexanderYastrebov AlexanderYastrebov force-pushed the routesrv/reuse-skipper-options branch 3 times, most recently from 47fa773 to b3bb997 Compare June 22, 2023 12:15
@AlexanderYastrebov AlexanderYastrebov marked this pull request as ready for review June 22, 2023 12:20
Reuse skipper.Options datastructure to avoid duplicate work of adding
the same flags/options to both skipper and routesrv.

Followup on #1873

Signed-off-by: Alexander Yastrebov <alexander.yastrebov@zalando.de>
@MustafaSaber
Copy link
Member

👍

@@ -891,6 +891,39 @@ type Options struct {
LuaSources []string
}

func (o *Options) KubernetesDataClientOptions() kubernetes.Options {
Copy link
Member

Choose a reason for hiding this comment

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

Just one question here, is it better to have this as Options function or to send options reference?

Copy link
Member

Choose a reason for hiding this comment

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

What do you see as an advantage to change it?

@RomanZavodskikh
Copy link
Member

So, Skipper and Routesrv options set are completely identical, aren't they?

@RomanZavodskikh
Copy link
Member

👍

@@ -21,7 +21,6 @@ import (
"github.com/zalando/skipper/eskip"
"github.com/zalando/skipper/net"
"github.com/zalando/skipper/proxy"
routesrv "github.com/zalando/skipper/routesrv"
Copy link
Member

Choose a reason for hiding this comment

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

🎉

@szuecs
Copy link
Member

szuecs commented Jun 22, 2023

👍

@AlexanderYastrebov
Copy link
Member Author

AlexanderYastrebov commented Jun 22, 2023

So, Skipper and Routesrv options set are completely identical, aren't they?

yes, but routesrv uses only subset of them. Note also that it parses all flags so you can run it with a flag that it does not use e.g. bin/routesrv -compress-encodings=gzip and it also prints usage for all flags when invoked with -h.

@AlexanderYastrebov AlexanderYastrebov merged commit d266770 into master Jun 22, 2023
@AlexanderYastrebov AlexanderYastrebov deleted the routesrv/reuse-skipper-options branch June 22, 2023 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants