diff --git a/go.mod b/go.mod index 062030d21475..c6e4d1161312 100644 --- a/go.mod +++ b/go.mod @@ -695,7 +695,7 @@ require ( k8s.io/klog v1.0.0 // indirect k8s.io/klog/v2 v2.100.1 // indirect k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect - k8s.io/kubelet v0.28.3 // indirect + k8s.io/kubelet v0.28.4 // indirect k8s.io/utils v0.0.0-20230711102312-30195339c3c7 // indirect sigs.k8s.io/controller-runtime v0.16.3 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect diff --git a/go.sum b/go.sum index 5bed4abad2cb..df52a1e0d9cd 100644 --- a/go.sum +++ b/go.sum @@ -2273,6 +2273,8 @@ k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5Ohx k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= k8s.io/kubelet v0.28.3 h1:bp/uIf1R5F61BlFvFtzc4PDEiK7TtFcw3wFJlc0V0LM= k8s.io/kubelet v0.28.3/go.mod h1:E3NHYbp/v45Ao6AD0EOZnqO3L0R6Haks6Nm0+bnFwtU= +k8s.io/kubelet v0.28.4 h1:Ypxy1jaFlSXFXbg/yVtFOU2ZxErBVRJfLu8+t4s7Dtw= +k8s.io/kubelet v0.28.4/go.mod h1:w1wPI12liY/aeC70nqKYcNNkr6/nbyvdMB7P7wmww2o= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20230711102312-30195339c3c7 h1:ZgnF1KZsYxWIifwSNZFZgNtWE89WI5yiP5WwlfDoIyc= k8s.io/utils v0.0.0-20230711102312-30195339c3c7/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= diff --git a/receiver/awscontainerinsightreceiver/internal/host/utilconst_windows.go b/receiver/awscontainerinsightreceiver/internal/host/utilconst_windows.go index d6a53dcb0df8..2bd7285f21ea 100644 --- a/receiver/awscontainerinsightreceiver/internal/host/utilconst_windows.go +++ b/receiver/awscontainerinsightreceiver/internal/host/utilconst_windows.go @@ -4,7 +4,7 @@ //go:build !linux // +build !linux -package host +package host // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver/internal/host" // These variables are invalid for Windows const ( diff --git a/receiver/awscontainerinsightreceiver/internal/host/utilsconst.go b/receiver/awscontainerinsightreceiver/internal/host/utilsconst.go index ab6bbada96ba..adb162d5d1ff 100644 --- a/receiver/awscontainerinsightreceiver/internal/host/utilsconst.go +++ b/receiver/awscontainerinsightreceiver/internal/host/utilsconst.go @@ -4,7 +4,7 @@ //go:build !windows // +build !windows -package host +package host // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver/internal/host" const ( rootfs = "/rootfs" // the root directory "/" is mounted as "/rootfs" in container diff --git a/receiver/awscontainerinsightreceiver/internal/k8swindows/k8swindows.go b/receiver/awscontainerinsightreceiver/internal/k8swindows/k8swindows.go index d0c806347f93..c4622c226098 100644 --- a/receiver/awscontainerinsightreceiver/internal/k8swindows/k8swindows.go +++ b/receiver/awscontainerinsightreceiver/internal/k8swindows/k8swindows.go @@ -4,7 +4,7 @@ //go:build windows // +build windows -package k8swindows +package k8swindows // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver/internal/k8swindows" import ( "context" diff --git a/receiver/awscontainerinsightreceiver/internal/k8swindows/k8swindows_nowindows.go b/receiver/awscontainerinsightreceiver/internal/k8swindows/k8swindows_nowindows.go index 5f3d237afddb..dbc75d936351 100644 --- a/receiver/awscontainerinsightreceiver/internal/k8swindows/k8swindows_nowindows.go +++ b/receiver/awscontainerinsightreceiver/internal/k8swindows/k8swindows_nowindows.go @@ -4,7 +4,7 @@ //go:build !windows // +build !windows -package k8swindows +package k8swindows // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver/internal/k8swindows" import ( "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver/internal/host" diff --git a/receiver/awscontainerinsightreceiver/internal/k8swindows/kubelet.go b/receiver/awscontainerinsightreceiver/internal/k8swindows/kubelet.go index a27d8e242850..cc956e5b208c 100644 --- a/receiver/awscontainerinsightreceiver/internal/k8swindows/kubelet.go +++ b/receiver/awscontainerinsightreceiver/internal/k8swindows/kubelet.go @@ -4,7 +4,7 @@ //go:build windows // +build windows -package k8swindows +package k8swindows // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver/internal/k8swindows" import ( "fmt" diff --git a/receiver/awscontainerinsightreceiver/receiver_test.go b/receiver/awscontainerinsightreceiver/receiver_test.go index 27686d194f1b..f3b251023d02 100644 --- a/receiver/awscontainerinsightreceiver/receiver_test.go +++ b/receiver/awscontainerinsightreceiver/receiver_test.go @@ -90,12 +90,12 @@ func TestCollectData(t *testing.T) { _ = r.Start(context.Background(), nil) ctx := context.Background() r.k8sapiserver = &mockK8sAPIServer{} - r.cadvisor = &mockCadvisor{} + r.containerMetricsProvider = &mockCadvisor{} err = r.collectData(ctx) require.Nil(t, err) // test the case when cadvisor and k8sapiserver failed to initialize - r.cadvisor = nil + r.containerMetricsProvider = nil r.k8sapiserver = nil err = r.collectData(ctx) require.NotNil(t, err) @@ -114,7 +114,7 @@ func TestCollectDataWithErrConsumer(t *testing.T) { r := metricsReceiver.(*awsContainerInsightReceiver) _ = r.Start(context.Background(), nil) - r.cadvisor = &mockCadvisor{} + r.containerMetricsProvider = &mockCadvisor{} r.k8sapiserver = &mockK8sAPIServer{} ctx := context.Background() @@ -138,12 +138,12 @@ func TestCollectDataWithECS(t *testing.T) { _ = r.Start(context.Background(), nil) ctx := context.Background() - r.cadvisor = &mockCadvisor{} + r.containerMetricsProvider = &mockCadvisor{} err = r.collectData(ctx) require.Nil(t, err) // test the case when cadvisor and k8sapiserver failed to initialize - r.cadvisor = nil + r.containerMetricsProvider = nil err = r.collectData(ctx) require.NotNil(t, err) }