Skip to content

Commit

Permalink
[AIRFLOW-5445] Reduce the required resources for the Kubernetes's sid…
Browse files Browse the repository at this point in the history
…ecar (apache#6062)
  • Loading branch information
mik-laj authored Sep 15, 2019
1 parent ae9608d commit 7b5cf44
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 6 additions & 1 deletion airflow/kubernetes/pod_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,12 @@ class PodDefaults:
name=SIDECAR_CONTAINER_NAME,
command=['sh', '-c', XCOM_CMD],
image='alpine',
volume_mounts=[VOLUME_MOUNT]
volume_mounts=[VOLUME_MOUNT],
resources=k8s.V1ResourceRequirements(
requests={
"cpu": "1m",
}
),
)


Expand Down
3 changes: 2 additions & 1 deletion tests/kubernetes/test_pod_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,8 @@ def test_gen_pod_extract_xcom(self, mock_uuid):
'name': 'xcom',
'mountPath': '/airflow/xcom'
}
]
],
'resources': {'requests': {'cpu': '1m'}},
}
self.expected['spec']['containers'].append(container_two)
self.expected['spec']['containers'][0]['volumeMounts'].insert(0, {
Expand Down

0 comments on commit 7b5cf44

Please sign in to comment.