-
Notifications
You must be signed in to change notification settings - Fork 327
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
konvoy-dp: start Envoy with minimal bootstrap config #85
Conversation
|
||
var ( | ||
// overridable by unit tests | ||
newConfigFile = GenerateBootstrapFile |
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.
Isn't it more intuitive to pass it to the New
method and just pass different implementation in tests? This way you don't need such comment in production code. Additionaly, I can't see it overriden in tests anywhere, am I wrong?
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.
Again, this is idiomatic Go.
Yes, it's not used at the moment, but at least designed to be unit testable.
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.
Can you point out some examples? I'd like to learn about it.
bonus points: outside k8s codebase.
return err | ||
} | ||
|
||
ctx, cancel := context.WithCancel(context.Background()) |
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.
Interesting approach. I can see that cancel()
fires SIGKILL signal on the Envoy process. I think we should do it more gracefully with SIGTERM and wait couple of seconds until all requests are processed. We don't have to do it now, we can create a task and do it later.
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.
Ok
components/konvoy-control-plane/app/konvoy-dp/pkg/dataplane/envoy/envoy_test.go
Outdated
Show resolved
Hide resolved
components/konvoy-control-plane/app/konvoy-dp/pkg/dataplane/envoy/envoy_test.go
Outdated
Show resolved
Hide resolved
b7d6f80
to
c7b13bf
Compare
c7b13bf
to
167ca7a
Compare
changes:
konvoy-dp
toolkonvoy-dp run
command to start Envoy with minimal bootstrap configurationkonvoy-dp
configuration