LamaAni / KubernetesJobOperator

An airflow operator that executes a task in a kubernetes cluster, given a kubernetes yaml configuration or an image refrence.
57 stars 8 forks source link

Add name change for task ID and add support for name_postfix for task id #62

Closed barloc closed 2 years ago

barloc commented 2 years ago

Hello 2 parts in this PR. 1 part: fix logic with use of the name_prefix In your code if set empty string to the name_prefix argument, then function uses task_id. IMHO, if we set empty string to the argument, we don't want to use any prefix to pod name (all other types).

2 part: add name_postfix and random_name_postfix_length to the operator. if we want to use ConfigMap with Job(or Pod) ConfigMap must have not random name (without uuid postfix). So such optional arguments are looking not bad :)

LamaAni commented 2 years ago

I wonder if we should add a global config for this. e.g. add_task_id_postfix in the ariflow config. In any case, this is correct.

barloc commented 2 years ago

Hi I fixed description in the py file and added description for this arguments to README.

LamaAni commented 2 years ago

Release