-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Add Horizontal Pod Autoscaler (HPA) Support for Airflow API Server #52392
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
Conversation
|
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide (https://github.com/apache/airflow/blob/main/contributing-docs/README.rst)
|
|
Hi @romsharon98, @eladkal could you help review this PR? Thanks! |
04b9b32 to
8b8528c
Compare
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions. |
|
No!! Pls don't!! |
8b8528c to
cd16f0f
Compare
jscheffl
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.
Tanks for being patient with the PR. From review this looks good to me. Some nit in regards of docs as what the users will see - mainly to be clear.
Then if adjusted I assume good to merge, if not somebody objects.
cd16f0f to
df11bf4
Compare
|
Happy to see my first PR got reviewed from you. Thanks. |
b40801d to
06f2f8c
Compare
1. add hpa ymal 2. add hpa schema into values.schema
…lt CPU utilization
06f2f8c to
2281693
Compare
…pache#52392) * Add api-server hpa yaml 1. add hpa ymal 2. add hpa schema into values.schema * Refine HPA enablement condition for Airflow API Server * Add tests for Airflow API Server HPA configuration * refactor(chart): clarify apiServer HPA configuration and update default CPU utilization * Fix CI Error * Swap assertion operands for consistency * Apply suggestions from code review --------- Co-authored-by: Jens Scheffler <95105677+jscheffl@users.noreply.github.com>
Description:
This pull request introduces Horizontal Pod Autoscaler (HPA) support for the Airflow API server in the Helm chart, enabling automatic scaling of API server pods based on resource utilization or custom metrics. The changes enhance the chart's flexibility and scalability, allowing users to configure autoscaling for the API server to handle varying workloads efficiently.
Changes:
Created
chart/templates/api-server/api-server-hpa.yamlto define the HPA resource for the API server.Modified
chart/values.schema.jsonto include a new hpa section under apiServer.Added HPA configuration in
chart/values.yamlunder apiServer.hpa with sensible defaultsIntroduced
helm-tests/tests/helm_tests/apiserver/test_hpa_apiserver.pyto validate HPA behaviorHow to Test:
apiServer.hpa.enabled=trueand verify the HPA resource is created with default settings.minReplicaCount,maxReplicaCount,metrics, orbehaviorin values.yaml and confirm the HPA resource reflects the changes.helm-tests/tests/helm_tests/apiserver/test_hpa_apiserver.pyto validate logic.Additional Notes:
Included deployment and HPA status screenshot from kubectl displaying an Airflow API server deployment with 4 pods running.
Related Issues:
#51935
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rstor{issue_number}.significant.rst, in airflow-core/newsfragments.