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

Move instance credentials to shared library #3978

Closed
wants to merge 15 commits into from

Conversation

timj-hh
Copy link
Contributor

@timj-hh timj-hh commented Oct 23, 2023

Summary

This change moves remaining credentials module after [this pull request] to the shared library. This is needed for ECS frontend, EC2 client, ECR factory. Usages in agent/ have been accordingly updated.

Implementation details

  • Move and re-merge agent/credentials/instancecreds to ecs-agent/credentials/instancecreds and agent/credentials/providers to ecs-agent/credentials/providers
  • Replace uses of seelog to logger
  • go mod init && go mod vendor ran in ecs-agent and agent directories including aws-vpc-cni-plugins among other things.

amazon-ecs-agent/ecs-agent/credentials now looks like:

credentials
├── generate_mocks.go (Existed)
├── instancecreds
│   ├── instancecreds.go
│   ├── instancecreds_linux.go
│   ├── instancecreds_test.go
│   ├── instancecreds_unsupported.go
│   └── instancecreds_windows.go
├── interface.go (Existed)
├── manager.go (Existed)
├── manager_test.go (Existed)
├── mocks (Existed)
│   └── credentials_mocks.go (Existed)
└── providers
    ├── credentials_filename_linux.go
    ├── credentials_filename_unsupported.go
    ├── credentials_filename_windows.go
    ├── rotating_shared_credentials_provider.go
    └── rotating_shared_credentials_provider_test.go

Testing

make test and make run-integ-tests

New tests cover the changes: no (existing tests pass)

Description for the changelog

Move instance credentials and credential provider to shared library

Does this PR include breaking model changes? If so, Have you added transformation functions?
No

Licensing

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

@timj-hh timj-hh requested a review from a team as a code owner October 23, 2023 20:19
dependabot bot and others added 13 commits October 23, 2023 20:57
Bumps [github.com/docker/docker](https://github.com/docker/docker) from 20.10.24+incompatible to 24.0.6+incompatible.
- [Release notes](https://github.com/docker/docker/releases)
- [Commits](moby/moby@v20.10.24...v24.0.6)

---
updated-dependencies:
- dependency-name: github.com/docker/docker
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

Bump github.com/docker/docker from 20.10.24+incompatible to 24.0.6+incompatible in /agent

update docker version in /ecs-agent
the upstream issue with git secrets requiring "say" command has been fixed upstream: awslabs/git-secrets#221
Added the network builder and platform APIs into the shared library package. Network builder is intended to act as the API to be consumed by the agent to setup networking resources on the host. Network builder invokes the platform APIs to execute platform specific operations like creation of network namespaces etc.

---------

Co-authored-by: Samuel Konat <[email protected]>
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.

8 participants