Repository: submariner-io/submariner-operator
Pull request #1651 (2021-11-02 11:14:28)

Rename /apis to /api
and make relevant necessary changes

Partially-Closes: #1329
Signed-Off-By: Janki Chhatbar <jchhatba@redhat.com>

<!--  Thanks for sending a pull request!  Here are some tips for you:

1. If this is your first time, please read our developer guide: https://submariner.io/development/
2. Ensure you have added the appropriate tests for your PR: https://submariner.io/development/code-review/#test-new-functionality
3. Read the code review guide to ease the review process: https://submariner.io/development/code-review/
4. If the PR is unfinished, mark it as a draft: https://submariner.io/development/code-review/#mark-work-in-progress-prs-as-drafts
5. If you are using CI to debug, use your private fork: https://submariner.io/development/code-review/#use-private-forks-for-debugging-prs-by-running-ci
6. Add labels to the PR as appropriate.

This template is based on the K8s/K8s template:

https://github.com/kubernetes/kubernetes/blob/master/.github/PULL_REQUEST_TEMPLATE.md
-->


submariner-bot: 🤖 Created branch: z_pr1651/Jaanki/refactor_api 
🚀 Full E2E won't run until the "ready-to-test" label is applied. I will add it automatically once the PR has 2 approvals, or you can add it manually.

Patch:
diff --git a/.lichen.yaml b/.lichen.yaml
index eda223b0..b47d6e45 100644
--- a/.lichen.yaml
+++ b/.lichen.yaml
@@ -17,7 +17,7 @@ allow:
   - "Zlib"
 
 override:
-  - path: "./apis"
+  - path: "./api"
     licenses: ["Apache-2.0"]
   - path: "github.com/rdegges/go-ipify"
     licenses: ["Unlicense"]
diff --git a/.yamllint.yml b/.yamllint.yml
index 194703b2..856c397a 100644
--- a/.yamllint.yml
+++ b/.yamllint.yml
@@ -10,7 +10,7 @@ rules:
 
 ignore: |
   /vendor
-  /apis/vendor
+  /api/vendor
   /deploy/crds
   /deploy/submariner/crds
   /deploy/mcsapi/crds/multicluster.x_k8s.io_serviceexports.yaml
