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

Add webserver PodDisruptionBudget #21735

Merged
merged 5 commits into from
Mar 10, 2022
Merged

Add webserver PodDisruptionBudget #21735

merged 5 commits into from
Mar 10, 2022

Conversation

mirobertod
Copy link
Contributor

Add PodDisruptionBudget for the webserver component to helm chart

@potiuk
Copy link
Member

potiuk commented Feb 26, 2022

LGTM but some tests are faiing. Can you please rebase and see if this is not caused by it ?

@mirobertod
Copy link
Contributor Author

LGTM but some tests are faiing. Can you please rebase and see if this is not caused by it ?

Sure, rebased.

@mirobertod
Copy link
Contributor Author

LGTM but some tests are faiing. Can you please rebase and see if this is not caused by it ?

@potiuk tests are green now

@potiuk
Copy link
Member

potiuk commented Mar 2, 2022

I think it would be needed to add helm chart tests for it.

@potiuk
Copy link
Member

potiuk commented Mar 6, 2022

@jedcunningham ? Do you concur?

@github-actions github-actions bot added the okay to merge It's ok to merge this PR as it does not require more tests label Mar 6, 2022
@github-actions
Copy link

github-actions bot commented Mar 6, 2022

The PR is likely OK to be merged with just subset of tests for default Python and Database versions without running the full matrix of tests, because it does not modify the core of Airflow. If the committers decide that the full tests matrix is needed, they will add the label 'full tests needed'. Then you should rebase to the latest main or amend the last commit of the PR, and push it with --force-with-lease.

Copy link
Member

@jedcunningham jedcunningham left a comment

Choose a reason for hiding this comment

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

Overall looks good. What do you think about just exposing podDisruptionBudget.maxUnavailable, instead of having the extra config layer?

We should also add support for minAvailable too.

chart/values.schema.json Outdated Show resolved Hide resolved
@jedcunningham jedcunningham added this to the Airflow Helm Chart 1.6.0 milestone Mar 8, 2022
@mirobertod
Copy link
Contributor Author

Tests are failing:

chart/tests/test_pdb_pgbouncer.py::PgbouncerPdbTest::test_should_pass_validation_with_just_pdb_enabled_v1:
jsonschema.exceptions.ValidationError: None is valid under each of {'type': ['integer', 'null']}, {'type': ['string', 'null']}

Failed validating 'oneOf' in schema['properties']['spec']['properties']['minAvailable']:
    {'oneOf': [{'type': ['string', 'null']}, {'type': ['integer', 'null']}]}

On instance['spec']['minAvailable']:
    None

I don't understand very well the error, I've already added null for the list of types in the schema.

@jedcunningham may you help me? thanks

@jedcunningham
Copy link
Member

I wonder if the null can't land in the actual yaml sent to k8s. That's a k8s validation error, not our schema. Try removing the default minAvailable: ~ from values.

@jedcunningham
Copy link
Member

I just noticed that maxUnavailable and minAvailable are mutually exclusive!

https://kubernetes.io/docs/reference/kubernetes-api/policy-resources/pod-disruption-budget-v1/#PodDisruptionBudgetSpec

Sorry for the detour. I'm thinking we should remove the addition of minAvailable for this PR, though still change the type of maxUnavailable to int or string.

@jedcunningham jedcunningham merged commit 161fcbf into apache:main Mar 10, 2022
@jedcunningham
Copy link
Member

Thanks @mirobertod 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:helm-chart Airflow Helm Chart okay to merge It's ok to merge this PR as it does not require more tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants