zalando-incubator / kube-aws-iam-controller

Distribute different AWS IAM credentials to different pods in Kubernetes via secrets.
MIT License
158 stars 18 forks source link

Add liveness check and endpoint to controller #60

Closed demonCoder95 closed 2 years ago

demonCoder95 commented 2 years ago

This patch adds a liveness probe endpoint to the controller by checking time elapsed since last refresh was successful. If it's been 5*interval duration since the last refresh, probe fails.

Reference: stackset-controller liveness probe endpoint code here. Issue: This patch addresses this issue which is part of a Post Mortem action item here.

rodrigodelmonte commented 2 years ago

Thanks for the improvement!

How trick would be to add a test for it? Anyway it is possible to test in a dev environment.

Can you also update the examples [0] and [1] ? [0] - https://github.com/zalando-incubator/kube-aws-iam-controller/blob/master/docs/deployment.yaml [1] - https://github.com/zalando-incubator/kube-aws-iam-controller/blob/master/docs/deployment_with_role.yaml

demonCoder95 commented 2 years ago

Yes, I thought about adding a unit test but then I though it's simpler to check this in dev, like you suggested. I'll add a commit to patch the examples. Thanks :)

rodrigodelmonte commented 2 years ago

:+1:

rodrigodelmonte commented 2 years ago

:+1:

demonCoder95 commented 2 years ago

👍