k8s-cloudwatch-adapter icon indicating copy to clipboard operation
k8s-cloudwatch-adapter copied to clipboard

allow usage of IMDSv2

Open clhuang opened this issue 4 years ago • 1 comments

Description of changes: Current implementation panics at string(body[0 : len(body)-1]) if the instance requires IMDSv2, as the metadata endpoint returns status 401 and empty body. In this case, instead fetch the metadata token and use that to actually fetch the metadata.

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

clhuang avatar Nov 01 '20 18:11 clhuang

What's up with that? We really need this. Thanks

himberjack avatar Dec 23 '20 11:12 himberjack