diff --git a/Dockerfile b/Dockerfile index 50be9829..02a79cc0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,7 +16,6 @@ RUN go mod download COPY cmd/main.go cmd/main.go COPY version/ version/ COPY api/ api/ -COPY controllers/ controllers/ COPY internal/controller/ internal/controller/ COPY pkg/ pkg/ diff --git a/cmd/main.go b/cmd/main.go index c6ae4641..6f3238ad 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -35,9 +35,9 @@ import ( schedulingv1 "k8s.io/api/scheduling/v1" falconv1alpha1 "github.com/crowdstrike/falcon-operator/api/falcon/v1alpha1" - admissioncontroller "github.com/crowdstrike/falcon-operator/controllers/admission" - containercontroller "github.com/crowdstrike/falcon-operator/controllers/falcon_container" - nodecontroller "github.com/crowdstrike/falcon-operator/controllers/falcon_node" + admissioncontroller "github.com/crowdstrike/falcon-operator/internal/controller/admission" + containercontroller "github.com/crowdstrike/falcon-operator/internal/controller/falcon_container" + nodecontroller "github.com/crowdstrike/falcon-operator/internal/controller/falcon_node" "github.com/crowdstrike/falcon-operator/pkg/common" "github.com/crowdstrike/falcon-operator/version" // +kubebuilder:scaffold:imports diff --git a/controllers/admission/configmap.go b/internal/controller/admission/configmap.go similarity index 100% rename from controllers/admission/configmap.go rename to internal/controller/admission/configmap.go diff --git a/controllers/admission/falconadmission_controller.go b/internal/controller/admission/falconadmission_controller.go similarity index 100% rename from controllers/admission/falconadmission_controller.go rename to internal/controller/admission/falconadmission_controller.go diff --git a/controllers/admission/falconadmission_controller_test.go b/internal/controller/admission/falconadmission_controller_test.go similarity index 100% rename from controllers/admission/falconadmission_controller_test.go rename to internal/controller/admission/falconadmission_controller_test.go diff --git a/controllers/admission/image_push.go b/internal/controller/admission/image_push.go similarity index 100% rename from controllers/admission/image_push.go rename to internal/controller/admission/image_push.go diff --git a/controllers/admission/rbac.go b/internal/controller/admission/rbac.go similarity index 100% rename from controllers/admission/rbac.go rename to internal/controller/admission/rbac.go diff --git a/controllers/admission/suite_test.go b/internal/controller/admission/suite_test.go similarity index 94% rename from controllers/admission/suite_test.go rename to internal/controller/admission/suite_test.go index de6bf9b1..7696b8c4 100644 --- a/controllers/admission/suite_test.go +++ b/internal/controller/admission/suite_test.go @@ -36,7 +36,7 @@ var _ = BeforeSuite(func() { By("bootstrapping test environment") testEnv = &envtest.Environment{ - CRDDirectoryPaths: []string{filepath.Join("..", "..", "config", "crd", "bases")}, + CRDDirectoryPaths: []string{filepath.Join("..", "..", "..", "config", "crd", "bases")}, ErrorIfCRDPathMissing: true, } diff --git a/controllers/falcon_container/configmap.go b/internal/controller/falcon_container/configmap.go similarity index 100% rename from controllers/falcon_container/configmap.go rename to internal/controller/falcon_container/configmap.go diff --git a/controllers/falcon_container/falconcontainer_controller.go b/internal/controller/falcon_container/falconcontainer_controller.go similarity index 100% rename from controllers/falcon_container/falconcontainer_controller.go rename to internal/controller/falcon_container/falconcontainer_controller.go diff --git a/controllers/falcon_container/falconcontainer_controller_test.go b/internal/controller/falcon_container/falconcontainer_controller_test.go similarity index 100% rename from controllers/falcon_container/falconcontainer_controller_test.go rename to internal/controller/falcon_container/falconcontainer_controller_test.go diff --git a/controllers/falcon_container/image_push.go b/internal/controller/falcon_container/image_push.go similarity index 100% rename from controllers/falcon_container/image_push.go rename to internal/controller/falcon_container/image_push.go diff --git a/controllers/falcon_container/image_stream.go b/internal/controller/falcon_container/image_stream.go similarity index 100% rename from controllers/falcon_container/image_stream.go rename to internal/controller/falcon_container/image_stream.go diff --git a/controllers/falcon_container/injector.go b/internal/controller/falcon_container/injector.go similarity index 100% rename from controllers/falcon_container/injector.go rename to internal/controller/falcon_container/injector.go diff --git a/controllers/falcon_container/k8s_utils.go b/internal/controller/falcon_container/k8s_utils.go similarity index 100% rename from controllers/falcon_container/k8s_utils.go rename to internal/controller/falcon_container/k8s_utils.go diff --git a/controllers/falcon_container/ns.go b/internal/controller/falcon_container/ns.go similarity index 100% rename from controllers/falcon_container/ns.go rename to internal/controller/falcon_container/ns.go diff --git a/controllers/falcon_container/rbac.go b/internal/controller/falcon_container/rbac.go similarity index 100% rename from controllers/falcon_container/rbac.go rename to internal/controller/falcon_container/rbac.go diff --git a/controllers/falcon_container/registry.go b/internal/controller/falcon_container/registry.go similarity index 100% rename from controllers/falcon_container/registry.go rename to internal/controller/falcon_container/registry.go diff --git a/controllers/falcon_container/service.go b/internal/controller/falcon_container/service.go similarity index 100% rename from controllers/falcon_container/service.go rename to internal/controller/falcon_container/service.go diff --git a/controllers/falcon_container/suite_test.go b/internal/controller/falcon_container/suite_test.go similarity index 94% rename from controllers/falcon_container/suite_test.go rename to internal/controller/falcon_container/suite_test.go index a2906ef5..77f5c870 100644 --- a/controllers/falcon_container/suite_test.go +++ b/internal/controller/falcon_container/suite_test.go @@ -39,7 +39,7 @@ var _ = BeforeSuite(func() { By("bootstrapping test environment") testEnv = &envtest.Environment{ - CRDDirectoryPaths: []string{filepath.Join("..", "..", "config", "crd", "bases")}, + CRDDirectoryPaths: []string{filepath.Join("..", "..", "..", "config", "crd", "bases")}, ErrorIfCRDPathMissing: true, } diff --git a/controllers/falcon_container/webhook.go b/internal/controller/falcon_container/webhook.go similarity index 100% rename from controllers/falcon_container/webhook.go rename to internal/controller/falcon_container/webhook.go diff --git a/controllers/falcon_node/falconnodesensor_controller.go b/internal/controller/falcon_node/falconnodesensor_controller.go similarity index 100% rename from controllers/falcon_node/falconnodesensor_controller.go rename to internal/controller/falcon_node/falconnodesensor_controller.go diff --git a/controllers/falcon_node/falconnodesensor_controller_test.go b/internal/controller/falcon_node/falconnodesensor_controller_test.go similarity index 100% rename from controllers/falcon_node/falconnodesensor_controller_test.go rename to internal/controller/falcon_node/falconnodesensor_controller_test.go diff --git a/controllers/falcon_node/suite_test.go b/internal/controller/falcon_node/suite_test.go similarity index 94% rename from controllers/falcon_node/suite_test.go rename to internal/controller/falcon_node/suite_test.go index d0b4fc63..eecc8af2 100644 --- a/controllers/falcon_node/suite_test.go +++ b/internal/controller/falcon_node/suite_test.go @@ -40,7 +40,7 @@ var _ = BeforeSuite(func() { By("bootstrapping test environment") testEnv = &envtest.Environment{ - CRDDirectoryPaths: []string{filepath.Join("..", "..", "config", "crd", "bases")}, + CRDDirectoryPaths: []string{filepath.Join("..", "..", "..", "config", "crd", "bases")}, ErrorIfCRDPathMissing: true, }