jtblin / kube2iam

kube2iam provides different AWS IAM roles for pods running on Kubernetes
BSD 3-Clause "New" or "Revised" License
1.97k stars 318 forks source link

update doHealthcheck to support IMDSv2 #304

Open marcelobartsch-jt opened 3 years ago

marcelobartsch-jt commented 3 years ago

What this PR does / why we need it:

IMDSv2 need token, IMDSv1 Also works with token so no need to special flags. but feel free to do another PR with more elegant code. I'm not a Go Programmer so some things might be done wrongly,

Which issue this PR fixes

(optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged)

Special notes:

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-instance-metadata-service.html

Checklist chart

[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]

coveralls commented 3 years ago

Coverage Status

Coverage remained the same at 19.481% when pulling e79920f725cc3334f0934f43c41ebc0a9718ced9 on marcelobartsch:feature/healthcheck-imdsv2 into 0674908a09796246ee2309344628486d791430f6 on jtblin:master.