diff --git a/Makefile b/Makefile
index a2af4fb7..6cd8354c 100644
--- a/Makefile
+++ b/Makefile
@@ -171,7 +171,7 @@ bin/subctl-%: generate-embeddedyamls $(shell find pkg/subctl/ -name "*.go") vend
 	export GOARCH GOOS; \
 	$(SCRIPTS_DIR)/compile.sh \
 		--ldflags "-X github.com/submariner-io/submariner-operator/pkg/version.Version=$(VERSION) \
-			   -X=github.com/submariner-io/submariner-operator/apis.DefaultSubmarinerOperatorVersion=$${DEFAULT_IMAGE_VERSION#v}" \
+			   -X=github.com/submariner-io/submariner-operator/api.DefaultSubmarinerOperatorVersion=$${DEFAULT_IMAGE_VERSION#v}" \
 		--noupx $@ ./pkg/subctl/main.go $(BUILD_ARGS)
 
 ci: generate-embeddedyamls golangci-lint markdownlint unit build images
@@ -187,12 +187,12 @@ $(CONTROLLER_GEN): vendor/modules.txt
 	mkdir -p $(@D)
 	$(GO) build -o $@ sigs.k8s.io/controller-tools/cmd/controller-gen
 
-deploy/crds/submariner.io_servicediscoveries.yaml: $(CONTROLLER_GEN) ./apis/submariner/v1alpha1/servicediscovery_types.go vendor/modules.txt
-	cd apis && $(GO) mod vendor && $(CONTROLLER_GEN) $(CRD_OPTIONS) paths="./..." output:crd:artifacts:config=../deploy/crds
+deploy/crds/submariner.io_servicediscoveries.yaml: $(CONTROLLER_GEN) ./api/submariner/v1alpha1/servicediscovery_types.go vendor/modules.txt
+	cd api && $(GO) mod vendor && $(CONTROLLER_GEN) $(CRD_OPTIONS) paths="./..." output:crd:artifacts:config=../deploy/crds
 	test -f $@
 
-deploy/crds/submariner.io_brokers.yaml deploy/crds/submariner.io_submariners.yaml: $(CONTROLLER_GEN) ./apis/submariner/v1alpha1/submariner_types.go vendor/modules.txt
-	cd apis && $(GO) mod vendor && $(CONTROLLER_GEN) $(CRD_OPTIONS) paths="./..." output:crd:artifacts:config=../deploy/crds
+deploy/crds/submariner.io_brokers.yaml deploy/crds/submariner.io_submariners.yaml: $(CONTROLLER_GEN) ./api/submariner/v1alpha1/submariner_types.go vendor/modules.txt
+	cd api && $(GO) mod vendor && $(CONTROLLER_GEN) $(CRD_OPTIONS) paths="./..." output:crd:artifacts:config=../deploy/crds
 	test -f $@
 
 # Submariner CRDs
@@ -208,7 +208,7 @@ generate-clientset: vendor/modules.txt
 	GO111MODULE=on $${GOPATH}/src/k8s.io/code-generator/generate-groups.sh \
 		client,deepcopy \
 		github.com/submariner-io/submariner-operator/pkg/client \
-		github.com/submariner-io/submariner-operator/apis \
+		github.com/submariner-io/submariner-operator/api \
 		submariner:v1alpha1
 
 # Generate code
diff --git a/apis/LICENSE b/api/LICENSE
similarity index 100%
rename from apis/LICENSE
rename to api/LICENSE
diff --git a/apis/addtoscheme_submariner_v1alpha1.go b/api/addtoscheme_submariner_v1alpha1.go
similarity index 90%
rename from apis/addtoscheme_submariner_v1alpha1.go
rename to api/addtoscheme_submariner_v1alpha1.go
index 8082a713..34e00cc1 100644
--- a/apis/addtoscheme_submariner_v1alpha1.go
+++ b/api/addtoscheme_submariner_v1alpha1.go
@@ -16,10 +16,10 @@ See the License for the specific language governing permissions and
 limitations under the License.
 */
 
-package apis
+package api
 
 import (
-	"github.com/submariner-io/submariner-operator/apis/submariner/v1alpha1"
+	"github.com/submariner-io/submariner-operator/api/submariner/v1alpha1"
 )
 
 func init() {
diff --git a/apis/apis.go b/api/apis.go
similarity index 98%
rename from apis/apis.go
rename to api/apis.go
index 4fa1bd98..c1fe1664 100644
--- a/apis/apis.go
+++ b/api/apis.go
@@ -16,7 +16,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 */
 
-package apis
+package api
 
 import (
 	"k8s.io/apimachinery/pkg/runtime"
diff --git a/apis/go.mod b/api/go.mod
similarity index 77%
rename from apis/go.mod
rename to api/go.mod
index 0ab82d0c..d47972cf 100644
--- a/apis/go.mod
+++ b/api/go.mod
@@ -1,4 +1,4 @@
-module github.com/submariner-io/submariner-operator/apis
+module github.com/submariner-io/submariner-operator/api
 
 go 1.15
 
diff --git a/apis/go.sum b/api/go.sum
similarity index 100%
rename from apis/go.sum
rename to api/go.sum
diff --git a/apis/submariner/group.go b/api/submariner/group.go
similarity index 100%
rename from apis/submariner/group.go
rename to api/submariner/group.go
diff --git a/apis/submariner/v1alpha1/doc.go b/api/submariner/v1alpha1/doc.go
similarity index 100%
rename from apis/submariner/v1alpha1/doc.go
rename to api/submariner/v1alpha1/doc.go
diff --git a/apis/submariner/v1alpha1/register.go b/api/submariner/v1alpha1/register.go
similarity index 100%
rename from apis/submariner/v1alpha1/register.go
rename to api/submariner/v1alpha1/register.go
diff --git a/apis/submariner/v1alpha1/servicediscovery_types.go b/api/submariner/v1alpha1/servicediscovery_types.go
similarity index 100%
rename from apis/submariner/v1alpha1/servicediscovery_types.go
rename to api/submariner/v1alpha1/servicediscovery_types.go
diff --git a/apis/submariner/v1alpha1/submariner_types.go b/api/submariner/v1alpha1/submariner_types.go
similarity index 100%
rename from apis/submariner/v1alpha1/submariner_types.go
rename to api/submariner/v1alpha1/submariner_types.go
diff --git a/apis/submariner/v1alpha1/versions.go b/api/submariner/v1alpha1/versions.go
similarity index 100%
rename from apis/submariner/v1alpha1/versions.go
rename to api/submariner/v1alpha1/versions.go
diff --git a/apis/submariner/v1alpha1/zz_generated.deepcopy.go b/api/submariner/v1alpha1/zz_generated.deepcopy.go
similarity index 100%
rename from apis/submariner/v1alpha1/zz_generated.deepcopy.go
rename to api/submariner/v1alpha1/zz_generated.deepcopy.go
diff --git a/controllers/servicediscovery/servicediscovery_controller.go b/controllers/servicediscovery/servicediscovery_controller.go
index b6c19840..444b3002 100644
--- a/controllers/servicediscovery/servicediscovery_controller.go
+++ b/controllers/servicediscovery/servicediscovery_controller.go
@@ -31,7 +31,7 @@ import (
 	operatorv1 "github.com/openshift/api/operator/v1"
 	operatorclient "github.com/openshift/cluster-dns-operator/pkg/operator/client"
 	errorsPkg "github.com/pkg/errors"
-	submarinerv1alpha1 "github.com/submariner-io/submariner-operator/apis/submariner/v1alpha1"
+	submarinerv1alpha1 "github.com/submariner-io/submariner-operator/api/submariner/v1alpha1"
 	"github.com/submariner-io/submariner-operator/controllers/helpers"
 	"github.com/submariner-io/submariner-operator/controllers/metrics"
 	"github.com/submariner-io/submariner-operator/pkg/images"
diff --git a/controllers/submariner/broker_controller.go b/controllers/submariner/broker_controller.go
index 96c733fe..cebe29d0 100644
--- a/controllers/submariner/broker_controller.go
+++ b/controllers/submariner/broker_controller.go
@@ -30,7 +30,7 @@ import (
 	"sigs.k8s.io/controller-runtime/pkg/client"
 	"sigs.k8s.io/controller-runtime/pkg/reconcile"
 
-	"github.com/submariner-io/submariner-operator/apis/submariner/v1alpha1"
+	"github.com/submariner-io/submariner-operator/api/submariner/v1alpha1"
 	"github.com/submariner-io/submariner-operator/pkg/broker"
 	"github.com/submariner-io/submariner-operator/pkg/gateway"
 	"github.com/submariner-io/submariner-operator/pkg/lighthouse"
diff --git a/controllers/submariner/daemonsets.go b/controllers/submariner/daemonsets.go
index f37e99b8..87f2873e 100644
--- a/controllers/submariner/daemonsets.go
+++ b/controllers/submariner/daemonsets.go
@@ -26,7 +26,7 @@ import (
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 	"sigs.k8s.io/controller-runtime/pkg/client"
 
-	"github.com/submariner-io/submariner-operator/apis/submariner/v1alpha1"
+	"github.com/submariner-io/submariner-operator/api/submariner/v1alpha1"
 )
 
 func (r *SubmarinerReconciler) updateDaemonSetStatus(ctx context.Context, daemonSet *appsv1.DaemonSet, status *v1alpha1.DaemonSetStatus,
diff --git a/controllers/submariner/gateway_resources.go b/controllers/submariner/gateway_resources.go
index 03e97de0..08e04e70 100644
--- a/controllers/submariner/gateway_resources.go
+++ b/controllers/submariner/gateway_resources.go
@@ -32,7 +32,7 @@ import (
 	"sigs.k8s.io/controller-runtime/pkg/client"
 	"sigs.k8s.io/controller-runtime/pkg/controller/controllerutil"
 
-	"github.com/submariner-io/submariner-operator/apis/submariner/v1alpha1"
+	"github.com/submariner-io/submariner-operator/api/submariner/v1alpha1"
 	"github.com/submariner-io/submariner-operator/controllers/helpers"
 	"github.com/submariner-io/submariner-operator/controllers/metrics"
 	"github.com/submariner-io/submariner-operator/pkg/names"
diff --git a/controllers/submariner/globalnet_resources.go b/controllers/submariner/globalnet_resources.go
index 1066b69b..edde0dbc 100644
--- a/controllers/submariner/globalnet_resources.go
+++ b/controllers/submariner/globalnet_resources.go
@@ -24,7 +24,7 @@ import (
 	corev1 "k8s.io/api/core/v1"
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 
-	"github.com/submariner-io/submariner-operator/apis/submariner/v1alpha1"
+	"github.com/submariner-io/submariner-operator/api/submariner/v1alpha1"
 	"github.com/submariner-io/submariner-operator/controllers/helpers"
 	"github.com/submariner-io/submariner-operator/controllers/metrics"
 	"github.com/submariner-io/submariner-operator/pkg/names"
diff --git a/controllers/submariner/loadbalancer_resources.go b/controllers/submariner/loadbalancer_resources.go
index 0e127930..a68b8148 100644
--- a/controllers/submariner/loadbalancer_resources.go
+++ b/controllers/submariner/loadbalancer_resources.go
@@ -22,7 +22,7 @@ import (
 	"strconv"
 
 	"github.com/go-logr/logr"
-	"github.com/submariner-io/submariner-operator/apis/submariner/v1alpha1"
+	"github.com/submariner-io/submariner-operator/api/submariner/v1alpha1"
 	"github.com/submariner-io/submariner-operator/controllers/helpers"
 	submv1 "github.com/submariner-io/submariner/pkg/apis/submariner.io/v1"
 	corev1 "k8s.io/api/core/v1"
diff --git a/controllers/submariner/np_syncer_resources.go b/controllers/submariner/np_syncer_resources.go
index 91245bd0..63f2da86 100644
--- a/controllers/submariner/np_syncer_resources.go
+++ b/controllers/submariner/np_syncer_resources.go
@@ -27,7 +27,7 @@ import (
 	corev1 "k8s.io/api/core/v1"
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 
-	"github.com/submariner-io/submariner-operator/apis/submariner/v1alpha1"
+	"github.com/submariner-io/submariner-operator/api/submariner/v1alpha1"
 	"github.com/submariner-io/submariner-operator/controllers/helpers"
 	"github.com/submariner-io/submariner-operator/pkg/discovery/network"
 	"github.com/submariner-io/submariner-operator/pkg/names"
diff --git a/controllers/submariner/route_agent_resources.go b/controllers/submariner/route_agent_resources.go
index f40a23fb..020d455f 100644
--- a/controllers/submariner/route_agent_resources.go
+++ b/controllers/submariner/route_agent_resources.go
@@ -27,7 +27,7 @@ import (
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 	"k8s.io/apimachinery/pkg/util/intstr"
 
-	"github.com/submariner-io/submariner-operator/apis/submariner/v1alpha1"
+	"github.com/submariner-io/submariner-operator/api/submariner/v1alpha1"
 	"github.com/submariner-io/submariner-operator/controllers/helpers"
 	"github.com/submariner-io/submariner-operator/pkg/names"
 )
diff --git a/controllers/submariner/servicediscovery_resources.go b/controllers/submariner/servicediscovery_resources.go
index c3fcce98..bd4e5a79 100644
--- a/controllers/submariner/servicediscovery_resources.go
+++ b/controllers/submariner/servicediscovery_resources.go
@@ -28,7 +28,7 @@ import (
 	"k8s.io/client-go/util/retry"
 	"sigs.k8s.io/controller-runtime/pkg/controller/controllerutil"
 
-	"github.com/submariner-io/submariner-operator/apis/submariner/v1alpha1"
+	"github.com/submariner-io/submariner-operator/api/submariner/v1alpha1"
 	"github.com/submariner-io/submariner-operator/pkg/names"
 )
 
diff --git a/controllers/submariner/submariner_controller.go b/controllers/submariner/submariner_controller.go
index 95399024..0c340f99 100644
--- a/controllers/submariner/submariner_controller.go
+++ b/controllers/submariner/submariner_controller.go
@@ -41,7 +41,7 @@ import (
 	"sigs.k8s.io/controller-runtime/pkg/reconcile"
 	"sigs.k8s.io/controller-runtime/pkg/source"
 
-	submopv1a1 "github.com/submariner-io/submariner-operator/apis/submariner/v1alpha1"
+	submopv1a1 "github.com/submariner-io/submariner-operator/api/submariner/v1alpha1"
 	submarinerclientset "github.com/submariner-io/submariner-operator/pkg/client/clientset/versioned"
 	"github.com/submariner-io/submariner-operator/pkg/discovery/network"
 	"github.com/submariner-io/submariner-operator/pkg/gateway"
diff --git a/controllers/submariner/submariner_networkdiscovery.go b/controllers/submariner/submariner_networkdiscovery.go
index bfcb0648..782e970e 100644
--- a/controllers/submariner/submariner_networkdiscovery.go
+++ b/controllers/submariner/submariner_networkdiscovery.go
@@ -20,7 +20,7 @@ package submariner
 import (
 	"fmt"
 
-	submopv1a1 "github.com/submariner-io/submariner-operator/apis/submariner/v1alpha1"
+	submopv1a1 "github.com/submariner-io/submariner-operator/api/submariner/v1alpha1"
 	"github.com/submariner-io/submariner-operator/pkg/discovery/network"
 )
 
diff --git a/go.mod b/go.mod
index 96b64537..2e96736c 100644
--- a/go.mod
+++ b/go.mod
@@ -38,7 +38,8 @@ require (
 	github.com/submariner-io/lighthouse v0.12.0-m0
 	github.com/submariner-io/shipyard v0.12.0-m0
 	github.com/submariner-io/submariner v0.12.0-m0
-	github.com/submariner-io/submariner-operator/apis v0.0.0-20210817145008-861856b068a1
+	github.com/submariner-io/submariner-operator/api v0.0.0-20210817145008-861856b068a1
+	github.com/submariner-io/submariner-operator/apis v0.0.0-20211108185031-39851b39dec6
 	github.com/submariner-io/submariner/pkg/apis v0.0.0-20210816153739-c8e6654e3930
 	github.com/ulikunitz/xz v0.5.10 // indirect
 	github.com/uw-labs/lichen v0.1.4
@@ -78,4 +79,4 @@ replace (
 )
 
 // Local packages
-replace github.com/submariner-io/submariner-operator/apis => ./apis
+replace github.com/submariner-io/submariner-operator/api => ./api
diff --git a/go.sum b/go.sum
index 9e190388..b1dd8ad8 100644
--- a/go.sum
+++ b/go.sum
@@ -1320,6 +1320,8 @@ github.com/submariner-io/shipyard v0.12.0-m0 h1:XEpIu0INoTfZg6y56ybX/jBbYizOjldv
 github.com/submariner-io/shipyard v0.12.0-m0/go.mod h1:DOtp7FHzb1JjUSZWP1dWkTfLwGhfse1/VFjjsl1XFQk=
 github.com/submariner-io/submariner v0.12.0-m0 h1:DYAajVk5H19CL/vv+siBOPQ1pvh6iAVoMYySaNHt/+M=
 github.com/submariner-io/submariner v0.12.0-m0/go.mod h1:dHqGBDtzdL7V3UBRRn42ZehnqU2h0nAp+BoUa9zJeJo=
+github.com/submariner-io/submariner-operator/apis v0.0.0-20211108185031-39851b39dec6 h1:M1TjJR7Puqm8qF1nbROlweqYzbf5hCjIZuzcfv2vmDE=
+github.com/submariner-io/submariner-operator/apis v0.0.0-20211108185031-39851b39dec6/go.mod h1:B+zRDZfMVnyRkVGas8SffK3ECWYVdDrzQVqimrdhuvo=
 github.com/submariner-io/submariner/pkg/apis v0.0.0-20210816112556-6e4bb78fab88/go.mod h1:VfjgFyeFkEzNCmZnTFdxWYuEvLyvH4429fwdue6gq1o=
 github.com/submariner-io/submariner/pkg/apis v0.0.0-20210816153739-c8e6654e3930 h1:6J41oeHHXCyP4Y/RNa8jfAiTuNEtnoc3gc6Sxj4S800=
 github.com/submariner-io/submariner/pkg/apis v0.0.0-20210816153739-c8e6654e3930/go.mod h1:VfjgFyeFkEzNCmZnTFdxWYuEvLyvH4429fwdue6gq1o=
diff --git a/main.go b/main.go
index 3f186b56..f9d0cc23 100644
--- a/main.go
+++ b/main.go
@@ -31,8 +31,8 @@ import (
 	_ "k8s.io/client-go/plugin/pkg/client/auth"
 	"k8s.io/client-go/rest"
 
-	"github.com/submariner-io/submariner-operator/apis"
-	submarinerv1alpha1 "github.com/submariner-io/submariner-operator/apis/submariner/v1alpha1"
+	"github.com/submariner-io/submariner-operator/api"
+	submarinerv1alpha1 "github.com/submariner-io/submariner-operator/api/submariner/v1alpha1"
 	"github.com/submariner-io/submariner-operator/controllers"
 	"github.com/submariner-io/submariner-operator/controllers/submariner"
 	"github.com/submariner-io/submariner-operator/pkg/lighthouse"
@@ -147,7 +147,7 @@ func main() {
 	}
 
 	// Setup Scheme for all resources
-	if err := apis.AddToScheme(mgr.GetScheme()); err != nil {
+	if err := api.AddToScheme(mgr.GetScheme()); err != nil {
 		log.Error(err, "")
 		os.Exit(1)
 	}
@@ -213,7 +213,7 @@ func main() {
 func serveCRMetrics(cfg *rest.Config) error {
 	// Below function returns filtered operator/CustomResource specific GVKs.
 	// For more control override the below GVK list with your own custom logic.
-	filteredGVK, err := k8sutil.GetGVKsFromAddToScheme(apis.AddToScheme)
+	filteredGVK, err := k8sutil.GetGVKsFromAddToScheme(api.AddToScheme)
 	if err != nil {
 		return err
 	}
diff --git a/pkg/client/clientset/versioned/fake/register.go b/pkg/client/clientset/versioned/fake/register.go
index d6a8fce4..9cd6928d 100644
--- a/pkg/client/clientset/versioned/fake/register.go
+++ b/pkg/client/clientset/versioned/fake/register.go
@@ -19,7 +19,7 @@ limitations under the License.
 package fake
 
 import (
-	submarinerv1alpha1 "github.com/submariner-io/submariner-operator/apis/submariner/v1alpha1"
+	submarinerv1alpha1 "github.com/submariner-io/submariner-operator/api/submariner/v1alpha1"
 	v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 	runtime "k8s.io/apimachinery/pkg/runtime"
 	schema "k8s.io/apimachinery/pkg/runtime/schema"
diff --git a/pkg/client/clientset/versioned/scheme/register.go b/pkg/client/clientset/versioned/scheme/register.go
index c35f616b..a4e5c008 100644
--- a/pkg/client/clientset/versioned/scheme/register.go
+++ b/pkg/client/clientset/versioned/scheme/register.go
@@ -19,7 +19,7 @@ limitations under the License.
 package scheme
 
 import (
-	submarinerv1alpha1 "github.com/submariner-io/submariner-operator/apis/submariner/v1alpha1"
+	submarinerv1alpha1 "github.com/submariner-io/submariner-operator/api/submariner/v1alpha1"
 	v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 	runtime "k8s.io/apimachinery/pkg/runtime"
 	schema "k8s.io/apimachinery/pkg/runtime/schema"
diff --git a/pkg/client/clientset/versioned/typed/submariner/v1alpha1/broker.go b/pkg/client/clientset/versioned/typed/submariner/v1alpha1/broker.go
index 5f3b1b8b..ce0756ad 100644
--- a/pkg/client/clientset/versioned/typed/submariner/v1alpha1/broker.go
+++ b/pkg/client/clientset/versioned/typed/submariner/v1alpha1/broker.go
@@ -22,7 +22,7 @@ import (
 	"context"
 	"time"
 
-	v1alpha1 "github.com/submariner-io/submariner-operator/apis/submariner/v1alpha1"
+	v1alpha1 "github.com/submariner-io/submariner-operator/api/submariner/v1alpha1"
 	scheme "github.com/submariner-io/submariner-operator/pkg/client/clientset/versioned/scheme"
 	v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 	types "k8s.io/apimachinery/pkg/types"
diff --git a/pkg/client/clientset/versioned/typed/submariner/v1alpha1/fake/fake_broker.go b/pkg/client/clientset/versioned/typed/submariner/v1alpha1/fake/fake_broker.go
index 9dd4454d..1a26ea95 100644
--- a/pkg/client/clientset/versioned/typed/submariner/v1alpha1/fake/fake_broker.go
+++ b/pkg/client/clientset/versioned/typed/submariner/v1alpha1/fake/fake_broker.go
@@ -21,7 +21,7 @@ package fake
 import (
 	"context"
 
-	v1alpha1 "github.com/submariner-io/submariner-operator/apis/submariner/v1alpha1"
+	v1alpha1 "github.com/submariner-io/submariner-operator/api/submariner/v1alpha1"
 	v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 	labels "k8s.io/apimachinery/pkg/labels"
 	schema "k8s.io/apimachinery/pkg/runtime/schema"
diff --git a/pkg/client/clientset/versioned/typed/submariner/v1alpha1/fake/fake_servicediscovery.go b/pkg/client/clientset/versioned/typed/submariner/v1alpha1/fake/fake_servicediscovery.go
index 7d0c08ca..4c3f585b 100644
--- a/pkg/client/clientset/versioned/typed/submariner/v1alpha1/fake/fake_servicediscovery.go
+++ b/pkg/client/clientset/versioned/typed/submariner/v1alpha1/fake/fake_servicediscovery.go
@@ -21,7 +21,7 @@ package fake
 import (
 	"context"
 
-	v1alpha1 "github.com/submariner-io/submariner-operator/apis/submariner/v1alpha1"
+	v1alpha1 "github.com/submariner-io/submariner-operator/api/submariner/v1alpha1"
 	v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 	labels "k8s.io/apimachinery/pkg/labels"
 	schema "k8s.io/apimachinery/pkg/runtime/schema"
diff --git a/pkg/client/clientset/versioned/typed/submariner/v1alpha1/fake/fake_submariner.go b/pkg/client/clientset/versioned/typed/submariner/v1alpha1/fake/fake_submariner.go
index c6d5e1f9..ecae3c55 100644
--- a/pkg/client/clientset/versioned/typed/submariner/v1alpha1/fake/fake_submariner.go
+++ b/pkg/client/clientset/versioned/typed/submariner/v1alpha1/fake/fake_submariner.go
@@ -21,7 +21,7 @@ package fake
 import (
 	"context"
 
-	v1alpha1 "github.com/submariner-io/submariner-operator/apis/submariner/v1alpha1"
+	v1alpha1 "github.com/submariner-io/submariner-operator/api/submariner/v1alpha1"
 	v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 	labels "k8s.io/apimachinery/pkg/labels"
 	schema "k8s.io/apimachinery/pkg/runtime/schema"
diff --git a/pkg/client/clientset/versioned/typed/submariner/v1alpha1/servicediscovery.go b/pkg/client/clientset/versioned/typed/submariner/v1alpha1/servicediscovery.go
index f723f48e..bf112cc3 100644
--- a/pkg/client/clientset/versioned/typed/submariner/v1alpha1/servicediscovery.go
+++ b/pkg/client/clientset/versioned/typed/submariner/v1alpha1/servicediscovery.go
@@ -22,7 +22,7 @@ import (
 	"context"
 	"time"
 
-	v1alpha1 "github.com/submariner-io/submariner-operator/apis/submariner/v1alpha1"
+	v1alpha1 "github.com/submariner-io/submariner-operator/api/submariner/v1alpha1"
 	scheme "github.com/submariner-io/submariner-operator/pkg/client/clientset/versioned/scheme"
 	v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 	types "k8s.io/apimachinery/pkg/types"
diff --git a/pkg/client/clientset/versioned/typed/submariner/v1alpha1/submariner.go b/pkg/client/clientset/versioned/typed/submariner/v1alpha1/submariner.go
index 3e901ad6..a0345967 100644
--- a/pkg/client/clientset/versioned/typed/submariner/v1alpha1/submariner.go
+++ b/pkg/client/clientset/versioned/typed/submariner/v1alpha1/submariner.go
@@ -22,7 +22,7 @@ import (
 	"context"
 	"time"
 
-	v1alpha1 "github.com/submariner-io/submariner-operator/apis/submariner/v1alpha1"
+	v1alpha1 "github.com/submariner-io/submariner-operator/api/submariner/v1alpha1"
 	scheme "github.com/submariner-io/submariner-operator/pkg/client/clientset/versioned/scheme"
 	v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 	types "k8s.io/apimachinery/pkg/types"
diff --git a/pkg/client/clientset/versioned/typed/submariner/v1alpha1/submariner_client.go b/pkg/client/clientset/versioned/typed/submariner/v1alpha1/submariner_client.go
index a2092984..39aa5585 100644
--- a/pkg/client/clientset/versioned/typed/submariner/v1alpha1/submariner_client.go
+++ b/pkg/client/clientset/versioned/typed/submariner/v1alpha1/submariner_client.go
@@ -19,7 +19,7 @@ limitations under the License.
 package v1alpha1
 
 import (
-	v1alpha1 "github.com/submariner-io/submariner-operator/apis/submariner/v1alpha1"
+	v1alpha1 "github.com/submariner-io/submariner-operator/api/submariner/v1alpha1"
 	"github.com/submariner-io/submariner-operator/pkg/client/clientset/versioned/scheme"
 	rest "k8s.io/client-go/rest"
 )
diff --git a/pkg/images/images.go b/pkg/images/images.go
index 49673b94..acd55b0a 100644
--- a/pkg/images/images.go
+++ b/pkg/images/images.go
@@ -21,7 +21,7 @@ import (
 	"fmt"
 	"strings"
 
-	apis "github.com/submariner-io/submariner-operator/apis/submariner/v1alpha1"
+	apis "github.com/submariner-io/submariner-operator/api/submariner/v1alpha1"
 	"github.com/submariner-io/submariner-operator/pkg/names"
 
 	v1 "k8s.io/api/core/v1"
diff --git a/pkg/subctl/cmd/deploybroker.go b/pkg/subctl/cmd/deploybroker.go
index a6ac802c..3ee12d3f 100644
--- a/pkg/subctl/cmd/deploybroker.go
+++ b/pkg/subctl/cmd/deploybroker.go
@@ -30,7 +30,7 @@ import (
 	"github.com/submariner-io/submariner-operator/pkg/subctl/components"
 	v1 "k8s.io/api/core/v1"
 
-	submarinerv1a1 "github.com/submariner-io/submariner-operator/apis/submariner/v1alpha1"
+	submarinerv1a1 "github.com/submariner-io/submariner-operator/api/submariner/v1alpha1"
 	"github.com/submariner-io/submariner-operator/pkg/broker"
 	"github.com/submariner-io/submariner-operator/pkg/internal/cli"
 	"github.com/submariner-io/submariner-operator/pkg/subctl/datafile"
diff --git a/pkg/subctl/cmd/diagnose/firewall_tunnel.go b/pkg/subctl/cmd/diagnose/firewall_tunnel.go
index 115f5595..de484099 100644
--- a/pkg/subctl/cmd/diagnose/firewall_tunnel.go
+++ b/pkg/subctl/cmd/diagnose/firewall_tunnel.go
@@ -23,7 +23,7 @@ import (
 	"strings"
 
 	"github.com/spf13/cobra"
-	"github.com/submariner-io/submariner-operator/apis/submariner/v1alpha1"
+	"github.com/submariner-io/submariner-operator/api/submariner/v1alpha1"
 	"github.com/submariner-io/submariner-operator/pkg/internal/cli"
 	"github.com/submariner-io/submariner-operator/pkg/subctl/cmd"
 	"github.com/submariner-io/submariner-operator/pkg/subctl/cmd/utils"
diff --git a/pkg/subctl/cmd/execute.go b/pkg/subctl/cmd/execute.go
index 58c9d545..ea20c34b 100644
--- a/pkg/subctl/cmd/execute.go
+++ b/pkg/subctl/cmd/execute.go
@@ -22,7 +22,7 @@ import (
 	"fmt"
 	"os"
 
-	"github.com/submariner-io/submariner-operator/apis/submariner/v1alpha1"
+	"github.com/submariner-io/submariner-operator/api/submariner/v1alpha1"
 	"github.com/submariner-io/submariner-operator/pkg/subctl/cmd/utils/restconfig"
 	submarinerv1 "github.com/submariner-io/submariner/pkg/apis/submariner.io/v1"
 	subClientsetv1 "github.com/submariner-io/submariner/pkg/client/clientset/versioned"
diff --git a/pkg/subctl/cmd/gather/operator.go b/pkg/subctl/cmd/gather/operator.go
index 57b8bf11..f43e394d 100644
--- a/pkg/subctl/cmd/gather/operator.go
+++ b/pkg/subctl/cmd/gather/operator.go
@@ -18,7 +18,7 @@ limitations under the License.
 package gather
 
 import (
-	submarinerOp "github.com/submariner-io/submariner-operator/apis/submariner/v1alpha1"
+	submarinerOp "github.com/submariner-io/submariner-operator/api/submariner/v1alpha1"
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 	"k8s.io/apimachinery/pkg/fields"
 	"k8s.io/apimachinery/pkg/runtime/schema"
diff --git a/pkg/subctl/cmd/gather/types.go b/pkg/subctl/cmd/gather/types.go
index c0043ea3..590cf0ac 100644
--- a/pkg/subctl/cmd/gather/types.go
+++ b/pkg/subctl/cmd/gather/types.go
@@ -18,7 +18,7 @@ limitations under the License.
 package gather
 
 import (
-	"github.com/submariner-io/submariner-operator/apis/submariner/v1alpha1"
+	"github.com/submariner-io/submariner-operator/api/submariner/v1alpha1"
 	"github.com/submariner-io/submariner-operator/pkg/internal/cli"
 	v1 "k8s.io/api/core/v1"
 	"k8s.io/apimachinery/pkg/types"
diff --git a/pkg/subctl/cmd/join.go b/pkg/subctl/cmd/join.go
index f2f82b5f..452077e9 100644
--- a/pkg/subctl/cmd/join.go
+++ b/pkg/subctl/cmd/join.go
@@ -42,7 +42,7 @@ import (
 	"github.com/submariner-io/submariner-operator/pkg/images"
 	"k8s.io/client-go/rest"
 
-	submariner "github.com/submariner-io/submariner-operator/apis/submariner/v1alpha1"
+	submariner "github.com/submariner-io/submariner-operator/api/submariner/v1alpha1"
 	submarinerclientset "github.com/submariner-io/submariner-operator/pkg/client/clientset/versioned"
 	"github.com/submariner-io/submariner-operator/pkg/discovery/network"
 	"github.com/submariner-io/submariner-operator/pkg/internal/cli"
diff --git a/pkg/subctl/cmd/resource.go b/pkg/subctl/cmd/resource.go
index adefe6f9..6f5b988b 100644
--- a/pkg/subctl/cmd/resource.go
+++ b/pkg/subctl/cmd/resource.go
@@ -28,7 +28,7 @@ import (
 	v1opts "k8s.io/apimachinery/pkg/apis/meta/v1"
 	"k8s.io/client-go/rest"
 
-	"github.com/submariner-io/submariner-operator/apis/submariner/v1alpha1"
+	"github.com/submariner-io/submariner-operator/api/submariner/v1alpha1"
 	subOperatorClientset "github.com/submariner-io/submariner-operator/pkg/client/clientset/versioned"
 	"github.com/submariner-io/submariner-operator/pkg/subctl/operator/submarinercr"
 )
diff --git a/pkg/subctl/cmd/show/versions.go b/pkg/subctl/cmd/show/versions.go
index 4ae62164..b3c85a32 100644
--- a/pkg/subctl/cmd/show/versions.go
+++ b/pkg/subctl/cmd/show/versions.go
@@ -26,7 +26,7 @@ import (
 	"github.com/submariner-io/submariner-operator/pkg/subctl/cmd/utils"
 
 	"github.com/spf13/cobra"
-	"github.com/submariner-io/submariner-operator/apis/submariner/v1alpha1"
+	"github.com/submariner-io/submariner-operator/api/submariner/v1alpha1"
 	submarinerclientset "github.com/submariner-io/submariner-operator/pkg/client/clientset/versioned"
 	"github.com/submariner-io/submariner-operator/pkg/images"
 	"github.com/submariner-io/submariner-operator/pkg/names"
diff --git a/pkg/subctl/cmd/utils/restconfig/restconfig.go b/pkg/subctl/cmd/utils/restconfig/restconfig.go
index b369ba68..4cab8e49 100644
--- a/pkg/subctl/cmd/utils/restconfig/restconfig.go
+++ b/pkg/subctl/cmd/utils/restconfig/restconfig.go
@@ -31,7 +31,7 @@ import (
 	"github.com/submariner-io/admiral/pkg/resource"
 	subv1 "github.com/submariner-io/submariner/pkg/apis/submariner.io/v1"
 
-	"github.com/submariner-io/submariner-operator/apis/submariner/v1alpha1"
+	"github.com/submariner-io/submariner-operator/api/submariner/v1alpha1"
 	"github.com/submariner-io/submariner-operator/pkg/subctl/cmd/utils"
 )
 
diff --git a/pkg/subctl/operator/brokercr/ensure.go b/pkg/subctl/operator/brokercr/ensure.go
index 247b3928..370d130d 100644
--- a/pkg/subctl/operator/brokercr/ensure.go
+++ b/pkg/subctl/operator/brokercr/ensure.go
@@ -27,7 +27,7 @@ import (
 
 	"github.com/submariner-io/admiral/pkg/resource"
 	"github.com/submariner-io/admiral/pkg/util"
-	submariner "github.com/submariner-io/submariner-operator/apis/submariner/v1alpha1"
+	submariner "github.com/submariner-io/submariner-operator/api/submariner/v1alpha1"
 	submarinerClientset "github.com/submariner-io/submariner-operator/pkg/client/clientset/versioned"
 )
 
diff --git a/pkg/subctl/operator/servicediscoverycr/ensure.go b/pkg/subctl/operator/servicediscoverycr/ensure.go
index 7302a39e..0893aad6 100644
--- a/pkg/subctl/operator/servicediscoverycr/ensure.go
+++ b/pkg/subctl/operator/servicediscoverycr/ensure.go
@@ -29,7 +29,7 @@ import (
 	"k8s.io/client-go/kubernetes/scheme"
 	"k8s.io/client-go/rest"
 
-	submariner "github.com/submariner-io/submariner-operator/apis/submariner/v1alpha1"
+	submariner "github.com/submariner-io/submariner-operator/api/submariner/v1alpha1"
 	"github.com/submariner-io/submariner-operator/pkg/names"
 )
 
diff --git a/pkg/subctl/operator/submarinercr/ensure.go b/pkg/subctl/operator/submarinercr/ensure.go
index 7b699dce..c0390387 100644
--- a/pkg/subctl/operator/submarinercr/ensure.go
+++ b/pkg/subctl/operator/submarinercr/ensure.go
@@ -27,7 +27,7 @@ import (
 	"k8s.io/apimachinery/pkg/runtime"
 	"k8s.io/client-go/rest"
 
-	submariner "github.com/submariner-io/submariner-operator/apis/submariner/v1alpha1"
+	submariner "github.com/submariner-io/submariner-operator/api/submariner/v1alpha1"
 	submarinerClientset "github.com/submariner-io/submariner-operator/pkg/client/clientset/versioned"
 )
 


Test patch:
diff --git a/controllers/servicediscovery/servicediscovery_controller_test.go b/controllers/servicediscovery/servicediscovery_controller_test.go
index 31b2e45a..50eba3c8 100644
--- a/controllers/servicediscovery/servicediscovery_controller_test.go
+++ b/controllers/servicediscovery/servicediscovery_controller_test.go
@@ -23,7 +23,7 @@ import (
 	. "github.com/onsi/ginkgo"
 	. "github.com/onsi/gomega"
 	operatorv1 "github.com/openshift/api/operator/v1"
-	submariner_v1 "github.com/submariner-io/submariner-operator/apis/submariner/v1alpha1"
+	submariner_v1 "github.com/submariner-io/submariner-operator/api/submariner/v1alpha1"
 	corev1 "k8s.io/api/core/v1"
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 	"k8s.io/apimachinery/pkg/types"
diff --git a/controllers/submariner/submariner_controller_test.go b/controllers/submariner/submariner_controller_test.go
index 2ef16802..83708ef1 100644
--- a/controllers/submariner/submariner_controller_test.go
+++ b/controllers/submariner/submariner_controller_test.go
@@ -25,7 +25,7 @@ import (
 
 	. "github.com/onsi/ginkgo"
 	. "github.com/onsi/gomega"
-	submariner_v1 "github.com/submariner-io/submariner-operator/apis/submariner/v1alpha1"
+	submariner_v1 "github.com/submariner-io/submariner-operator/api/submariner/v1alpha1"
 	"github.com/submariner-io/submariner-operator/pkg/discovery/network"
 	appsv1 "k8s.io/api/apps/v1"
 	apiextensions "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
diff --git a/pkg/images/image_parsing_test.go b/pkg/images/image_parsing_test.go
index 8df9e70b..918b0d34 100644
--- a/pkg/images/image_parsing_test.go
+++ b/pkg/images/image_parsing_test.go
@@ -23,7 +23,7 @@ import (
 	. "github.com/onsi/ginkgo"
 	. "github.com/onsi/gomega"
 
-	apis "github.com/submariner-io/submariner-operator/apis/submariner/v1alpha1"
+	apis "github.com/submariner-io/submariner-operator/api/submariner/v1alpha1"
 )
 
 var imageTests = []struct {