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

Feature/service connect #3414

Merged
merged 64 commits into from
Oct 4, 2022
Merged

Feature/service connect #3414

merged 64 commits into from
Oct 4, 2022

Conversation

ubhattacharjya
Copy link
Contributor

Summary

Merge feature/service-connect branch to dev.

All pull requests have been previously approved by aws-ecs-agent reviewer team

Implementation details

Testing

New tests cover the changes:

Description for the changelog

Feature - Add service connect feature. This feature enables ECS Service to be discoverable and ECS will leverage the container port mappings, service name and default application namespace associated with the cluster and the service to register your service for discovery and to enable discovery of dependencies through DNS lookup.

Licensing

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

mythri-garaga and others added 30 commits October 3, 2022 16:42
Add Service Connect egress VIP to pause container host config
Refactor out ServiceConnect from task engine
Add support for mapping relay parameters into task
Adding runtime configuration to ServiceConnect block
* Use pause container for SC container, let each pause container invoke CNI plugin individually

* Fix docker engine test race condition
There were 2 functions in apiTask that had complexitiy above 15; docketHostConfig and PostUnMarshalTask.

Reducing the complexity was done by combining the dependency ordering of volumes and links,
moving the conditional of Memory / CPU limits into the platform specific implementations of
initializeCgroupResourceSpec, and modifying PIDMode and IPCMode inside the checking functions
instead of in the outer function.
* Add Appnet Client
* Invoke Appnet's Drain Connections API on task shutdown
* Integrate Appnet's GetStats with Stats engine
The AppNet Agent client is reponsible for the model handling of
communicating with the AppNet Agent container, but it should treat
the connection information as configuration coming from the task.
This allows for changes with AppNet Agent versions to be encoded
in the ServiceConnect Manager only. Different http flags or similar
should go with the Container not static with Agent version.

This simply moves the path information back into the Task which
is populated by the ServiceConnect Manager.
mythri-garaga and others added 22 commits October 3, 2022 16:48
* Add AppNetLoader into task engine

* Add ability to get Image from loader

* Add support for starting Relay
* Minor updates for bootstrapping AppNet Relay task/container

* fix typo
* Move the service connect loader into manager

Since the loader is only used within the manager encapsulate it there.

* Make docker task engine agnostic to loader
* Adding a common Loader interface

This interface is currently in use in 2 places  and
those use cases will be consolidated to this interface

* Migrate the agent/eni/pause to new interface

Migrating the agent/eni/pause usecase over to the new agent/utils/loader

* Migrate the agent/serviceconnect to new interface

Migrating the agent/serviceconnect usecase over to the new agent/utils/loader
* SC attachment fixes; Use network mode from ACS payload

* Fix windows integ test

* Add case for None network mode

* Add back creating SC config through ENV
Set all expectations up front before running. Also tie the same operation together
with inOrder since they accept gomock.Any() which means their order isn't guaranteed.

Also if the engine describes the Agent container after start it should return HEALTHY
so that the task container will start.
…e; fix AppNet container pull error (#3329)

* Run AppNet Relay as non-privileged user

* Add filter for internal tasks during task retrieval

* Skip image pulling for AppNet containers

* Fix unit test

* Keep the existing usage for allTasksUnsafe, but extract the body to a new function that takes a flag to exclude internal tasks
* Update AppNet UID from 1337 to 20000

* Add ECS_CONTAINER_INSTANCE_ARN ENV for AppNet Agent container
…setting (#3390)

* Fix AppNet Relay health check configuration

* Fix invocation for ServiceConnect manager property setter
…3403)

* Write AppNet logs to /var/log/ecs/ if no logging driver configured

* Source ECS Agent log container path from ECS_LOGFILE env if present
@ubhattacharjya ubhattacharjya requested a review from a team as a code owner October 4, 2022 03:04
@yinyic yinyic added the bot/test label Oct 4, 2022
@ubhattacharjya ubhattacharjya merged commit 2e05d8f into dev Oct 4, 2022
@ubhattacharjya ubhattacharjya added this to the 1.64.0 milestone Oct 4, 2022
@gurpreetatwal
Copy link

Hi there, where can I found the documentation for this feature?

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.

9 participants