-
Notifications
You must be signed in to change notification settings - Fork 134
Add readinessCondition to stop traffic to pods that will be stopped #530
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
Add readinessCondition to stop traffic to pods that will be stopped #530
Conversation
janhoy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not in a position to grok the entire PR, and I have not tested it either. But have some minor comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not familiar with Go or these kubernetes readiness gates, but I did little reading, tried putting the changes through a couple tools, did a basic logical read through, looks like a good patch to me and a nice improvement.
Co-authored-by: Jan Høydahl <[email protected]>
gerlowskija
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had a few minor comments and typo corrections, but otherwise LGTM!
| - pods/status | ||
| verbs: | ||
| - get | ||
| - patch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[0] Just want to make sure I understand how this stuff works:
This is a generated file, right? Or is this one maintained by hand?
And this line was added because of the patch call made here? Really cool that the generator is set up to that!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a generated file, and it would be really cool if it was automatically added based on what commands you use... But alas its a little less cool.
This is what determines this (each controller has a separate list, that all get combined to make this file): https://github.com/apache/solr-operator/pull/530/files#diff-27cb619f80d28ac158f7885b7925d8582babfa7fe1f824599d65a745302d237cR67
Resolves #529
This uses the pod readiness gates/conditions to ensure that traffic is stopped to pods that are about to be deleted for various reasons.
This will only work for those that use the managed update feature.
Things to do:
TrueinitiallyFalsebefore pod is evicted of replicas and stopped