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

refactoring: refactor Envoy config generators to be modular and composable #570

Merged
merged 4 commits into from
Feb 10, 2020

Conversation

yskopets
Copy link
Contributor

@yskopets yskopets commented Feb 7, 2020

Summary

  • refactor Envoy config generators to be modular and composable

@yskopets yskopets requested review from a team and jakubdyszkiewicz February 7, 2020 10:24
@yskopets yskopets added this to the 0.4.0 milestone Feb 7, 2020
@yskopets yskopets force-pushed the refactoring/envoy-config-generators branch from 380083e to b26055e Compare February 7, 2020 11:07
pkg/xds/envoy/builder.go Outdated Show resolved Hide resolved
pkg/xds/envoy/builder.go Outdated Show resolved Hide resolved
@yskopets yskopets force-pushed the refactoring/envoy-config-generators branch from b26055e to 11d0d55 Compare February 7, 2020 11:20
@yskopets yskopets force-pushed the refactoring/envoy-config-generators branch from 11d0d55 to b6c7868 Compare February 7, 2020 11:25
Copy link
Contributor

@jakubdyszkiewicz jakubdyszkiewicz left a comment

Choose a reason for hiding this comment

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

Nice work, I like it 👍

A couple of suggestions:

  • Move all stuff connected with listeners to pkg/xds/envoy/listeners or pkg/xds/envoy/lds
  • Move all stuff connected with clusters to pkg/xds/envoy/clusters. Just move without refactor to similar pattern. We can do it later if needed
  • Move all stuff connected with endpoints to pkg/xds/envoy/endpoints. Just move without refactor to similar pattern.
  • Move all TLS stuff to pkg/xds/envoy/tls.go

This way we get rid of this envoy.go file so it won't become this "envoy generation god file" that it was before.

What do you think?


// ListenerBuilder is responsible for generating an Envoy listener
// by applying a series of ListenerConfigurers.
type ListenerBuilder interface {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be really an interface? I think struct is enough

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed

@yskopets
Copy link
Contributor Author

yskopets commented Feb 7, 2020

This way we get rid of this envoy.go file so it won't become this "envoy generation god file" that it was before.
What do you think?

Done

pkg/xds/envoy/tls_test.go Outdated Show resolved Hide resolved
@yskopets yskopets merged commit b48e975 into master Feb 10, 2020
@devadvocado devadvocado deleted the refactoring/envoy-config-generators branch March 30, 2020 13:16
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

3 participants