diff --git a/controllers/builder_test.go b/internal/controllers/builder_test.go similarity index 100% rename from controllers/builder_test.go rename to internal/controllers/builder_test.go diff --git a/controllers/common.go b/internal/controllers/common.go similarity index 100% rename from controllers/common.go rename to internal/controllers/common.go diff --git a/controllers/opampbridge_controller.go b/internal/controllers/opampbridge_controller.go similarity index 100% rename from controllers/opampbridge_controller.go rename to internal/controllers/opampbridge_controller.go diff --git a/controllers/opampbridge_controller_test.go b/internal/controllers/opampbridge_controller_test.go similarity index 98% rename from controllers/opampbridge_controller_test.go rename to internal/controllers/opampbridge_controller_test.go index e8d78dc133..4a14a5738b 100644 --- a/controllers/opampbridge_controller_test.go +++ b/internal/controllers/opampbridge_controller_test.go @@ -34,11 +34,11 @@ import ( k8sreconcile "sigs.k8s.io/controller-runtime/pkg/reconcile" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/controllers" "github.com/open-telemetry/opentelemetry-operator/internal/autodetect/openshift" "github.com/open-telemetry/opentelemetry-operator/internal/autodetect/prometheus" "github.com/open-telemetry/opentelemetry-operator/internal/autodetect/rbac" "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/internal/controllers" ) var opampBridgeLogger = logf.Log.WithName("opamp-bridge-controller-unit-tests") diff --git a/controllers/opentelemetrycollector_controller.go b/internal/controllers/opentelemetrycollector_controller.go similarity index 100% rename from controllers/opentelemetrycollector_controller.go rename to internal/controllers/opentelemetrycollector_controller.go diff --git a/controllers/opentelemetrycollector_reconciler_test.go b/internal/controllers/opentelemetrycollector_reconciler_test.go similarity index 100% rename from controllers/opentelemetrycollector_reconciler_test.go rename to internal/controllers/opentelemetrycollector_reconciler_test.go diff --git a/controllers/reconcile_test.go b/internal/controllers/reconcile_test.go similarity index 99% rename from controllers/reconcile_test.go rename to internal/controllers/reconcile_test.go index f063b422fc..b7661695b5 100644 --- a/controllers/reconcile_test.go +++ b/internal/controllers/reconcile_test.go @@ -49,11 +49,11 @@ import ( "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1" - "github.com/open-telemetry/opentelemetry-operator/controllers" "github.com/open-telemetry/opentelemetry-operator/internal/autodetect/openshift" "github.com/open-telemetry/opentelemetry-operator/internal/autodetect/prometheus" autoRBAC "github.com/open-telemetry/opentelemetry-operator/internal/autodetect/rbac" "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/internal/controllers" "github.com/open-telemetry/opentelemetry-operator/internal/manifests" "github.com/open-telemetry/opentelemetry-operator/internal/naming" "github.com/open-telemetry/opentelemetry-operator/pkg/featuregate" diff --git a/controllers/suite_test.go b/internal/controllers/suite_test.go similarity index 99% rename from controllers/suite_test.go rename to internal/controllers/suite_test.go index a369c1c92b..2f376c4a0c 100644 --- a/controllers/suite_test.go +++ b/internal/controllers/suite_test.go @@ -160,10 +160,10 @@ func TestMain(m *testing.M) { utilruntime.Must(v1beta1.AddToScheme(testScheme)) testEnv = &envtest.Environment{ - CRDDirectoryPaths: []string{filepath.Join("..", "config", "crd", "bases")}, + CRDDirectoryPaths: []string{filepath.Join("..", "..", "config", "crd", "bases")}, CRDs: []*apiextensionsv1.CustomResourceDefinition{testdata.OpenShiftRouteCRD, testdata.ServiceMonitorCRD, testdata.PodMonitorCRD}, WebhookInstallOptions: envtest.WebhookInstallOptions{ - Paths: []string{filepath.Join("..", "config", "webhook")}, + Paths: []string{filepath.Join("..", "..", "config", "webhook")}, }, } restCfg, err = testEnv.Start() diff --git a/controllers/targetallocator_controller.go b/internal/controllers/targetallocator_controller.go similarity index 100% rename from controllers/targetallocator_controller.go rename to internal/controllers/targetallocator_controller.go diff --git a/controllers/targetallocator_controller_test.go b/internal/controllers/targetallocator_controller_test.go similarity index 99% rename from controllers/targetallocator_controller_test.go rename to internal/controllers/targetallocator_controller_test.go index 36d28a3f68..92908bfea1 100644 --- a/controllers/targetallocator_controller_test.go +++ b/internal/controllers/targetallocator_controller_test.go @@ -32,8 +32,8 @@ import ( "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1" - "github.com/open-telemetry/opentelemetry-operator/controllers" "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/internal/controllers" ) var testLogger = logf.Log.WithName("opamp-bridge-controller-unit-tests") diff --git a/controllers/targetallocator_reconciler_test.go b/internal/controllers/targetallocator_reconciler_test.go similarity index 100% rename from controllers/targetallocator_reconciler_test.go rename to internal/controllers/targetallocator_reconciler_test.go diff --git a/controllers/testdata/ingress_testdata.yaml b/internal/controllers/testdata/ingress_testdata.yaml similarity index 100% rename from controllers/testdata/ingress_testdata.yaml rename to internal/controllers/testdata/ingress_testdata.yaml diff --git a/controllers/testdata/otlp_test.yaml b/internal/controllers/testdata/otlp_test.yaml similarity index 100% rename from controllers/testdata/otlp_test.yaml rename to internal/controllers/testdata/otlp_test.yaml diff --git a/controllers/testdata/test.yaml b/internal/controllers/testdata/test.yaml similarity index 100% rename from controllers/testdata/test.yaml rename to internal/controllers/testdata/test.yaml diff --git a/controllers/testdata/test_ta_update.yaml b/internal/controllers/testdata/test_ta_update.yaml similarity index 100% rename from controllers/testdata/test_ta_update.yaml rename to internal/controllers/testdata/test_ta_update.yaml diff --git a/main.go b/main.go index b9c44aa245..8bb55ee22a 100644 --- a/main.go +++ b/main.go @@ -49,13 +49,13 @@ import ( otelv1alpha1 "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" otelv1beta1 "github.com/open-telemetry/opentelemetry-operator/apis/v1beta1" - "github.com/open-telemetry/opentelemetry-operator/controllers" "github.com/open-telemetry/opentelemetry-operator/internal/autodetect" "github.com/open-telemetry/opentelemetry-operator/internal/autodetect/certmanager" "github.com/open-telemetry/opentelemetry-operator/internal/autodetect/openshift" "github.com/open-telemetry/opentelemetry-operator/internal/autodetect/prometheus" "github.com/open-telemetry/opentelemetry-operator/internal/autodetect/targetallocator" "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/internal/controllers" "github.com/open-telemetry/opentelemetry-operator/internal/fips" collectorManifests "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" openshiftDashboards "github.com/open-telemetry/opentelemetry-operator/internal/openshift/dashboards"