Skip to content

Commit

Permalink
Merge pull request #91 from arajkumar/use-sigs.k8s.io
Browse files Browse the repository at this point in the history
chore: use sigs.k8s.io instead of github.com/kubernetes-sigs to refer go pkgs
  • Loading branch information
k8s-ci-robot authored Aug 5, 2021
2 parents 2c1ad75 + c9f2337 commit 060cbc1
Show file tree
Hide file tree
Showing 17 changed files with 37 additions and 37 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ all: build-test-adapter

.PHONY: build-test-adapter
build-test-adapter: test-adapter/generated/openapi/zz_generated.openapi.go
CGO_ENABLED=0 GOOS=linux GOARCH=$(ARCH) go build -o $(OUT_DIR)/$(ARCH)/test-adapter github.com/kubernetes-sigs/custom-metrics-apiserver/test-adapter
CGO_ENABLED=0 GOOS=linux GOARCH=$(ARCH) go build -o $(OUT_DIR)/$(ARCH)/test-adapter sigs.k8s.io/custom-metrics-apiserver/test-adapter

test-adapter/generated/openapi/zz_generated.openapi.go: go.mod go.sum
go install -mod=readonly k8s.io/kube-openapi/cmd/openapi-gen
Expand Down
6 changes: 3 additions & 3 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ import (
"k8s.io/client-go/dynamic"
"k8s.io/metrics/pkg/apis/custom_metrics"

"github.com/kubernetes-sigs/custom-metrics-apiserver/pkg/provider"
"sigs.k8s.io/custom-metrics-apiserver/pkg/provider"
"k8s.io/metrics/pkg/apis/external_metrics"
)
```
Expand Down Expand Up @@ -315,8 +315,8 @@ import (
"k8s.io/apimachinery/pkg/util/wait"
"k8s.io/component-base/logs"

basecmd "github.com/kubernetes-sigs/custom-metrics-apiserver/pkg/cmd"
"github.com/kubernetes-sigs/custom-metrics-apiserver/pkg/provider"
basecmd "sigs.k8s.io/custom-metrics-apiserver/pkg/cmd"
"sigs.k8s.io/custom-metrics-apiserver/pkg/provider"

// make this the path to the provider that you just wrote
yourprov "github.com/user/repo/pkg/provider"
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/kubernetes-sigs/custom-metrics-apiserver
module sigs.k8s.io/custom-metrics-apiserver

go 1.16

Expand Down
4 changes: 2 additions & 2 deletions pkg/apiserver/apiserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ import (
genericapiserver "k8s.io/apiserver/pkg/server"
"k8s.io/client-go/informers"

"github.com/kubernetes-sigs/custom-metrics-apiserver/pkg/apiserver/installer"
"github.com/kubernetes-sigs/custom-metrics-apiserver/pkg/provider"
cminstall "k8s.io/metrics/pkg/apis/custom_metrics/install"
eminstall "k8s.io/metrics/pkg/apis/external_metrics/install"
"sigs.k8s.io/custom-metrics-apiserver/pkg/apiserver/installer"
"sigs.k8s.io/custom-metrics-apiserver/pkg/provider"
)

var (
Expand Down
6 changes: 3 additions & 3 deletions pkg/apiserver/cmapis.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ import (
"k8s.io/apiserver/pkg/endpoints/discovery"
genericapiserver "k8s.io/apiserver/pkg/server"

specificapi "github.com/kubernetes-sigs/custom-metrics-apiserver/pkg/apiserver/installer"
"github.com/kubernetes-sigs/custom-metrics-apiserver/pkg/provider"
metricstorage "github.com/kubernetes-sigs/custom-metrics-apiserver/pkg/registry/custom_metrics"
"k8s.io/metrics/pkg/apis/custom_metrics"
specificapi "sigs.k8s.io/custom-metrics-apiserver/pkg/apiserver/installer"
"sigs.k8s.io/custom-metrics-apiserver/pkg/provider"
metricstorage "sigs.k8s.io/custom-metrics-apiserver/pkg/registry/custom_metrics"
)

func (s *CustomMetricsAdapterServer) InstallCustomMetricsAPI() error {
Expand Down
6 changes: 3 additions & 3 deletions pkg/apiserver/emapis.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ import (
"k8s.io/apiserver/pkg/endpoints/discovery"
genericapiserver "k8s.io/apiserver/pkg/server"

specificapi "github.com/kubernetes-sigs/custom-metrics-apiserver/pkg/apiserver/installer"
"github.com/kubernetes-sigs/custom-metrics-apiserver/pkg/provider"
metricstorage "github.com/kubernetes-sigs/custom-metrics-apiserver/pkg/registry/external_metrics"
"k8s.io/metrics/pkg/apis/external_metrics"
specificapi "sigs.k8s.io/custom-metrics-apiserver/pkg/apiserver/installer"
"sigs.k8s.io/custom-metrics-apiserver/pkg/provider"
metricstorage "sigs.k8s.io/custom-metrics-apiserver/pkg/registry/external_metrics"
)

// InstallExternalMetricsAPI registers the api server in Kube Aggregator
Expand Down
2 changes: 1 addition & 1 deletion pkg/apiserver/endpoints/handlers/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import (
"k8s.io/apiserver/pkg/endpoints/request"
utiltrace "k8s.io/utils/trace"

cm_rest "github.com/kubernetes-sigs/custom-metrics-apiserver/pkg/apiserver/registry/rest"
cm_rest "sigs.k8s.io/custom-metrics-apiserver/pkg/apiserver/registry/rest"
)

func ListResourceWithOptions(r cm_rest.ListerWithOptions, scope handlers.RequestScope) http.HandlerFunc {
Expand Down
8 changes: 4 additions & 4 deletions pkg/apiserver/installer/apiserver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ import (
installem "k8s.io/metrics/pkg/apis/external_metrics/install"
emv1beta1 "k8s.io/metrics/pkg/apis/external_metrics/v1beta1"

"github.com/kubernetes-sigs/custom-metrics-apiserver/pkg/provider"
custommetricstorage "github.com/kubernetes-sigs/custom-metrics-apiserver/pkg/registry/custom_metrics"
externalmetricstorage "github.com/kubernetes-sigs/custom-metrics-apiserver/pkg/registry/external_metrics"
sampleprovider "github.com/kubernetes-sigs/custom-metrics-apiserver/test-adapter/provider"
"k8s.io/metrics/pkg/apis/external_metrics"
"sigs.k8s.io/custom-metrics-apiserver/pkg/provider"
custommetricstorage "sigs.k8s.io/custom-metrics-apiserver/pkg/registry/custom_metrics"
externalmetricstorage "sigs.k8s.io/custom-metrics-apiserver/pkg/registry/external_metrics"
sampleprovider "sigs.k8s.io/custom-metrics-apiserver/test-adapter/provider"
)

// defaultAPIServer exposes nested objects for testability.
Expand Down
2 changes: 1 addition & 1 deletion pkg/apiserver/installer/cmhandlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"k8s.io/apiserver/pkg/endpoints/metrics"

"github.com/emicklei/go-restful"
"github.com/kubernetes-sigs/custom-metrics-apiserver/pkg/apiserver/registry/rest"
"sigs.k8s.io/custom-metrics-apiserver/pkg/apiserver/registry/rest"
)

type CMHandlers struct{}
Expand Down
4 changes: 2 additions & 2 deletions pkg/apiserver/installer/installer.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ import (
"k8s.io/apiserver/pkg/registry/rest"

"github.com/emicklei/go-restful"
cm_handlers "github.com/kubernetes-sigs/custom-metrics-apiserver/pkg/apiserver/endpoints/handlers"
cm_rest "github.com/kubernetes-sigs/custom-metrics-apiserver/pkg/apiserver/registry/rest"
cm_handlers "sigs.k8s.io/custom-metrics-apiserver/pkg/apiserver/endpoints/handlers"
cm_rest "sigs.k8s.io/custom-metrics-apiserver/pkg/apiserver/registry/rest"
)

// NB: the contents of this file should mostly be a subset of the functionality
Expand Down
8 changes: 4 additions & 4 deletions pkg/cmd/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ import (
"k8s.io/client-go/tools/clientcmd"
openapicommon "k8s.io/kube-openapi/pkg/common"

"github.com/kubernetes-sigs/custom-metrics-apiserver/pkg/apiserver"
"github.com/kubernetes-sigs/custom-metrics-apiserver/pkg/cmd/server"
"github.com/kubernetes-sigs/custom-metrics-apiserver/pkg/dynamicmapper"
"github.com/kubernetes-sigs/custom-metrics-apiserver/pkg/provider"
"sigs.k8s.io/custom-metrics-apiserver/pkg/apiserver"
"sigs.k8s.io/custom-metrics-apiserver/pkg/cmd/server"
"sigs.k8s.io/custom-metrics-apiserver/pkg/dynamicmapper"
"sigs.k8s.io/custom-metrics-apiserver/pkg/provider"
)

// AdapterBase provides a base set of functionality for any custom metrics adapter.
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/server/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
genericoptions "k8s.io/apiserver/pkg/server/options"
openapicommon "k8s.io/kube-openapi/pkg/common"

"github.com/kubernetes-sigs/custom-metrics-apiserver/pkg/apiserver"
"sigs.k8s.io/custom-metrics-apiserver/pkg/apiserver"
)

type CustomMetricsAdapterServerOptions struct {
Expand Down
2 changes: 1 addition & 1 deletion pkg/provider/helpers/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (
"k8s.io/client-go/dynamic"
"k8s.io/metrics/pkg/apis/custom_metrics"

"github.com/kubernetes-sigs/custom-metrics-apiserver/pkg/provider"
"sigs.k8s.io/custom-metrics-apiserver/pkg/provider"
)

// ResourceFor attempts to resolve a single qualified resource for the given metric.
Expand Down
4 changes: 2 additions & 2 deletions pkg/registry/custom_metrics/reststorage.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (
"context"
"fmt"

cm_rest "github.com/kubernetes-sigs/custom-metrics-apiserver/pkg/apiserver/registry/rest"
"github.com/kubernetes-sigs/custom-metrics-apiserver/pkg/provider"
cm_rest "sigs.k8s.io/custom-metrics-apiserver/pkg/apiserver/registry/rest"
"sigs.k8s.io/custom-metrics-apiserver/pkg/provider"

metainternalversion "k8s.io/apimachinery/pkg/apis/meta/internalversion"
"k8s.io/apimachinery/pkg/labels"
Expand Down
2 changes: 1 addition & 1 deletion pkg/registry/external_metrics/reststorage.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ import (
"context"
"fmt"

"github.com/kubernetes-sigs/custom-metrics-apiserver/pkg/provider"
metainternalversion "k8s.io/apimachinery/pkg/apis/meta/internalversion"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apiserver/pkg/endpoints/request"
genericapirequest "k8s.io/apiserver/pkg/endpoints/request"
"k8s.io/apiserver/pkg/registry/rest"
"k8s.io/metrics/pkg/apis/external_metrics"
"sigs.k8s.io/custom-metrics-apiserver/pkg/provider"
)

// REST is a wrapper for CustomMetricsProvider that provides implementation for Storage and Lister
Expand Down
10 changes: 5 additions & 5 deletions test-adapter/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ import (
openapinamer "k8s.io/apiserver/pkg/endpoints/openapi"
genericapiserver "k8s.io/apiserver/pkg/server"

"github.com/kubernetes-sigs/custom-metrics-apiserver/pkg/apiserver"
basecmd "github.com/kubernetes-sigs/custom-metrics-apiserver/pkg/cmd"
"github.com/kubernetes-sigs/custom-metrics-apiserver/pkg/provider"
generatedopenapi "github.com/kubernetes-sigs/custom-metrics-apiserver/test-adapter/generated/openapi"
fakeprov "github.com/kubernetes-sigs/custom-metrics-apiserver/test-adapter/provider"
"sigs.k8s.io/custom-metrics-apiserver/pkg/apiserver"
basecmd "sigs.k8s.io/custom-metrics-apiserver/pkg/cmd"
"sigs.k8s.io/custom-metrics-apiserver/pkg/provider"
generatedopenapi "sigs.k8s.io/custom-metrics-apiserver/test-adapter/generated/openapi"
fakeprov "sigs.k8s.io/custom-metrics-apiserver/test-adapter/provider"
)

type SampleAdapter struct {
Expand Down
4 changes: 2 additions & 2 deletions test-adapter/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ import (
"k8s.io/metrics/pkg/apis/custom_metrics"
"k8s.io/metrics/pkg/apis/external_metrics"

"github.com/kubernetes-sigs/custom-metrics-apiserver/pkg/provider"
"github.com/kubernetes-sigs/custom-metrics-apiserver/pkg/provider/helpers"
"sigs.k8s.io/custom-metrics-apiserver/pkg/provider"
"sigs.k8s.io/custom-metrics-apiserver/pkg/provider/helpers"
)

// CustomMetricResource wraps provider.CustomMetricInfo in a struct which stores the Name and Namespace of the resource
Expand Down

0 comments on commit 060cbc1

Please sign in to comment.