jtblin / kube2iam

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

Use api when cache fails #267

Closed ltagliamonte-dd closed 4 years ago

ltagliamonte-dd commented 4 years ago

Thank to the new metrics I've added last time on cacheMiss k8s_pod_not_in_pod_cache, i was able to monitor and discover another path when sometimes the cache doesn't contain the info about the pod/IP:

Screen Shot 2020-03-12 at 4 23 25 PM

With this PR i'm trying to fix that path as well using the API as source of truth.

coveralls commented 4 years ago

Coverage Status

Coverage remained the same at 19.481% when pulling 740d570f45f8fb7823a0f4e58fde132a32a75d71 on ltagliamonte-dd:master into 472b46221a01917fe62084c4e5adba12616172de on jtblin:master.

ltagliamonte-dd commented 4 years ago

closing for the moment. the issue I'm recording seems not fixable atm because of this: https://github.com/kubernetes/kubernetes/issues/39113 added more details here: https://github.com/kubernetes/kubernetes/issues/39113#issuecomment-598897344