armada
armada copied to clipboard
Change pod deletion cache key to be based on UID
PodCache now requires a key generator function
- Rather than it being assumed it is
ExtractPodKey
Swapping the podsToDelete cache key function to be based on pod uid and default to ExtractPodKey
Now we delete pods with a precondition of UID (if present)
The issue these changes are trying to solve:
-
If the same pod keeps being submitted to the same cluster but failing (possibly due to ingress creation failing), it can only be deleted every 2 minutes due to the pod cache timeout.
-
This is because the pods have the same name, so it has to wait for the deletion cache entry to expire before a pod with the same name can be deleted again
-
Now we base the cache on UID instead of pod name, we can be much more responsive to deleting pods with the same name if they keep falling onto the same cluster