amoghrajesh commented on code in PR #62129:
URL: https://github.com/apache/airflow/pull/62129#discussion_r2826397740
##########
providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/executors/kubernetes_executor_utils.py:
##########
@@ -553,12 +557,28 @@ def run_next(self, next_job: KubernetesJob) -> None:
pod_template_file = next_job.pod_template_file
dag_id, task_id, run_id, try_number, map_index = key
+
+ pod_id = create_unique_id(dag_id, task_id)
+ secret_name = ""
+
if len(command) == 1:
from airflow.executors.workloads import ExecuteTask
if isinstance(command[0], ExecuteTask):
workload = command[0]
- command = workload_to_command_args(workload)
+ secret_name = f"{WORKLOAD_SECRET_VOLUME_NAME}-{pod_id}"
+ self.kube_client.create_namespaced_secret(
+ namespace=self.namespace,
+ body=client.V1Secret(
+ metadata=client.V1ObjectMeta(
+ name=secret_name,
+ namespace=self.namespace,
+ labels={"airflow-workload-secret": "true"},
Review Comment:
Good call, handled it and added dag_id, task_id, run_id, map_index and even
ti_id: b4a137bcb0b95a2d7b033af4d1105334476c70bb
##########
providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/executors/kubernetes_executor_utils.py:
##########
@@ -553,12 +557,28 @@ def run_next(self, next_job: KubernetesJob) -> None:
pod_template_file = next_job.pod_template_file
dag_id, task_id, run_id, try_number, map_index = key
+
+ pod_id = create_unique_id(dag_id, task_id)
+ secret_name = ""
+
if len(command) == 1:
from airflow.executors.workloads import ExecuteTask
if isinstance(command[0], ExecuteTask):
workload = command[0]
- command = workload_to_command_args(workload)
+ secret_name = f"{WORKLOAD_SECRET_VOLUME_NAME}-{pod_id}"
Review Comment:
Handled in 3d773ea8872bad54342a1ada277664d9b0a9bb9d
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]