diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 7bda96673aa4..77113d8b611d 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -132,7 +132,6 @@ internal/exp/metrics/ @open-telemetry/collector-cont internal/filter/ @open-telemetry/collector-contrib-approvers @open-telemetry/collector-approvers internal/grpcutil/ @open-telemetry/collector-contrib-approvers @jmacd @moh-osman3 @lquerel internal/k8sconfig/ @open-telemetry/collector-contrib-approvers @dmitryax -internal/k8stest/ @open-telemetry/collector-contrib-approvers @crobert-1 internal/kafka/ @open-telemetry/collector-contrib-approvers @pavolloffay @MovieStoreGuy internal/kubelet/ @open-telemetry/collector-contrib-approvers @dmitryax internal/metadataproviders/ @open-telemetry/collector-contrib-approvers @Aneurysm9 @dashpole @@ -149,6 +148,7 @@ pkg/batchpersignal/ @open-telemetry/collector-cont pkg/datadog/ @open-telemetry/collector-contrib-approvers @mx-psi @dineshg13 @liustanley @songy23 @mackjmr @ankitpatel96 @jade-guiton-dd pkg/experimentalmetricmetadata/ @open-telemetry/collector-contrib-approvers @dmitryax pkg/golden/ @open-telemetry/collector-contrib-approvers @djaglowski @atoulme +pkg/k8stest/ @open-telemetry/collector-contrib-approvers @crobert-1 pkg/kafka/topic/ @open-telemetry/collector-contrib-approvers @pavolloffay @MovieStoreGuy pkg/ottl/ @open-telemetry/collector-contrib-approvers @TylerHelmuth @kentquirk @bogdandrutu @evan-bradley pkg/pdatatest/ @open-telemetry/collector-contrib-approvers @djaglowski @fatsheep9146 diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index 40374a31674d..60c890d65d07 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -131,7 +131,6 @@ body: - internal/filter - internal/grpcutil - internal/k8sconfig - - internal/k8stest - internal/kafka - internal/kubelet - internal/metadataproviders @@ -147,6 +146,7 @@ body: - pkg/datadog - pkg/experimentalmetricmetadata - pkg/golden + - pkg/k8stest - pkg/kafka/topic - pkg/ottl - pkg/pdatatest diff --git a/.github/ISSUE_TEMPLATE/feature_request.yaml b/.github/ISSUE_TEMPLATE/feature_request.yaml index aeee888ecb63..cf0e410d21ab 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yaml +++ b/.github/ISSUE_TEMPLATE/feature_request.yaml @@ -125,7 +125,6 @@ body: - internal/filter - internal/grpcutil - internal/k8sconfig - - internal/k8stest - internal/kafka - internal/kubelet - internal/metadataproviders @@ -141,6 +140,7 @@ body: - pkg/datadog - pkg/experimentalmetricmetadata - pkg/golden + - pkg/k8stest - pkg/kafka/topic - pkg/ottl - pkg/pdatatest diff --git a/.github/ISSUE_TEMPLATE/other.yaml b/.github/ISSUE_TEMPLATE/other.yaml index 30152c26e1a0..ef4d3f63fc51 100644 --- a/.github/ISSUE_TEMPLATE/other.yaml +++ b/.github/ISSUE_TEMPLATE/other.yaml @@ -125,7 +125,6 @@ body: - internal/filter - internal/grpcutil - internal/k8sconfig - - internal/k8stest - internal/kafka - internal/kubelet - internal/metadataproviders @@ -141,6 +140,7 @@ body: - pkg/datadog - pkg/experimentalmetricmetadata - pkg/golden + - pkg/k8stest - pkg/kafka/topic - pkg/ottl - pkg/pdatatest diff --git a/.github/ISSUE_TEMPLATE/unmaintained.yaml b/.github/ISSUE_TEMPLATE/unmaintained.yaml index ab44912d5fe3..a0de0202a285 100644 --- a/.github/ISSUE_TEMPLATE/unmaintained.yaml +++ b/.github/ISSUE_TEMPLATE/unmaintained.yaml @@ -130,7 +130,6 @@ body: - internal/filter - internal/grpcutil - internal/k8sconfig - - internal/k8stest - internal/kafka - internal/kubelet - internal/metadataproviders @@ -146,6 +145,7 @@ body: - pkg/datadog - pkg/experimentalmetricmetadata - pkg/golden + - pkg/k8stest - pkg/kafka/topic - pkg/ottl - pkg/pdatatest diff --git a/cmd/otelcontribcol/builder-config.yaml b/cmd/otelcontribcol/builder-config.yaml index 3bb6ac169b7f..f778ec274d9b 100644 --- a/cmd/otelcontribcol/builder-config.yaml +++ b/cmd/otelcontribcol/builder-config.yaml @@ -359,7 +359,7 @@ replaces: - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/azuremonitorexporter => ../../exporter/azuremonitorexporter - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/azuredataexplorerexporter => ../../exporter/azuredataexplorerexporter - github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig => ../../internal/k8sconfig - - github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8stest => ../../internal/k8stest + - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/k8stest => ../../pkg/k8stest - github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka => ../../internal/kafka - github.com/open-telemetry/opentelemetry-collector-contrib/internal/rabbitmq => ../../internal/rabbitmq - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/carbonreceiver => ../../receiver/carbonreceiver diff --git a/connector/datadogconnector/go.mod b/connector/datadogconnector/go.mod index 4173400e5639..f5ad1a768261 100644 --- a/connector/datadogconnector/go.mod +++ b/connector/datadogconnector/go.mod @@ -329,7 +329,7 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sco replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/docker => ../../internal/docker -replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8stest => ../../internal/k8stest +replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/k8stest => ../../pkg/k8stest replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry => ../../pkg/resourcetotelemetry diff --git a/exporter/datadogexporter/go.mod b/exporter/datadogexporter/go.mod index d011230af244..0e6d2c42fd90 100644 --- a/exporter/datadogexporter/go.mod +++ b/exporter/datadogexporter/go.mod @@ -461,7 +461,7 @@ replace github.com/DataDog/datadog-api-client-go/v2 => github.com/DataDog/datado replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest => ../../pkg/pdatatest -replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8stest => ../../internal/k8stest +replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/k8stest => ../../pkg/k8stest replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/dockerstatsreceiver => ../../receiver/dockerstatsreceiver diff --git a/exporter/datadogexporter/integrationtest/go.mod b/exporter/datadogexporter/integrationtest/go.mod index 0bcef8ed7e01..f501ac0c537f 100644 --- a/exporter/datadogexporter/integrationtest/go.mod +++ b/exporter/datadogexporter/integrationtest/go.mod @@ -439,7 +439,7 @@ replace github.com/DataDog/datadog-api-client-go/v2 => github.com/DataDog/datado replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest => ../../../pkg/pdatatest -replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8stest => ../../../internal/k8stest +replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/k8stest => ../../../pkg/k8stest replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/dockerstatsreceiver => ../../../receiver/dockerstatsreceiver diff --git a/internal/k8stest/Makefile b/pkg/k8stest/Makefile similarity index 100% rename from internal/k8stest/Makefile rename to pkg/k8stest/Makefile diff --git a/internal/k8stest/README.md b/pkg/k8stest/README.md similarity index 100% rename from internal/k8stest/README.md rename to pkg/k8stest/README.md diff --git a/internal/k8stest/client.go b/pkg/k8stest/client.go similarity index 97% rename from internal/k8stest/client.go rename to pkg/k8stest/client.go index 3de4092c4d51..ba68cc134c09 100644 --- a/internal/k8stest/client.go +++ b/pkg/k8stest/client.go @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -package k8stest // import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8stest" +package k8stest // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/k8stest" import ( "errors" diff --git a/internal/k8stest/go.mod b/pkg/k8stest/go.mod similarity index 99% rename from internal/k8stest/go.mod rename to pkg/k8stest/go.mod index 22b721556241..69d520e023e1 100644 --- a/internal/k8stest/go.mod +++ b/pkg/k8stest/go.mod @@ -1,4 +1,4 @@ -module github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8stest +module github.com/open-telemetry/opentelemetry-collector-contrib/pkg/k8stest go 1.22.0 diff --git a/internal/k8stest/go.sum b/pkg/k8stest/go.sum similarity index 100% rename from internal/k8stest/go.sum rename to pkg/k8stest/go.sum diff --git a/internal/k8stest/k8s_collector.go b/pkg/k8stest/k8s_collector.go similarity index 99% rename from internal/k8stest/k8s_collector.go rename to pkg/k8stest/k8s_collector.go index b74257845344..b5c34a76de90 100644 --- a/internal/k8stest/k8s_collector.go +++ b/pkg/k8stest/k8s_collector.go @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -package k8stest // import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8stest" +package k8stest // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/k8stest" import ( "bytes" diff --git a/internal/k8stest/k8s_data_helpers.go b/pkg/k8stest/k8s_data_helpers.go similarity index 96% rename from internal/k8stest/k8s_data_helpers.go rename to pkg/k8stest/k8s_data_helpers.go index 09114fd29fcf..8e0c39c790cf 100644 --- a/internal/k8stest/k8s_data_helpers.go +++ b/pkg/k8stest/k8s_data_helpers.go @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -package k8stest // import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8stest" +package k8stest // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/k8stest" import ( "context" diff --git a/internal/k8stest/k8s_objects.go b/pkg/k8stest/k8s_objects.go similarity index 98% rename from internal/k8stest/k8s_objects.go rename to pkg/k8stest/k8s_objects.go index a9acca588f84..d89866f945aa 100644 --- a/internal/k8stest/k8s_objects.go +++ b/pkg/k8stest/k8s_objects.go @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -package k8stest // import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8stest" +package k8stest // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/k8stest" import ( "context" diff --git a/internal/k8stest/k8s_telemetrygen.go b/pkg/k8stest/k8s_telemetrygen.go similarity index 98% rename from internal/k8stest/k8s_telemetrygen.go rename to pkg/k8stest/k8s_telemetrygen.go index c620d499a333..768e2c55be3d 100644 --- a/internal/k8stest/k8s_telemetrygen.go +++ b/pkg/k8stest/k8s_telemetrygen.go @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -package k8stest // import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8stest" +package k8stest // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/k8stest" import ( "bytes" diff --git a/internal/k8stest/metadata.yaml b/pkg/k8stest/metadata.yaml similarity index 100% rename from internal/k8stest/metadata.yaml rename to pkg/k8stest/metadata.yaml diff --git a/processor/k8sattributesprocessor/e2e_test.go b/processor/k8sattributesprocessor/e2e_test.go index 6e8acb1d19fb..1a991ed7af24 100644 --- a/processor/k8sattributesprocessor/e2e_test.go +++ b/processor/k8sattributesprocessor/e2e_test.go @@ -27,7 +27,7 @@ import ( "go.opentelemetry.io/collector/receiver/receivertest" "go.uber.org/multierr" - "github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8stest" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/k8stest" ) const ( diff --git a/processor/k8sattributesprocessor/go.mod b/processor/k8sattributesprocessor/go.mod index 856e80345f7e..1a7bfb83a6cb 100644 --- a/processor/k8sattributesprocessor/go.mod +++ b/processor/k8sattributesprocessor/go.mod @@ -8,7 +8,7 @@ require ( github.com/google/uuid v1.6.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.115.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.115.0 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8stest v0.115.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/k8stest v0.115.0 github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/client v1.21.0 go.opentelemetry.io/collector/component v0.115.0 @@ -146,7 +146,7 @@ retract ( replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal => ../../internal/coreinternal -replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8stest => ../../internal/k8stest +replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/k8stest => ../../pkg/k8stest // ambiguous import: found package cloud.google.com/go/compute/metadata in multiple modules replace cloud.google.com/go v0.54.0 => cloud.google.com/go v0.110.10 diff --git a/receiver/k8sclusterreceiver/e2e_test.go b/receiver/k8sclusterreceiver/e2e_test.go index e7b0bbb024a7..32a0dec7d784 100644 --- a/receiver/k8sclusterreceiver/e2e_test.go +++ b/receiver/k8sclusterreceiver/e2e_test.go @@ -21,8 +21,8 @@ import ( "go.opentelemetry.io/collector/receiver/otlpreceiver" "go.opentelemetry.io/collector/receiver/receivertest" - "github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8stest" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/k8stest" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest/pmetrictest" ) diff --git a/receiver/k8sclusterreceiver/go.mod b/receiver/k8sclusterreceiver/go.mod index a4efeb4dde2a..eae63ff45c98 100644 --- a/receiver/k8sclusterreceiver/go.mod +++ b/receiver/k8sclusterreceiver/go.mod @@ -8,10 +8,10 @@ require ( github.com/iancoleman/strcase v0.3.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.115.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.115.0 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8stest v0.115.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent v0.115.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/experimentalmetricmetadata v0.115.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.115.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/k8stest v0.115.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.115.0 github.com/openshift/api v3.9.0+incompatible github.com/openshift/client-go v0.0.0-20210521082421-73d9475a9142 @@ -157,7 +157,7 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil // openshift removed all tags from their repo, use the pseudoversion from the release-3.9 branch HEAD replace github.com/openshift/api v3.9.0+incompatible => github.com/openshift/api v0.0.0-20180801171038-322a19404e37 -replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8stest => ../../internal/k8stest +replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/k8stest => ../../pkg/k8stest replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent => ../../internal/sharedcomponent diff --git a/receiver/k8sobjectsreceiver/e2e_test.go b/receiver/k8sobjectsreceiver/e2e_test.go index 03b491cfa555..1f302a6b902a 100644 --- a/receiver/k8sobjectsreceiver/e2e_test.go +++ b/receiver/k8sobjectsreceiver/e2e_test.go @@ -22,8 +22,8 @@ import ( "go.opentelemetry.io/collector/receiver/receivertest" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8stest" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/k8stest" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest/plogtest" ) diff --git a/receiver/k8sobjectsreceiver/go.mod b/receiver/k8sobjectsreceiver/go.mod index 129733f0cd2a..affe5427798c 100644 --- a/receiver/k8sobjectsreceiver/go.mod +++ b/receiver/k8sobjectsreceiver/go.mod @@ -5,8 +5,8 @@ go 1.22.0 require ( github.com/google/uuid v1.6.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.115.0 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8stest v0.115.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.115.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/k8stest v0.115.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.115.0 github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.115.0 @@ -143,7 +143,7 @@ retract ( v0.65.0 ) -replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8stest => ../../internal/k8stest +replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/k8stest => ../../pkg/k8stest replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest => ../../pkg/pdatatest diff --git a/receiver/kubeletstatsreceiver/e2e_test.go b/receiver/kubeletstatsreceiver/e2e_test.go index 3411d2f2b9f2..5d8bd10ead6c 100644 --- a/receiver/kubeletstatsreceiver/e2e_test.go +++ b/receiver/kubeletstatsreceiver/e2e_test.go @@ -20,8 +20,8 @@ import ( "go.opentelemetry.io/collector/receiver/otlpreceiver" "go.opentelemetry.io/collector/receiver/receivertest" - "github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8stest" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/k8stest" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest/pmetrictest" ) diff --git a/receiver/kubeletstatsreceiver/go.mod b/receiver/kubeletstatsreceiver/go.mod index 56270c5403c0..383d90fbde5b 100644 --- a/receiver/kubeletstatsreceiver/go.mod +++ b/receiver/kubeletstatsreceiver/go.mod @@ -6,9 +6,9 @@ require ( github.com/google/go-cmp v0.6.0 github.com/google/uuid v1.6.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.115.0 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8stest v0.115.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/kubelet v0.115.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.115.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/k8stest v0.115.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.115.0 github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.115.0 @@ -155,7 +155,7 @@ retract ( v0.65.0 ) -replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8stest => ../../internal/k8stest +replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/k8stest => ../../pkg/k8stest replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest => ../../pkg/pdatatest diff --git a/versions.yaml b/versions.yaml index 243ca7358e6a..193d95082d12 100644 --- a/versions.yaml +++ b/versions.yaml @@ -130,7 +130,6 @@ module-sets: - github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter - github.com/open-telemetry/opentelemetry-collector-contrib/internal/grpcutil - github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig - - github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8stest - github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka - github.com/open-telemetry/opentelemetry-collector-contrib/internal/kubelet - github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders @@ -144,6 +143,7 @@ module-sets: - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/experimentalmetricmetadata - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden + - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/k8stest - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka/topic - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest