From 3d48153a5381d1db0dbd91ffc15413cd7d55c862 Mon Sep 17 00:00:00 2001 From: Ketan Umare <16888709+kumare3@users.noreply.github.com> Date: Mon, 11 Apr 2022 22:34:16 -0700 Subject: [PATCH] Moving all plugins to a common package, for easy loading (#423) * Moving all plugins to a common package, for easy loading Signed-off-by: Ketan Umare * updated Signed-off-by: Ketan Umare --- flytepropeller/cmd/controller/main.go | 12 +----------- flytepropeller/plugins/loader.go | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 11 deletions(-) create mode 100644 flytepropeller/plugins/loader.go diff --git a/flytepropeller/cmd/controller/main.go b/flytepropeller/cmd/controller/main.go index 3b19fb0488..e01cd71651 100644 --- a/flytepropeller/cmd/controller/main.go +++ b/flytepropeller/cmd/controller/main.go @@ -1,17 +1,7 @@ package main import ( - _ "github.com/flyteorg/flyteplugins/go/tasks/plugins/array/awsbatch" - _ "github.com/flyteorg/flyteplugins/go/tasks/plugins/array/k8s" - _ "github.com/flyteorg/flyteplugins/go/tasks/plugins/hive" - _ "github.com/flyteorg/flyteplugins/go/tasks/plugins/k8s/kfoperators/mpi" - _ "github.com/flyteorg/flyteplugins/go/tasks/plugins/k8s/kfoperators/pytorch" - _ "github.com/flyteorg/flyteplugins/go/tasks/plugins/k8s/pod" - _ "github.com/flyteorg/flyteplugins/go/tasks/plugins/k8s/sagemaker" - _ "github.com/flyteorg/flyteplugins/go/tasks/plugins/k8s/spark" - _ "github.com/flyteorg/flyteplugins/go/tasks/plugins/webapi/athena" - _ "github.com/flyteorg/flyteplugins/go/tasks/plugins/webapi/bigquery" - _ "github.com/flyteorg/flyteplugins/go/tasks/plugins/webapi/snowflake" + _ "github.com/flyteorg/flytepropeller/plugins" "github.com/flyteorg/flytestdlib/contextutils" "github.com/flyteorg/flytestdlib/promutils/labeled" diff --git a/flytepropeller/plugins/loader.go b/flytepropeller/plugins/loader.go new file mode 100644 index 0000000000..f12442d73c --- /dev/null +++ b/flytepropeller/plugins/loader.go @@ -0,0 +1,17 @@ +// Package plugins facilitates all the plugins that should be loaded by FlytePropeller +package plugins + +import ( + // Common place to import all plugins, so that it can be imported by Singlebinary (flytelite) or by propeller main + _ "github.com/flyteorg/flyteplugins/go/tasks/plugins/array/awsbatch" + _ "github.com/flyteorg/flyteplugins/go/tasks/plugins/array/k8s" + _ "github.com/flyteorg/flyteplugins/go/tasks/plugins/hive" + _ "github.com/flyteorg/flyteplugins/go/tasks/plugins/k8s/kfoperators/mpi" + _ "github.com/flyteorg/flyteplugins/go/tasks/plugins/k8s/kfoperators/pytorch" + _ "github.com/flyteorg/flyteplugins/go/tasks/plugins/k8s/pod" + _ "github.com/flyteorg/flyteplugins/go/tasks/plugins/k8s/sagemaker" + _ "github.com/flyteorg/flyteplugins/go/tasks/plugins/k8s/spark" + _ "github.com/flyteorg/flyteplugins/go/tasks/plugins/webapi/athena" + _ "github.com/flyteorg/flyteplugins/go/tasks/plugins/webapi/bigquery" + _ "github.com/flyteorg/flyteplugins/go/tasks/plugins/webapi/snowflake" +)