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(kubewarden-defaults): set failurePolicy: Ignore if mode == "monitor" #553

Merged
merged 1 commit into from
Oct 2, 2024

Conversation

Malet
Copy link
Contributor

@Malet Malet commented Oct 1, 2024

Description

Currently the default set of policies are applied in monitor mode, but cause all pods to be rejected if the kubewarden service is down. This should not be the case if the user's intention is to monitor instead of protect.

Test

I've added a couple of tests to a new suite for kubewarden-defaults to check this behaves as expected

Additional Information

Tradeoff

N/A

Potential improvement

Prevent catastrophic failure when kubewarden service is unavailable if in monitor mode

@Malet Malet requested a review from a team as a code owner October 1, 2024 17:14
Copy link
Member

@viccuad viccuad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, many thanks for this contribution and providing a test case!
I personally like this, yet I look forward to the other reviewers opinion because we may want to keep it false as default since this case is not usual.

Out of curiosity, could you expand on the cases where Kubewarden is down? The PolicyServers rollouts should provide with availability in any case. We can schedule follow-up work if needed.

Copy link
Member

@flavio flavio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That sounds good to me. Thanks for having extended the test suite too!

@flavio flavio merged commit e32aa5e into kubewarden:main Oct 2, 2024
5 checks passed
@Malet
Copy link
Contributor Author

Malet commented Oct 2, 2024

Out of curiosity, could you expand on the cases where Kubewarden is down? The PolicyServers rollouts should provide with availability in any case. We can schedule follow-up work if needed.

Our particular issue seems to have been caused by a deadlock between the HNC webhook and kubewarden when a nodepool was updated. I'm sure there are plenty of other scenarios where it is not available/schedulable (resource constraints etc.).

@flavio flavio added this to the 1.18 milestone Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants