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

Remove Connect Managed Proxies #6220

Merged
merged 60 commits into from
Aug 9, 2019
Merged

Remove Connect Managed Proxies #6220

merged 60 commits into from
Aug 9, 2019

Conversation

mikemorris
Copy link
Contributor

@mikemorris mikemorris commented Jul 25, 2019

Closes #5848

This is feeling big and I definitely need a gut check on if I'm inadvertently removing unrelated things that just happen to reference other proxies.

  • Should consul connect envoy still use the environment variables defined in the proxyprocess interface?
  • Completely remove ProxyManager supervision
  • Should the Connect.Proxy and Connect.ProxyDefaults objects be completely gone now? YES, remove from service definition and global config.
  • Should the service.connect.proxy key in service definitions go away? YES.
  • Should the /v1/agent/connect/proxy/:proxy_id endpoint go away? YES.
  • Does Agent still need to be able to verifyProxyToken and resolveProxyToken?
    • Tentatively looks like this is specific to managed proxies and safe to remove.
  • There are a handful of ACL tests (starting at TestAgentConnectCALeafCert_aclDefaultDeny) that appear to incidentally configure a managed proxy - how should these tests be refactored?
    • Several of these appeared to be specific to managed proxies and have been removed.
  • Has all proxy state persistence in agent snapshots been removed?
  • Has all local proxy state on agents been removed?

agent/agent.go Show resolved Hide resolved
agent/config/builder.go Outdated Show resolved Hide resolved
agent/config/config.go Outdated Show resolved Hide resolved
agent/config/runtime.go Outdated Show resolved Hide resolved
agent/proxyprocess/proxy.go Outdated Show resolved Hide resolved
api/agent.go Show resolved Hide resolved
rboyer
rboyer previously requested changes Jul 26, 2019
Copy link
Member

@rboyer rboyer left a comment

Choose a reason for hiding this comment

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

So red! It's great, but I think there are a few more things you can still round up and delete.

@mikemorris mikemorris requested review from a team July 29, 2019 23:15
@rboyer rboyer added this to the 1.6.0-rc1 milestone Aug 6, 2019
Copy link
Member

@mkeeler mkeeler left a comment

Choose a reason for hiding this comment

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

That was a mammoth sized PR. Overall everything looks in order. I added a few notes thoughout (I will resolve some of them shortly as it will be easier to find them once I complete the review).

CI will catch Envoy integration issues but have you gone through the Connect guide on Learn using the builtin proxy. Thats probably the quickest way to ensure things work as expected.

agent/agent.go Show resolved Hide resolved
@@ -248,7 +229,7 @@ func (s *HTTPServer) AgentServices(resp http.ResponseWriter, req *http.Request)

// Use empty list instead of nil
for id, s := range services {
agentService := buildAgentService(s, proxies)
agentService := buildAgentService(s)
Copy link
Member

Choose a reason for hiding this comment

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

Adding this here as a note that we should probably double check the v1/agent/services output on 1.6.0 beta 3 against this branch when non-managed sidecar proxies are used. I believe all should be well but it would be good to verify that central config still gets factored into the output here.

agent/agent_endpoint.go Show resolved Hide resolved
command/flags/connect.go Outdated Show resolved Hide resolved
command/flags/connect.go Outdated Show resolved Hide resolved
command/flags/connect.go Outdated Show resolved Hide resolved
@mikemorris
Copy link
Contributor Author

mikemorris commented Aug 7, 2019

Given some of my uncertainty around the ConnectFlags implementation, I think I'll try rolling back just that attempted bit of consolidation to avoid risking breaking anything there. (I think there's a pretty clear path, it's just a little less DRY.)

Are there any unit tests I should be adding here? It seems like some of the CLI flag/env var functionality is untested currently - any suggestions of examples or patterns would be appreciated.

@mikemorris
Copy link
Contributor Author

mikemorris commented Aug 8, 2019

There's some future work that may be nice here to consolidate the interface, environment variables and CLI flags common to built-in proxies and Envoy (and any future proxy integrations), but punting on that for now in favor of minimizing optional refactoring in what is a pretty massive PR already. I walked through the Connect tutorial again and the built-in proxy functionality appears to be working just fine, think this should be ready to squash!

Copy link
Member

@mkeeler mkeeler left a comment

Choose a reason for hiding this comment

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

LGTM

@mikemorris mikemorris dismissed rboyer’s stale review August 9, 2019 19:04

Requested changes have been addressed.

"ModifyIndex": 0
}
],
"passing": [
Copy link
Member

Choose a reason for hiding this comment

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

I think you nuked 312->340 by accident.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Opened #6303

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.

5 participants