From 126ecfa12ce7c248cfc29175ebde8d8a88012531 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 --- cmd/controller/main.go | 12 +----------- plugins/loader.go | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 11 deletions(-) create mode 100644 plugins/loader.go diff --git a/cmd/controller/main.go b/cmd/controller/main.go index 3b19fb048..e01cd7165 100644 --- a/cmd/controller/main.go +++ b/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/plugins/loader.go b/plugins/loader.go new file mode 100644 index 000000000..f12442d73 --- /dev/null +++ b/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" +)