-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
[AIRFLOW-5445] Reduce the required resources for the Kubernetes's sidecar #6062
Conversation
@dimberman - is this OK from the "production" point of view? I am not sure what was the design considerations for pod scheduling via Kubernetes? |
I thought about it longer and we can turn off resource request at all. It is common practice for this type of container. |
59f94d0
to
cecab23
Compare
Codecov Report
@@ Coverage Diff @@
## master #6062 +/- ##
==========================================
+ Coverage 80.02% 80.02% +<.01%
==========================================
Files 594 594
Lines 34765 34765
==========================================
+ Hits 27821 27822 +1
+ Misses 6944 6943 -1
Continue to review full report at Codecov.
|
@potiuk What do you think about turning this mechanism off completely? |
@mik-laj I assume you refer to:
I could not find how it works in this case. Will we have requests/limits set to default values in this case? I believe so - from the documentation it looks like. And this is something you tried to prevent. But maybe you find some proof otherwise? |
I checked carefully and |
…ecar (apache#6062) (cherry picked from commit 7b5cf44)
…ecar (apache#6062) (cherry picked from commit 7b5cf44)
This default breaks airflow on kubernetes clusters with a limit on the difference between requests and limits (limiting the allowed amount of oversubscription):
|
This is a valid value, but the user has configured his cluster that prevents from working with Airflow. Users can configure many policies and restrictions in Kubernetes, but this is the configuration of their cluster and we have no influence on it. In a moment, a user may appear who will enter a completely reverse configuration and report an issues that the Pod is not properly configured, because each container should have these fields filled. |
That's a valid point, but/and there's a couple of points I'd raise:
|
We can set an upper limit as an additional improvement, which may allow other clusters to be launched, but we can still find people who have restrictions configured on cluster. There are many configuration options that can be configured by users. It is also worth adding the default LimitRanger configuration in the documentation, but the documentation is WIP. How did you install Airflow? It may be worth adding a working configuration in this repository. |
Clusters can be misconfigured, sure. But I feel there's a difference here, where an options is explicitly decided upon by Airflow. If you didn't specify the requests and limits, and airflow wouldn't start up, then it's the user's "fault". In this case, Airflow isn't working due to Airflow overriding a default value. That said, I feel overriding the limits to something sensible (like 2x the requests) is a good course of action. It'll make for saner defaults, the sidecar is granted limited resources, it'll never request an unreasonable amount of memory, and most importantly, you won't have to revert the PR. We run Airflow (webserver etc) on k8s in EKS, and use both the k8s executor and operator to spawn workers on the same cluster. The setup is just a bog-standard collection of k8s deployments, services, ingresses, and service accounts. |
We already have a consensus - adding an upper limit. Can you prepare PR with this change? I will gladly review. |
(cherry picked from commit 7b5cf44)
For GKE, the default value is 100m.
Which means that only 5 pods can be started on single machine n1-standard-1. After making this change, we will be able to run 9 pods at the same time A small change, but in special cases can significantly increase the performance of the cluster.
--
Make sure you have checked all steps below.
Jira
Description
Tests
Commits
Documentation