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

Centralize building of the aws.Config object #14048

Merged
merged 1 commit into from
Nov 17, 2020

Conversation

ungureanuvladvictor
Copy link
Member

@ungureanuvladvictor ungureanuvladvictor commented Nov 16, 2020

When running the ENI IPAM an operator does not need to pass any region env var flag for the AWS SDK to configure it's client because we read it from the ec2 metadata endpoint. If the same operator wants to run with --update-ec2-apdater-limit-via-api=true then the cilium-operator will fail to construct the ec2 client because a valid region was not passed.

I removed the logging that was identifying that we connected to the ec2 metadata (mostly because we do not have a logger in the package where I moved this). Happy to add it back and construct a logger there but did not think it provides a lot of value IMO.

I think in the future we should use the ec2.NewClient method to get the client for the ENI limits updater so we get bought into the same metrics + QPS pipeline as well.

Centralize building of the aws.Config object

@ungureanuvladvictor ungureanuvladvictor requested a review from a team as a code owner November 16, 2020 17:39
@ungureanuvladvictor ungureanuvladvictor requested review from a team and tgraf November 16, 2020 17:39
@maintainer-s-little-helper
Copy link

Commit 9772f8519b5b99107f2403f43c09a08ecde47b72 does not contain "Signed-off-by".

Please follow instructions provided in https://docs.cilium.io/en/stable/contributing/development/contributing_guide/#developer-s-certificate-of-origin

@maintainer-s-little-helper maintainer-s-little-helper bot added dont-merge/needs-sign-off The author needs to add signoff to their commits before merge. dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. labels Nov 16, 2020
@maintainer-s-little-helper maintainer-s-little-helper bot added this to In progress in 1.10.0 Nov 16, 2020
@maintainer-s-little-helper maintainer-s-little-helper bot removed the dont-merge/needs-sign-off The author needs to add signoff to their commits before merge. label Nov 16, 2020
@ungureanuvladvictor ungureanuvladvictor added the release-note/misc This PR makes changes that have no direct user impact. label Nov 16, 2020
@maintainer-s-little-helper maintainer-s-little-helper bot removed the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Nov 16, 2020
@ungureanuvladvictor ungureanuvladvictor added area/eni Impacts ENI based IPAM. area/operator Impacts the cilium-operator component labels Nov 16, 2020
@ungureanuvladvictor
Copy link
Member Author

test-me-please

Copy link
Member

@christarazi christarazi left a comment

Choose a reason for hiding this comment

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

Nice! Just a minor nit below. Also, could you add the PR context into the commit body itself?

pkg/aws/eni/limits/limits.go Outdated Show resolved Hide resolved
When running the ENI IPAM an operator does not need to pass any region
env var flag for the AWS SDK to configure it's client because we read it
from the ec2 metadata endpoint. If the same operator wants to run with
--update-ec2-apdater-limit-via-api=true then the cilium-operator will
fail to construct the ec2 client because a valid region was not passed.

Signed-off-by: Vlad Ungureanu <vladu@palantir.com>
@ungureanuvladvictor
Copy link
Member Author

test-me-please

@nathanjsweet nathanjsweet merged commit 1b1134c into master Nov 17, 2020
@nathanjsweet nathanjsweet deleted the vladu/centrlaize-aws-config branch November 17, 2020 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/eni Impacts ENI based IPAM. area/operator Impacts the cilium-operator component release-note/misc This PR makes changes that have no direct user impact.
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

4 participants