Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix missing redirect on m5/c5 instances (#130)
The AWS metadata service works differently on new instance types like m5.large and c5.large. The behavior on old instances is that if you call: ``` 169.254.169.254/latest/meta-data/iam/security-credentials ``` It will redirect to: ``` 169.254.169.254/latest/meta-data/iam/security-credentials/ ``` Which will respond with the IAM role name. On new instances there is no redirect, it just responds with the IAM role name directly. Since kube2iam didn't intercept the URL without the slash, the pod will initially get the worker node role and then try to request credentials for that role, which kube2iam will deny. Fix is to intercept both versions of the URL. Fix #127
- Loading branch information