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

feat: Beta support for running consul-k8s without client agents #1552

Merged
merged 15 commits into from
Sep 28, 2022

Conversation

ishustava
Copy link
Contributor

@ishustava ishustava commented Sep 28, 2022

Changes proposed in this PR:

  • This is a feature branch merge (all changes to this branch have been individually reviewed)
  • Still need to add Changelog (I'll create a separate PR)

How I've tested this PR:
acceptance tests

How I expect reviewers to test this PR:
I expect you to just hit approve 🤣

Checklist:

  • Tests added
  • CHANGELOG entry added

    HashiCorp engineers only, community PRs should not add a changelog entry.
    Entries should use present tense (e.g. Add support for...)

ishustava and others added 15 commits September 27, 2022 11:52
Add initial support for the basic service mesh running with agentless.

* Update connect-inject deployment to talk to consul servers (currently only in-cluster servers are supported; external servers support will come in a later PR)
* Update endpoints controller to register and deregister services and health checks in the catalog and stop using agent APIs
* Update connect-init command to take the -node-name flag so that it can search for services within a given node using catalog APIs
* Add k8s probes to the envoy container
* Provide -node-name flag to the consul connect envoy command so that we can generate correct configuration
* Selectively disable acceptance tests that don't yet work in this configuration
* Disable consul clients by default
* Register mesh-gateways using the endpoints controller.
- Use consul-dataplane to configure the mesh-gateway proxy and remove envoy container.
- Remove instances of client and auto-encrypt from the deployment.
* Replace ioutil.ReadFile with os.ReadFile
…ager (#1502)

* Introduce new set of Consul flags that will be used by all consul-k8s commands
* Use consul-server-connection-manager to discover servers and use up-to-date
  server IP every time we need to make an API request.
- Added a `terminating-gateway-service.yaml` template. In order to register the deployment with the Endpoints Controller, a "dummy" service must exist so that a Kubernetes endpoint object is created, triggering the Endpoints Controller reconcile loop.
- Modified the `terminating-gateway-deployment.yaml` template:
  - Added a "managed by" label.
  - Added annotations to configure the behavior of the Endpoints Controller during registration.
  - Removed the `copy-consul-bin` init container.
  - Changed the `terminating-gateway-init` init container to use `connect-init` instead of `acl-init` as the client `acl-init` talked to will no longer exist in agentless.
  - Removed the `preStop` hook from the `terminating-gateway` container.
  - Removed the `consul-sidecar` container in preparation for the blessings of the Consul Dataplane. 
- Removed BATS tests which covered features no longer present in agentless.
- Added BATS tests for `terminating-gateway-service` and for Consul namespace handling in `terminating-gateway-deployment`.
- Added annotation `consul.hashicorp.com/terminating-gateway-namespace` to configure which Consul namespace a terminating gateway will be placed in when using Consul Enterprise.
- Modified the Endpoints Controller to register terminating gateways
  - Added a `switch` to the `createGatewayRegistrations` method which handles configuration of the endpoint particular to the terminating gateway.
  - Added unit tests which verify the registrations created by `createGatewayRegistrations` is correct.
  - Added a unit test to verify the the `Reconcile` method does register the endpoint.

Co-authored-by: Iryna Shustava <[email protected]>
Co-authored-by: Ashwin Venkatesh <[email protected]>
Co-authored-by: Ashwin Venkatesh <[email protected]>
… command (#1520)

* Introduce new set of Consul flags that will be used by all consul-k8s commands
* Use consul-server-connection-manager to discover servers and use up-to-date
  server IP every time we need to make an API request.

Co-authored-by: Ashwin Venkatesh <[email protected]>
* integrate partition-init job with consul-server-connection-manager
* integrate controller with consul-server-connection-manager
* modify partition token to be be able read all services so that it works with connection manager
- Use consul-dataplane instead of envoy.
@curtbushko curtbushko self-requested a review September 28, 2022 20:23
Copy link
Contributor

@curtbushko curtbushko left a comment

Choose a reason for hiding this comment

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

As you wish!

@ishustava ishustava merged commit 583008a into main Sep 28, 2022
@ishustava ishustava deleted the agentless-base branch September 28, 2022 21:30
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