From 184bce77d9a4ce2764bc8683bc8bed575186f59d Mon Sep 17 00:00:00 2001 From: Yee Hing Tong Date: Wed, 21 Aug 2024 15:13:04 -0700 Subject: [PATCH] Deprecation notice for pod plugin (#2698) Signed-off-by: Yee Hing Tong Signed-off-by: Eduardo Apolinario --- plugins/flytekit-k8s-pod/README.md | 6 ++++++ .../flytekit-k8s-pod/flytekitplugins/pod/__init__.py | 10 +++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/plugins/flytekit-k8s-pod/README.md b/plugins/flytekit-k8s-pod/README.md index 0c09d96c7d..8b25278124 100644 --- a/plugins/flytekit-k8s-pod/README.md +++ b/plugins/flytekit-k8s-pod/README.md @@ -1,5 +1,11 @@ # Flytekit Kubernetes Pod Plugin +> [!IMPORTANT] +> This plugin is no longer needed and is here only for backwards compatibility. No new versions will be published after v1.13.x +> Please use the `pod_template` and `pod_template_name` args to `@task` as described in https://docs.flyte.org/en/latest/deployment/configuration/general.html#configuring-task-pods-with-k8s-podtemplates +> instead. + + By default, Flyte tasks decorated with `@task` are essentially single functions that are loaded in one container. But often, there is a need to run a job with more than one container. In this case, a regular task is not enough. Hence, Flyte provides a Kubernetes pod abstraction to execute multiple containers, which can be accomplished using Pod's `task_config`. The `task_config` can be leveraged to fully customize the pod spec used to run the task. diff --git a/plugins/flytekit-k8s-pod/flytekitplugins/pod/__init__.py b/plugins/flytekit-k8s-pod/flytekitplugins/pod/__init__.py index 3e68602354..50dd9b5617 100644 --- a/plugins/flytekit-k8s-pod/flytekitplugins/pod/__init__.py +++ b/plugins/flytekit-k8s-pod/flytekitplugins/pod/__init__.py @@ -1,3 +1,7 @@ +import warnings + +from .task import Pod + """ .. currentmodule:: flytekitplugins.pod @@ -10,4 +14,8 @@ Pod """ -from .task import Pod +warnings.warn( + "This pod plugin is no longer necessary, please use the pod_template and pod_template_name options to @task as described " + "in https://docs.flyte.org/en/latest/deployment/configuration/general.html#configuring-task-pods-with-k8s-podtemplates", + FutureWarning, +)