-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Allow other hosts for AWS_CONTAINER_CREDENTIALS_FULL_URI #2480
Comments
Thanks for reaching out! I'm not sure if this is a change we'd be able to make, but I'll definitely check with the team to get their thoughts. |
I reviewed this with the team today and it looks like we won't be able to extend or allow users to change the allowed hosts due to a org-wide security policy we have in place. Wish we could be of more help! |
|
ok thanks anyway |
@stobrien89 I think this is a pretty frustrating limitation. Containers that are not running in host networking mode can still talk to ports on the host system by adding extra hosts to the container that point to All I really want to do is add |
Is your feature request related to a problem? Please describe.
I'm trying to use https://github.com/awslabs/amazon-ecs-local-container-endpoints with kubernetes. Related: awslabs/amazon-ecs-local-container-endpoints#48.
If I create a kubernetes service for one or more ECS local endpoints containers and tell my other containers about it using
AWS_CONTAINER_CREDENTIALS_FULL_URI=http://name-of-service/creds
, I get this error.An alternative approach would be to use
iptables
to forward packets from the magic address (169.254.170.2
) to the service. But I don't want to have to runiptables
manually on every node. Also kubernetes won't let me assign a link-local address to a pod or service.Another way would be to run the ECS container in the same pod as each of my other containers, and point them to it using
AWS_CONTAINER_CREDENTIALS_FULL_URI=http://localhost/creds
. I also don't like that approach because it requires each node to have AWS credentials stored on it. Also some of the pods run using custom resource definitions that aren't compatible with the ECS local endpoints container.Describe the solution you'd like
I'd like a way to extend
botocore.utils.ContainerMetadataFetcher._ALLOWED_HOSTS
without monkey patching it.One option would be to add another static entry, e.g.
'ecs-local-endpoints'
to match the name of the service in the example compose file.Another option would be to expose an API to customize the allowed hosts.
For me the first option would be better, because I won't have to modify code that already works on ECS. But I guess there are good reasons for limiting the allowed hosts by default.
The text was updated successfully, but these errors were encountered: