GitHub user smktpd closed the discussion with a comment: How to allocate python 
operator resources

Answering myself: this was actual for a prehistoric version [2.2.0 of 
cncf-kubernetes provider via fqcn 
`airflow.providers.cncf.kubernetes.backcompat.pod.Resources`](https://airflow.apache.org/docs/apache-airflow-providers-cncf-kubernetes/2.2.0/_api/airflow/providers/cncf/kubernetes/backcompat/pod/index.html),
 which since then has long been deprecated.

[Airflow 
docs](https://airflow.apache.org/docs/apache-airflow/2.11.0/tutorial/taskflow.html#dependency-separation-using-kubernetes-pod-operator)
 suggest using `@task.kubernetes` decorator 
([code](https://github.com/apache/airflow/blob/providers-cncf-kubernetes/10.12.3/providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/decorators/kubernetes.py))
 that [since ver 5.0.0 of cncf-kubernetes 
provider](https://github.com/apache/airflow/blob/providers-cncf-kubernetes/10.12.3/providers/cncf/kubernetes/docs/changelog.rst#500)
 [has 
param](https://github.com/apache/airflow/blob/providers-cncf-kubernetes/10.12.3/task-sdk/src/airflow/sdk/definitions/decorators/__init__.pyi#L526)
 `container_resources` that accepts 
[objects](https://github.com/apache/airflow/blob/providers-cncf-kubernetes/10.12.3/airflow-core/src/airflow/example_dags/example_kubernetes_executor.py#L195-L198)
 of type `k8s.V1ResourceRequirements`

GitHub link: 
https://github.com/apache/airflow/discussions/39538#discussioncomment-15690335

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]

Reply via email to