-
Notifications
You must be signed in to change notification settings - Fork 467
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
feat: Add support for PDBs on deployment and statefulset #2141
Conversation
Sorry, I missed the bundle during the first try. I have updated the PR |
awesome, a missing change in the stage 🤦 |
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.
Overall this looks good! Thank you for updating the logic for version detection as well to be more generic. Could you also update one of the e2e to set the PDB and ensure it gets reconciled correctly and the selector works as expected?
// for the OpenTelemetryCollector workload. | ||
// | ||
// +optional | ||
PodDisruptionBudget *PodDisruptionBudgetSpec `json:"podDisruptionBudget,omitempty"` |
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.
note for other reviewers, this is a paired down version of the main PDB spec because we don't want to allow the configuration of the selector
Thanks for the quick review, tomorrow I'll address al the comments 😄 |
I have addressed all the comments. I'm not 100% if I have done the e2e test correctly because it's the 1st time I have used kuttl but at least it works in local 🤣 |
It looks like I have to review the e2e test to work on multiple cluster versions. Let me do it before triggering again the CI because the check will fail again. I'm on it |
@pavolloffay , |
Let's see how quickly goes the conversation in #2145 I am happy to open a PR next week to bump the version. |
Signed-off-by: Jorge Turrado <[email protected]>
I have just rebased main branch and updated this PR. PTAL when you have some time @pavolloffay @jaronoff97 |
Signed-off-by: Jorge Turrado <[email protected]>
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 think we may want to add something in the validating webhook to be sure that we don't attempt a bad config
|
I'm spinning up a cluster with that version to check it |
Signed-off-by: Jorge Turrado <[email protected]>
@pavolloffay , I've tested it locally with k8s 1.23 and (at least locally) the feature works: The problem I have seen is that the deletion is producing timeouts |
Signed-off-by: Jorge Turrado <[email protected]>
I've noticed that if I use my own namespace for the tests, the k8s GC removes the namespaces more quickly and I can also validate the generated labels, so I've updated my test to use it's own namespace, and now 30 seconds of timeout is more than enough (the test needs a few seconds indeed, so far from 30 seconds, at least locally). I say this because I see other e2e tests with > 150 seconds of timeouts and maybe the root cause it's something like this. The cause of failures was that, timeout deleting the namespace :( |
The PR looks good to me. But I am also interested in @jaronoff97 question whether we could do some validation of the PDB fields that we added to our CR. |
Which kind of validation? I mean, I added a check in webhooks to validate if both have been set, and the other validations are already done by the openapi spec (but I can be missing any important thing at some point) |
Signed-off-by: Jorge Turrado <[email protected]>
Signed-off-by: Jorge Turrado <[email protected]>
@JorTurFer thank you so much for your contribution 🎊🎉 |
You're welcome! |
Fixes: #2136