eladkal commented on code in PR #33680:
URL: https://github.com/apache/airflow/pull/33680#discussion_r1304662996
##########
airflow/providers/cncf/kubernetes/operators/pod.py:
##########
@@ -706,10 +715,51 @@ def post_complete_action(self, *, pod, remote_pod,
**kwargs):
remote_pod=remote_pod,
)
+ def setup_connection_secrets(self, context):
+ """Create Kubernetes secrets based on Airflow connections."""
+ for s in self.connection_secrets:
+ name =
f"{context['dag'].dag_id}-{context['task_instance'].task_id}-{_rand_str(8)}"
Review Comment:
This will not work as dag_id and task_id can contain chars not allowed in
K8s.
You will need to handle it like:
https://github.com/apache/airflow/blob/f971ba2f2f9703d0e1954e52aaded52a83c2f844/airflow/providers/cncf/kubernetes/operators/pod.py#L132
--
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]