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

konvoy-dp: start Envoy with minimal bootstrap config #85

Merged
merged 4 commits into from
Aug 1, 2019

Conversation

yskopets
Copy link
Contributor

@yskopets yskopets commented Aug 1, 2019

changes:

  • add konvoy-dp tool
  • add konvoy-dp run command to start Envoy with minimal bootstrap configuration
  • add konvoy-dp configuration

@yskopets yskopets added this to the 0.1 milestone Aug 1, 2019
@yskopets yskopets changed the title konvoy-dp: generate minimal Envoy bootstrap config konvoy-dp: start Envoy with minimal bootstrap config Aug 1, 2019

var (
// overridable by unit tests
newConfigFile = GenerateBootstrapFile
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

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())
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok

@yskopets yskopets merged commit dc05e56 into master Aug 1, 2019
@yskopets yskopets deleted the feature/add-konvoy-dp branch August 13, 2019 22:27
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.

None yet

2 participants