ashb commented on a change in pull request #6230: [AIRFLOW-5413] Allow K8S
worker pod to be configured from JSON/YAML file
URL: https://github.com/apache/airflow/pull/6230#discussion_r357557241
##########
File path: airflow/kubernetes/worker_configuration.py
##########
@@ -362,24 +366,17 @@ def generate_dag_volume_mount_path(self) -> str:
return self.kube_config.git_dags_folder_mount_point
- def make_pod(self, namespace, worker_uuid, pod_id, dag_id, task_id,
execution_date,
- try_number, airflow_command) -> k8s.V1Pod:
- """Creates POD."""
- pod_generator = PodGenerator(
- namespace=namespace,
- name=pod_id,
+ def make_pod(self) -> k8s.V1Pod:
Review comment:
Actually, one slight change/idea. How about we call this method `as_pod()`
(somewhat mirroring `as_dict` that is a common enough sight in python).
It's slightly clearer now to see `WorkerConfiguration(...).as_pod()` to know
that it is a "static" representation of the config than
`WorkerConfiguration(...).make_pod()`. Not much in it.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services