-
Notifications
You must be signed in to change notification settings - Fork 324
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
Enable endpoints controller #467
Conversation
939e904
to
dc6001b
Compare
@@ -1,131 +0,0 @@ | |||
package connectinject |
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.
everything here was unused, except for escapeJSONPointer
, which was only used in tests. I've moved it to the test that was using it instead.
DestinationServiceName: "counting", | ||
DestinationServiceID: "counting-counting", |
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.
this is to fix errors in consul agent logs
dc6001b
to
3d8c1f3
Compare
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.
This looks so excellent!! Have a few comments and suggestions. The one regarding passing in a pod pointer reference to metrics annotations is the one that is potentially "blocking"
Co-authored-by: Kyle Schochenmaier <kschoche@gmail.com>
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.
🍏 📗 🟢 💚 🥗 🟩
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.
Excellent work!
This PR enables the endpoints controller and configures the connect-init container to now search for services. It removes the old functionality where the services were registered in the init container. The full list of changes is below container_init: Remove service registration from the init container template and the corresponding tests. Note that I have removed some of the tests prematurely, even though that logic has not yet been implemented in the endpoints controller. Namely, tests for metrics configuration and namespaces. However, I think that is OK as these tests will be added back when we do implement those. Other removed tests that didn't already have coverage in the endpoints controller have been moved to the endpoints controller. consul-sidecar: Consul sidecar is now only injected if we need to run the metrics merging server. The consulSidecar function now fails if you try to run it when metrics merging isn't enabled, and if it is, we configure it to not register services. envoy-sidecar: Remove the preStop hook from the envoy sidecar container. The hook will no longer work as there is no service.hcl file, plus services should now be deregistered only be the endpoints controller. connect-init: Remove the temporary -skip-service-registration-polling flag since we now always need to poll for services. endpoints-controller: Enable endpoints controller in the inject-connect command.
This PR enables the endpoints controller and configures the connect-init container to now search for services. It removes the old functionality where the services were registered in the init container. The full list of changes is below container_init: Remove service registration from the init container template and the corresponding tests. Note that I have removed some of the tests prematurely, even though that logic has not yet been implemented in the endpoints controller. Namely, tests for metrics configuration and namespaces. However, I think that is OK as these tests will be added back when we do implement those. Other removed tests that didn't already have coverage in the endpoints controller have been moved to the endpoints controller. consul-sidecar: Consul sidecar is now only injected if we need to run the metrics merging server. The consulSidecar function now fails if you try to run it when metrics merging isn't enabled, and if it is, we configure it to not register services. envoy-sidecar: Remove the preStop hook from the envoy sidecar container. The hook will no longer work as there is no service.hcl file, plus services should now be deregistered only be the endpoints controller. connect-init: Remove the temporary -skip-service-registration-polling flag since we now always need to poll for services. endpoints-controller: Enable endpoints controller in the inject-connect command.
Changes proposed in this PR:
This PR enables the endpoints controller and configures the connect-init container to now search for services. It removes the old functionality where the services were registered in the init container. The full list of changes is below
container_init
Remove service registration from the init container template and the corresponding tests.
Note that I have removed some of the tests prematurely, even though that logic has not yet been implemented in the endpoints controller. Namely, tests for metrics configuration and namespaces. However, I think that is OK as these tests will be added back when we do implement those.
For other removed tests, if there wasn't already coverage in the endpoints controller, I've moved them there.
consul-sidecar
Consul sidecar is now only injected if we need to run the metrics merging server. The
consulSidecar
function now fails if you try to run it when metrics merging isn't enabled, and if it is, we configure it to not register services.envoy-sidecar
Remove the preStop hook from the envoy sidecar container. The hook will no longer work as there is no service.hcl file, plus services should now be deregistered only be the endpoints controller.
connect-init
Remove the temporary
-skip-service-registration-polling
flag since we now always need to poll for services.endpoints-controller
Enable endpoints controller in the inject-connect command.
How I've tested this PR:
Ran connect, controller, mesh-, ingress-, and terminating gateway acceptance tests only in insecure configuration as endpoints controller does not yet support TLS and ACLs link.
Note that I've added an acceptance test for when consul clients are restarted here.
How I expect reviewers to test this PR:
Acceptance tests. However, if you would like or have time, you could also test it manually.
Checklist: