Set httpPutResponseHopLimit to 2 in instanceMetadataOptions as default when creating instance #4247
Labels
kind/feature
Categorizes issue or PR as related to a new feature.
needs-priority
needs-triage
Indicates an issue or PR lacks a `triage/foo` label and requires one.
/kind feature
Describe the solution you'd like
[A clear and concise description of what you want to happen.]
Regarding #4037 support, I would propose to set the default HTTPPutResponseHopLimit to 2 in container environment.
When customers is using instance profile role instead of using base64 aws credentials (very typical usage in production env), capa container needs 2 hops to retrieve aws credentials from metadata service. If default hop limit is 1, capa fails to get credentials and fail at the first with:
If we set HTTPPutResponseHopLimit to 2 as default, it will avoid capa failure and other applications that needs to access AWS. Otherwise we need customers to set the awsmachine template explicitly:
They are very likely to forget or not aware of this knowledge and get a failed env.
Another benefit is customers don't need to change awsmachinetemplate very often due to the HopLimit issue in production env , which as we known, is immutable and it is a burden to update to a new machinetemplate.
I also see HTTPPutResponseHopLimit to 2 is recommended in container environment:
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instancedata-data-retrieval.html#imds-considerations
https://aws.amazon.com/about-aws/whats-new/2020/08/amazon-eks-supports-ec2-instance-metadata-service-v2/
Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]
Environment:
kubectl version
):/etc/os-release
):The text was updated successfully, but these errors were encountered: