Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix race condition with statefulset pod recreation startup failure #142

Closed
wants to merge 1 commit into from

Conversation

jmickey
Copy link

@jmickey jmickey commented Apr 22, 2024

Closes #137

Resolve issue where StatefulSet pods in particular get caught in a race condition when their pods are recreated. There are a few ways to deal with this, but in this case I decided the easiest way would be to check if the pod is owned by a StatefulSet when it's created, and to append a random 5 character string to the end of the secret name.

This required some changes to the delete logic. Instead of assuming the secret name based on the pod name the updated logic gets the secret names from the volume list in the delete admission request.

@telegraf-tiger
Copy link

Thanks so much for the pull request!
🤝 ✒️ Just a reminder that the CLA has not yet been signed, and we'll need it before merging. Please sign the CLA when you get a chance, then post a comment here saying !signed-cla

@jmickey
Copy link
Author

jmickey commented Apr 22, 2024

!signed-cla

@jmickey
Copy link
Author

jmickey commented Apr 22, 2024

On second thought I am going to take another stab at this from a different angle. This solution breaks idempotency with the webhook which can lead to some unintended behaviour upon further testing.

@jmickey jmickey closed this Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant