diff --git a/cmd/otel-allocator/benchmark_test.go b/cmd/otel-allocator/benchmark_test.go index c233f0ce92..09e2ffcc36 100644 --- a/cmd/otel-allocator/benchmark_test.go +++ b/cmd/otel-allocator/benchmark_test.go @@ -22,10 +22,10 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/log" - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/allocation" - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/prehook" - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/server" - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/target" + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/internal/allocation" + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/internal/prehook" + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/internal/server" + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/internal/target" ) // BenchmarkProcessTargets benchmarks the whole target allocation pipeline. It starts with data the prometheus diff --git a/cmd/otel-allocator/allocation/allocator.go b/cmd/otel-allocator/internal/allocation/allocator.go similarity index 99% rename from cmd/otel-allocator/allocation/allocator.go rename to cmd/otel-allocator/internal/allocation/allocator.go index 7fded8415c..ac630d04b4 100644 --- a/cmd/otel-allocator/allocation/allocator.go +++ b/cmd/otel-allocator/internal/allocation/allocator.go @@ -10,8 +10,8 @@ import ( "github.com/go-logr/logr" "github.com/prometheus/client_golang/prometheus" - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/diff" - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/target" + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/internal/diff" + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/internal/target" ) /* diff --git a/cmd/otel-allocator/allocation/allocator_test.go b/cmd/otel-allocator/internal/allocation/allocator_test.go similarity index 99% rename from cmd/otel-allocator/allocation/allocator_test.go rename to cmd/otel-allocator/internal/allocation/allocator_test.go index 2b361b1ebc..a18030e088 100644 --- a/cmd/otel-allocator/allocation/allocator_test.go +++ b/cmd/otel-allocator/internal/allocation/allocator_test.go @@ -9,7 +9,7 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/stretchr/testify/assert" - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/target" + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/internal/target" ) func TestSetCollectors(t *testing.T) { diff --git a/cmd/otel-allocator/allocation/consistent_hashing.go b/cmd/otel-allocator/internal/allocation/consistent_hashing.go similarity index 98% rename from cmd/otel-allocator/allocation/consistent_hashing.go rename to cmd/otel-allocator/internal/allocation/consistent_hashing.go index a80de494cd..b0e8229ab1 100644 --- a/cmd/otel-allocator/allocation/consistent_hashing.go +++ b/cmd/otel-allocator/internal/allocation/consistent_hashing.go @@ -9,7 +9,7 @@ import ( "github.com/buraksezer/consistent" "github.com/cespare/xxhash/v2" - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/target" + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/internal/target" ) const consistentHashingStrategyName = "consistent-hashing" diff --git a/cmd/otel-allocator/allocation/consistent_hashing_test.go b/cmd/otel-allocator/internal/allocation/consistent_hashing_test.go similarity index 100% rename from cmd/otel-allocator/allocation/consistent_hashing_test.go rename to cmd/otel-allocator/internal/allocation/consistent_hashing_test.go diff --git a/cmd/otel-allocator/allocation/least_weighted.go b/cmd/otel-allocator/internal/allocation/least_weighted.go similarity index 98% rename from cmd/otel-allocator/allocation/least_weighted.go rename to cmd/otel-allocator/internal/allocation/least_weighted.go index 9a90477b3a..16f98673cb 100644 --- a/cmd/otel-allocator/allocation/least_weighted.go +++ b/cmd/otel-allocator/internal/allocation/least_weighted.go @@ -4,7 +4,7 @@ package allocation import ( - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/target" + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/internal/target" ) const leastWeightedStrategyName = "least-weighted" diff --git a/cmd/otel-allocator/allocation/least_weighted_test.go b/cmd/otel-allocator/internal/allocation/least_weighted_test.go similarity index 100% rename from cmd/otel-allocator/allocation/least_weighted_test.go rename to cmd/otel-allocator/internal/allocation/least_weighted_test.go diff --git a/cmd/otel-allocator/allocation/per_node.go b/cmd/otel-allocator/internal/allocation/per_node.go similarity index 98% rename from cmd/otel-allocator/allocation/per_node.go rename to cmd/otel-allocator/internal/allocation/per_node.go index c78555d186..c5804663e1 100644 --- a/cmd/otel-allocator/allocation/per_node.go +++ b/cmd/otel-allocator/internal/allocation/per_node.go @@ -6,7 +6,7 @@ package allocation import ( "fmt" - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/target" + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/internal/target" ) const perNodeStrategyName = "per-node" diff --git a/cmd/otel-allocator/allocation/per_node_test.go b/cmd/otel-allocator/internal/allocation/per_node_test.go similarity index 99% rename from cmd/otel-allocator/allocation/per_node_test.go rename to cmd/otel-allocator/internal/allocation/per_node_test.go index 8717bc5ca7..d610d21c67 100644 --- a/cmd/otel-allocator/allocation/per_node_test.go +++ b/cmd/otel-allocator/internal/allocation/per_node_test.go @@ -10,7 +10,7 @@ import ( "github.com/stretchr/testify/assert" logf "sigs.k8s.io/controller-runtime/pkg/log" - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/target" + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/internal/target" ) var loggerPerNode = logf.Log.WithName("unit-tests") diff --git a/cmd/otel-allocator/allocation/strategy.go b/cmd/otel-allocator/internal/allocation/strategy.go similarity index 99% rename from cmd/otel-allocator/allocation/strategy.go rename to cmd/otel-allocator/internal/allocation/strategy.go index e724852cef..f23e41ec73 100644 --- a/cmd/otel-allocator/allocation/strategy.go +++ b/cmd/otel-allocator/internal/allocation/strategy.go @@ -11,7 +11,7 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/target" + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/internal/target" ) type AllocatorProvider func(log logr.Logger, opts ...Option) Allocator diff --git a/cmd/otel-allocator/allocation/strategy_test.go b/cmd/otel-allocator/internal/allocation/strategy_test.go similarity index 99% rename from cmd/otel-allocator/allocation/strategy_test.go rename to cmd/otel-allocator/internal/allocation/strategy_test.go index 06da76288d..b8e4cca933 100644 --- a/cmd/otel-allocator/allocation/strategy_test.go +++ b/cmd/otel-allocator/internal/allocation/strategy_test.go @@ -8,7 +8,7 @@ import ( "reflect" "testing" - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/diff" + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/internal/diff" ) func BenchmarkGetAllTargetsByCollectorAndJob(b *testing.B) { diff --git a/cmd/otel-allocator/allocation/testutils.go b/cmd/otel-allocator/internal/allocation/testutils.go similarity index 99% rename from cmd/otel-allocator/allocation/testutils.go rename to cmd/otel-allocator/internal/allocation/testutils.go index 0aca523919..93a9fc0861 100644 --- a/cmd/otel-allocator/allocation/testutils.go +++ b/cmd/otel-allocator/internal/allocation/testutils.go @@ -14,7 +14,7 @@ import ( "github.com/stretchr/testify/require" logf "sigs.k8s.io/controller-runtime/pkg/log" - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/target" + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/internal/target" ) func colIndex(index, numCols int) int { diff --git a/cmd/otel-allocator/collector/collector.go b/cmd/otel-allocator/internal/collector/collector.go similarity index 99% rename from cmd/otel-allocator/collector/collector.go rename to cmd/otel-allocator/internal/collector/collector.go index b534b6d7c1..725b592917 100644 --- a/cmd/otel-allocator/collector/collector.go +++ b/cmd/otel-allocator/internal/collector/collector.go @@ -17,7 +17,7 @@ import ( "k8s.io/client-go/rest" "k8s.io/client-go/tools/cache" - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/allocation" + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/internal/allocation" ) const ( diff --git a/cmd/otel-allocator/collector/collector_test.go b/cmd/otel-allocator/internal/collector/collector_test.go similarity index 99% rename from cmd/otel-allocator/collector/collector_test.go rename to cmd/otel-allocator/internal/collector/collector_test.go index 8b7f3c5dd5..efcb26ae37 100644 --- a/cmd/otel-allocator/collector/collector_test.go +++ b/cmd/otel-allocator/internal/collector/collector_test.go @@ -17,7 +17,7 @@ import ( "k8s.io/client-go/kubernetes/fake" logf "sigs.k8s.io/controller-runtime/pkg/log" - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/allocation" + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/internal/allocation" ) var logger = logf.Log.WithName("collector-unit-tests") diff --git a/cmd/otel-allocator/config/config.go b/cmd/otel-allocator/internal/config/config.go similarity index 100% rename from cmd/otel-allocator/config/config.go rename to cmd/otel-allocator/internal/config/config.go diff --git a/cmd/otel-allocator/config/config_test.go b/cmd/otel-allocator/internal/config/config_test.go similarity index 100% rename from cmd/otel-allocator/config/config_test.go rename to cmd/otel-allocator/internal/config/config_test.go diff --git a/cmd/otel-allocator/config/flags.go b/cmd/otel-allocator/internal/config/flags.go similarity index 100% rename from cmd/otel-allocator/config/flags.go rename to cmd/otel-allocator/internal/config/flags.go diff --git a/cmd/otel-allocator/config/flags_test.go b/cmd/otel-allocator/internal/config/flags_test.go similarity index 100% rename from cmd/otel-allocator/config/flags_test.go rename to cmd/otel-allocator/internal/config/flags_test.go diff --git a/cmd/otel-allocator/config/testdata/config_test.yaml b/cmd/otel-allocator/internal/config/testdata/config_test.yaml similarity index 100% rename from cmd/otel-allocator/config/testdata/config_test.yaml rename to cmd/otel-allocator/internal/config/testdata/config_test.yaml diff --git a/cmd/otel-allocator/config/testdata/file_sd_test.json b/cmd/otel-allocator/internal/config/testdata/file_sd_test.json similarity index 100% rename from cmd/otel-allocator/config/testdata/file_sd_test.json rename to cmd/otel-allocator/internal/config/testdata/file_sd_test.json diff --git a/cmd/otel-allocator/config/testdata/no_config.yaml b/cmd/otel-allocator/internal/config/testdata/no_config.yaml similarity index 100% rename from cmd/otel-allocator/config/testdata/no_config.yaml rename to cmd/otel-allocator/internal/config/testdata/no_config.yaml diff --git a/cmd/otel-allocator/config/testdata/pod_service_selector_camelcase_expressions_test.yaml b/cmd/otel-allocator/internal/config/testdata/pod_service_selector_camelcase_expressions_test.yaml similarity index 100% rename from cmd/otel-allocator/config/testdata/pod_service_selector_camelcase_expressions_test.yaml rename to cmd/otel-allocator/internal/config/testdata/pod_service_selector_camelcase_expressions_test.yaml diff --git a/cmd/otel-allocator/config/testdata/pod_service_selector_camelcase_test.yaml b/cmd/otel-allocator/internal/config/testdata/pod_service_selector_camelcase_test.yaml similarity index 100% rename from cmd/otel-allocator/config/testdata/pod_service_selector_camelcase_test.yaml rename to cmd/otel-allocator/internal/config/testdata/pod_service_selector_camelcase_test.yaml diff --git a/cmd/otel-allocator/config/testdata/pod_service_selector_expressions_test.yaml b/cmd/otel-allocator/internal/config/testdata/pod_service_selector_expressions_test.yaml similarity index 100% rename from cmd/otel-allocator/config/testdata/pod_service_selector_expressions_test.yaml rename to cmd/otel-allocator/internal/config/testdata/pod_service_selector_expressions_test.yaml diff --git a/cmd/otel-allocator/config/testdata/pod_service_selector_test.yaml b/cmd/otel-allocator/internal/config/testdata/pod_service_selector_test.yaml similarity index 100% rename from cmd/otel-allocator/config/testdata/pod_service_selector_test.yaml rename to cmd/otel-allocator/internal/config/testdata/pod_service_selector_test.yaml diff --git a/cmd/otel-allocator/diff/diff.go b/cmd/otel-allocator/internal/diff/diff.go similarity index 100% rename from cmd/otel-allocator/diff/diff.go rename to cmd/otel-allocator/internal/diff/diff.go diff --git a/cmd/otel-allocator/diff/diff_test.go b/cmd/otel-allocator/internal/diff/diff_test.go similarity index 100% rename from cmd/otel-allocator/diff/diff_test.go rename to cmd/otel-allocator/internal/diff/diff_test.go diff --git a/cmd/otel-allocator/prehook/prehook.go b/cmd/otel-allocator/internal/prehook/prehook.go similarity index 97% rename from cmd/otel-allocator/prehook/prehook.go rename to cmd/otel-allocator/internal/prehook/prehook.go index f4cb184c39..720c875492 100644 --- a/cmd/otel-allocator/prehook/prehook.go +++ b/cmd/otel-allocator/internal/prehook/prehook.go @@ -7,7 +7,7 @@ import ( "github.com/go-logr/logr" "github.com/prometheus/prometheus/model/relabel" - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/target" + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/internal/target" ) type Hook interface { diff --git a/cmd/otel-allocator/prehook/relabel.go b/cmd/otel-allocator/internal/prehook/relabel.go similarity index 99% rename from cmd/otel-allocator/prehook/relabel.go rename to cmd/otel-allocator/internal/prehook/relabel.go index ca92af8126..d5dba86252 100644 --- a/cmd/otel-allocator/prehook/relabel.go +++ b/cmd/otel-allocator/internal/prehook/relabel.go @@ -7,7 +7,7 @@ import ( "github.com/go-logr/logr" "github.com/prometheus/prometheus/model/relabel" - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/target" + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/internal/target" ) const ( diff --git a/cmd/otel-allocator/prehook/relabel_test.go b/cmd/otel-allocator/internal/prehook/relabel_test.go similarity index 99% rename from cmd/otel-allocator/prehook/relabel_test.go rename to cmd/otel-allocator/internal/prehook/relabel_test.go index 50154e1f36..792b3b3a6e 100644 --- a/cmd/otel-allocator/prehook/relabel_test.go +++ b/cmd/otel-allocator/internal/prehook/relabel_test.go @@ -16,7 +16,7 @@ import ( "github.com/stretchr/testify/assert" logf "sigs.k8s.io/controller-runtime/pkg/log" - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/target" + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/internal/target" ) var ( diff --git a/cmd/otel-allocator/server/bench_test.go b/cmd/otel-allocator/internal/server/bench_test.go similarity index 99% rename from cmd/otel-allocator/server/bench_test.go rename to cmd/otel-allocator/internal/server/bench_test.go index d28dfa266a..98b88c0fbb 100644 --- a/cmd/otel-allocator/server/bench_test.go +++ b/cmd/otel-allocator/internal/server/bench_test.go @@ -16,8 +16,8 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/stretchr/testify/assert" - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/allocation" - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/target" + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/internal/allocation" + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/internal/target" ) func BenchmarkServerTargetsHandler(b *testing.B) { diff --git a/cmd/otel-allocator/server/mocks_test.go b/cmd/otel-allocator/internal/server/mocks_test.go similarity index 95% rename from cmd/otel-allocator/server/mocks_test.go rename to cmd/otel-allocator/internal/server/mocks_test.go index 20db0839f0..ec607bdf0f 100644 --- a/cmd/otel-allocator/server/mocks_test.go +++ b/cmd/otel-allocator/internal/server/mocks_test.go @@ -4,8 +4,8 @@ package server import ( - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/allocation" - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/target" + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/internal/allocation" + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/internal/target" ) var _ allocation.Allocator = &mockAllocator{} diff --git a/cmd/otel-allocator/server/server.go b/cmd/otel-allocator/internal/server/server.go similarity index 99% rename from cmd/otel-allocator/server/server.go rename to cmd/otel-allocator/internal/server/server.go index 2dd99c6d52..77b43e37da 100644 --- a/cmd/otel-allocator/server/server.go +++ b/cmd/otel-allocator/internal/server/server.go @@ -26,8 +26,8 @@ import ( "github.com/prometheus/prometheus/model/labels" "gopkg.in/yaml.v2" - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/allocation" - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/target" + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/internal/allocation" + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/internal/target" ) var ( diff --git a/cmd/otel-allocator/server/server_test.go b/cmd/otel-allocator/internal/server/server_test.go similarity index 99% rename from cmd/otel-allocator/server/server_test.go rename to cmd/otel-allocator/internal/server/server_test.go index 7567320fff..fce2ef0c01 100644 --- a/cmd/otel-allocator/server/server_test.go +++ b/cmd/otel-allocator/internal/server/server_test.go @@ -24,9 +24,9 @@ import ( "gopkg.in/yaml.v2" logf "sigs.k8s.io/controller-runtime/pkg/log" - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/allocation" - allocatorconfig "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/config" - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/target" + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/internal/allocation" + allocatorconfig "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/internal/target" ) var ( diff --git a/cmd/otel-allocator/server/testdata/prom-config-all-actions.yaml b/cmd/otel-allocator/internal/server/testdata/prom-config-all-actions.yaml similarity index 100% rename from cmd/otel-allocator/server/testdata/prom-config-all-actions.yaml rename to cmd/otel-allocator/internal/server/testdata/prom-config-all-actions.yaml diff --git a/cmd/otel-allocator/server/testdata/prom-config-test.yaml b/cmd/otel-allocator/internal/server/testdata/prom-config-test.yaml similarity index 100% rename from cmd/otel-allocator/server/testdata/prom-config-test.yaml rename to cmd/otel-allocator/internal/server/testdata/prom-config-test.yaml diff --git a/cmd/otel-allocator/server/testdata/prom-no-config.yaml b/cmd/otel-allocator/internal/server/testdata/prom-no-config.yaml similarity index 100% rename from cmd/otel-allocator/server/testdata/prom-no-config.yaml rename to cmd/otel-allocator/internal/server/testdata/prom-no-config.yaml diff --git a/cmd/otel-allocator/target/discovery.go b/cmd/otel-allocator/internal/target/discovery.go similarity index 99% rename from cmd/otel-allocator/target/discovery.go rename to cmd/otel-allocator/internal/target/discovery.go index 3f68408d9b..9e236d3523 100644 --- a/cmd/otel-allocator/target/discovery.go +++ b/cmd/otel-allocator/internal/target/discovery.go @@ -21,7 +21,7 @@ import ( "go.uber.org/zap/zapcore" "gopkg.in/yaml.v3" - allocatorWatcher "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/watcher" + allocatorWatcher "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/internal/watcher" ) var ( diff --git a/cmd/otel-allocator/target/discovery_test.go b/cmd/otel-allocator/internal/target/discovery_test.go similarity index 99% rename from cmd/otel-allocator/target/discovery_test.go rename to cmd/otel-allocator/internal/target/discovery_test.go index 977c2a5873..c05d2a1398 100644 --- a/cmd/otel-allocator/target/discovery_test.go +++ b/cmd/otel-allocator/internal/target/discovery_test.go @@ -22,8 +22,8 @@ import ( "github.com/stretchr/testify/require" ctrl "sigs.k8s.io/controller-runtime" - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/config" - allocatorWatcher "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/watcher" + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/internal/config" + allocatorWatcher "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/internal/watcher" ) var defaultScrapeProtocols = []promconfig.ScrapeProtocol{ diff --git a/cmd/otel-allocator/target/target.go b/cmd/otel-allocator/internal/target/target.go similarity index 100% rename from cmd/otel-allocator/target/target.go rename to cmd/otel-allocator/internal/target/target.go diff --git a/cmd/otel-allocator/target/testdata/test.yaml b/cmd/otel-allocator/internal/target/testdata/test.yaml similarity index 100% rename from cmd/otel-allocator/target/testdata/test.yaml rename to cmd/otel-allocator/internal/target/testdata/test.yaml diff --git a/cmd/otel-allocator/target/testdata/test_update.yaml b/cmd/otel-allocator/internal/target/testdata/test_update.yaml similarity index 100% rename from cmd/otel-allocator/target/testdata/test_update.yaml rename to cmd/otel-allocator/internal/target/testdata/test_update.yaml diff --git a/cmd/otel-allocator/watcher/promOperator.go b/cmd/otel-allocator/internal/watcher/promOperator.go similarity index 99% rename from cmd/otel-allocator/watcher/promOperator.go rename to cmd/otel-allocator/internal/watcher/promOperator.go index 1a51cb1ea7..74eef25aa7 100644 --- a/cmd/otel-allocator/watcher/promOperator.go +++ b/cmd/otel-allocator/internal/watcher/promOperator.go @@ -33,7 +33,7 @@ import ( "k8s.io/client-go/tools/cache" "k8s.io/client-go/util/retry" - allocatorconfig "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/config" + allocatorconfig "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/internal/config" ) const ( diff --git a/cmd/otel-allocator/watcher/promOperator_test.go b/cmd/otel-allocator/internal/watcher/promOperator_test.go similarity index 99% rename from cmd/otel-allocator/watcher/promOperator_test.go rename to cmd/otel-allocator/internal/watcher/promOperator_test.go index fa71436b31..b3d4d15f52 100644 --- a/cmd/otel-allocator/watcher/promOperator_test.go +++ b/cmd/otel-allocator/internal/watcher/promOperator_test.go @@ -35,7 +35,7 @@ import ( fcache "k8s.io/client-go/tools/cache/testing" "k8s.io/utils/ptr" - allocatorconfig "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/config" + allocatorconfig "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/internal/config" ) var defaultScrapeProtocols = []promconfig.ScrapeProtocol{ diff --git a/cmd/otel-allocator/watcher/watcher.go b/cmd/otel-allocator/internal/watcher/watcher.go similarity index 100% rename from cmd/otel-allocator/watcher/watcher.go rename to cmd/otel-allocator/internal/watcher/watcher.go diff --git a/cmd/otel-allocator/main.go b/cmd/otel-allocator/main.go index f9b078dd4f..90a6b48865 100644 --- a/cmd/otel-allocator/main.go +++ b/cmd/otel-allocator/main.go @@ -18,13 +18,13 @@ import ( _ "k8s.io/client-go/plugin/pkg/client/auth/gcp" ctrl "sigs.k8s.io/controller-runtime" - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/allocation" - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/collector" - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/config" - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/prehook" - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/server" - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/target" - allocatorWatcher "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/watcher" + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/internal/allocation" + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/internal/collector" + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/internal/prehook" + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/internal/server" + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/internal/target" + allocatorWatcher "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/internal/watcher" ) var (