mirror of
https://github.com/kubernetes-sigs/prometheus-adapter.git
synced 2026-04-05 17:27:51 +00:00
*: move all imports to github.com/kubernetes-sigs/prometheus-adapter
Signed-off-by: paulfantom <pawel@krupa.net.pl>
This commit is contained in:
parent
dd841a6e5e
commit
cd55a67b89
24 changed files with 50 additions and 50 deletions
|
|
@ -4,7 +4,7 @@ go:
|
|||
- '1.15'
|
||||
|
||||
# blech, Travis downloads with capitals in DirectXMan12, which confuses go
|
||||
go_import_path: github.com/directxman12/k8s-prometheus-adapter
|
||||
go_import_path: github.com/kubernetes-sigs/prometheus-adapter
|
||||
|
||||
script: make verify && git diff --exit-code
|
||||
|
||||
|
|
|
|||
6
Makefile
6
Makefile
|
|
@ -34,11 +34,11 @@ all: $(OUT_DIR)/$(ARCH)/adapter
|
|||
|
||||
src_deps=$(shell find pkg cmd -type f -name "*.go")
|
||||
$(OUT_DIR)/%/adapter: $(src_deps)
|
||||
CGO_ENABLED=0 GOARCH=$* go build -tags netgo -o $(OUT_DIR)/$*/adapter github.com/directxman12/k8s-prometheus-adapter/cmd/adapter
|
||||
CGO_ENABLED=0 GOARCH=$* go build -tags netgo -o $(OUT_DIR)/$*/adapter github.com/kubernetes-sigs/prometheus-adapter/cmd/adapter
|
||||
|
||||
docker-build: $(OUT_DIR)/Dockerfile
|
||||
docker run -it -v $(OUT_DIR):/build -v $(PWD):/go/src/github.com/directxman12/k8s-prometheus-adapter -e GOARCH=$(ARCH) $(GOIMAGE) /bin/bash -c "\
|
||||
CGO_ENABLED=0 go build -tags netgo -o /build/$(ARCH)/adapter github.com/directxman12/k8s-prometheus-adapter/cmd/adapter"
|
||||
docker run -it -v $(OUT_DIR):/build -v $(PWD):/go/src/github.com/kubernetes-sigs/prometheus-adapter -e GOARCH=$(ARCH) $(GOIMAGE) /bin/bash -c "\
|
||||
CGO_ENABLED=0 go build -tags netgo -o /build/$(ARCH)/adapter github.com/kubernetes-sigs/prometheus-adapter/cmd/adapter"
|
||||
|
||||
docker build -t $(REGISTRY)/$(IMAGE)-$(ARCH):$(VERSION) --build-arg ARCH=$(ARCH) --build-arg BASEIMAGE=$(BASEIMAGE) $(OUT_DIR)
|
||||
|
||||
|
|
|
|||
|
|
@ -41,14 +41,14 @@ import (
|
|||
"github.com/kubernetes-sigs/custom-metrics-apiserver/pkg/provider"
|
||||
"sigs.k8s.io/metrics-server/pkg/api"
|
||||
|
||||
generatedopenapi "github.com/directxman12/k8s-prometheus-adapter/pkg/api/generated/openapi"
|
||||
prom "github.com/directxman12/k8s-prometheus-adapter/pkg/client"
|
||||
mprom "github.com/directxman12/k8s-prometheus-adapter/pkg/client/metrics"
|
||||
adaptercfg "github.com/directxman12/k8s-prometheus-adapter/pkg/config"
|
||||
cmprov "github.com/directxman12/k8s-prometheus-adapter/pkg/custom-provider"
|
||||
extprov "github.com/directxman12/k8s-prometheus-adapter/pkg/external-provider"
|
||||
"github.com/directxman12/k8s-prometheus-adapter/pkg/naming"
|
||||
resprov "github.com/directxman12/k8s-prometheus-adapter/pkg/resourceprovider"
|
||||
generatedopenapi "github.com/kubernetes-sigs/prometheus-adapter/pkg/api/generated/openapi"
|
||||
prom "github.com/kubernetes-sigs/prometheus-adapter/pkg/client"
|
||||
mprom "github.com/kubernetes-sigs/prometheus-adapter/pkg/client/metrics"
|
||||
adaptercfg "github.com/kubernetes-sigs/prometheus-adapter/pkg/config"
|
||||
cmprov "github.com/kubernetes-sigs/prometheus-adapter/pkg/custom-provider"
|
||||
extprov "github.com/kubernetes-sigs/prometheus-adapter/pkg/external-provider"
|
||||
"github.com/kubernetes-sigs/prometheus-adapter/pkg/naming"
|
||||
resprov "github.com/kubernetes-sigs/prometheus-adapter/pkg/resourceprovider"
|
||||
)
|
||||
|
||||
type PrometheusAdapter struct {
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import (
|
|||
"github.com/spf13/cobra"
|
||||
yaml "gopkg.in/yaml.v2"
|
||||
|
||||
"github.com/directxman12/k8s-prometheus-adapter/cmd/config-gen/utils"
|
||||
"github.com/kubernetes-sigs/prometheus-adapter/cmd/config-gen/utils"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ import (
|
|||
"fmt"
|
||||
"time"
|
||||
|
||||
prom "github.com/directxman12/k8s-prometheus-adapter/pkg/client"
|
||||
. "github.com/directxman12/k8s-prometheus-adapter/pkg/config"
|
||||
prom "github.com/kubernetes-sigs/prometheus-adapter/pkg/client"
|
||||
. "github.com/kubernetes-sigs/prometheus-adapter/pkg/config"
|
||||
pmodel "github.com/prometheus/common/model"
|
||||
)
|
||||
|
||||
|
|
|
|||
2
go.mod
2
go.mod
|
|
@ -1,4 +1,4 @@
|
|||
module github.com/directxman12/k8s-prometheus-adapter
|
||||
module github.com/kubernetes-sigs/prometheus-adapter
|
||||
|
||||
go 1.13
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ import (
|
|||
"context"
|
||||
"fmt"
|
||||
|
||||
prom "github.com/directxman12/k8s-prometheus-adapter/pkg/client"
|
||||
prom "github.com/kubernetes-sigs/prometheus-adapter/pkg/client"
|
||||
pmodel "github.com/prometheus/common/model"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ import (
|
|||
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
|
||||
"github.com/directxman12/k8s-prometheus-adapter/pkg/client"
|
||||
"github.com/kubernetes-sigs/prometheus-adapter/pkg/client"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
|||
|
|
@ -37,8 +37,8 @@ import (
|
|||
"k8s.io/klog/v2"
|
||||
"k8s.io/metrics/pkg/apis/custom_metrics"
|
||||
|
||||
prom "github.com/directxman12/k8s-prometheus-adapter/pkg/client"
|
||||
"github.com/directxman12/k8s-prometheus-adapter/pkg/naming"
|
||||
prom "github.com/kubernetes-sigs/prometheus-adapter/pkg/client"
|
||||
"github.com/kubernetes-sigs/prometheus-adapter/pkg/naming"
|
||||
)
|
||||
|
||||
// Runnable represents something that can be run until told to stop.
|
||||
|
|
|
|||
|
|
@ -25,10 +25,10 @@ import (
|
|||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
fakedyn "k8s.io/client-go/dynamic/fake"
|
||||
|
||||
config "github.com/directxman12/k8s-prometheus-adapter/cmd/config-gen/utils"
|
||||
prom "github.com/directxman12/k8s-prometheus-adapter/pkg/client"
|
||||
fakeprom "github.com/directxman12/k8s-prometheus-adapter/pkg/client/fake"
|
||||
"github.com/directxman12/k8s-prometheus-adapter/pkg/naming"
|
||||
config "github.com/kubernetes-sigs/prometheus-adapter/cmd/config-gen/utils"
|
||||
prom "github.com/kubernetes-sigs/prometheus-adapter/pkg/client"
|
||||
fakeprom "github.com/kubernetes-sigs/prometheus-adapter/pkg/client/fake"
|
||||
"github.com/kubernetes-sigs/prometheus-adapter/pkg/naming"
|
||||
pmodel "github.com/prometheus/common/model"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -24,8 +24,8 @@ import (
|
|||
apimeta "k8s.io/apimachinery/pkg/api/meta"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
|
||||
prom "github.com/directxman12/k8s-prometheus-adapter/pkg/client"
|
||||
"github.com/directxman12/k8s-prometheus-adapter/pkg/naming"
|
||||
prom "github.com/kubernetes-sigs/prometheus-adapter/pkg/client"
|
||||
"github.com/kubernetes-sigs/prometheus-adapter/pkg/naming"
|
||||
pmodel "github.com/prometheus/common/model"
|
||||
"k8s.io/klog/v2"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -31,9 +31,9 @@ import (
|
|||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
"k8s.io/apimachinery/pkg/selection"
|
||||
|
||||
config "github.com/directxman12/k8s-prometheus-adapter/cmd/config-gen/utils"
|
||||
prom "github.com/directxman12/k8s-prometheus-adapter/pkg/client"
|
||||
"github.com/directxman12/k8s-prometheus-adapter/pkg/naming"
|
||||
config "github.com/kubernetes-sigs/prometheus-adapter/cmd/config-gen/utils"
|
||||
prom "github.com/kubernetes-sigs/prometheus-adapter/pkg/client"
|
||||
"github.com/kubernetes-sigs/prometheus-adapter/pkg/naming"
|
||||
)
|
||||
|
||||
// restMapper creates a RESTMapper with just the types we need for
|
||||
|
|
|
|||
|
|
@ -24,8 +24,8 @@ import (
|
|||
pmodel "github.com/prometheus/common/model"
|
||||
"k8s.io/klog/v2"
|
||||
|
||||
prom "github.com/directxman12/k8s-prometheus-adapter/pkg/client"
|
||||
"github.com/directxman12/k8s-prometheus-adapter/pkg/naming"
|
||||
prom "github.com/kubernetes-sigs/prometheus-adapter/pkg/client"
|
||||
"github.com/kubernetes-sigs/prometheus-adapter/pkg/naming"
|
||||
)
|
||||
|
||||
// Runnable represents something that can be run until told to stop.
|
||||
|
|
|
|||
|
|
@ -20,8 +20,8 @@ import (
|
|||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/klog/v2"
|
||||
|
||||
prom "github.com/directxman12/k8s-prometheus-adapter/pkg/client"
|
||||
"github.com/directxman12/k8s-prometheus-adapter/pkg/naming"
|
||||
prom "github.com/kubernetes-sigs/prometheus-adapter/pkg/client"
|
||||
"github.com/kubernetes-sigs/prometheus-adapter/pkg/naming"
|
||||
)
|
||||
|
||||
// ExternalSeriesRegistry acts as the top-level converter for transforming Kubernetes requests
|
||||
|
|
|
|||
|
|
@ -17,8 +17,8 @@ import (
|
|||
"errors"
|
||||
"fmt"
|
||||
|
||||
prom "github.com/directxman12/k8s-prometheus-adapter/pkg/client"
|
||||
"github.com/kubernetes-sigs/custom-metrics-apiserver/pkg/provider"
|
||||
prom "github.com/kubernetes-sigs/prometheus-adapter/pkg/client"
|
||||
"github.com/prometheus/common/model"
|
||||
"k8s.io/apimachinery/pkg/api/resource"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
prom "github.com/directxman12/k8s-prometheus-adapter/pkg/client"
|
||||
prom "github.com/kubernetes-sigs/prometheus-adapter/pkg/client"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -29,8 +29,8 @@ import (
|
|||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/metrics/pkg/apis/external_metrics"
|
||||
|
||||
prom "github.com/directxman12/k8s-prometheus-adapter/pkg/client"
|
||||
"github.com/directxman12/k8s-prometheus-adapter/pkg/naming"
|
||||
prom "github.com/kubernetes-sigs/prometheus-adapter/pkg/client"
|
||||
"github.com/kubernetes-sigs/prometheus-adapter/pkg/naming"
|
||||
)
|
||||
|
||||
type externalPrometheusProvider struct {
|
||||
|
|
|
|||
|
|
@ -24,8 +24,8 @@ import (
|
|||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
|
||||
prom "github.com/directxman12/k8s-prometheus-adapter/pkg/client"
|
||||
"github.com/directxman12/k8s-prometheus-adapter/pkg/config"
|
||||
prom "github.com/kubernetes-sigs/prometheus-adapter/pkg/client"
|
||||
"github.com/kubernetes-sigs/prometheus-adapter/pkg/config"
|
||||
)
|
||||
|
||||
// MetricNamer knows how to convert Prometheus series names and label names to
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ import (
|
|||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
"k8s.io/apimachinery/pkg/selection"
|
||||
|
||||
prom "github.com/directxman12/k8s-prometheus-adapter/pkg/client"
|
||||
prom "github.com/kubernetes-sigs/prometheus-adapter/pkg/client"
|
||||
)
|
||||
|
||||
// MetricsQuery represents a compiled metrics query for some set of
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ import (
|
|||
"fmt"
|
||||
"testing"
|
||||
|
||||
prom "github.com/directxman12/k8s-prometheus-adapter/pkg/client"
|
||||
prom "github.com/kubernetes-sigs/prometheus-adapter/pkg/client"
|
||||
pmodel "github.com/prometheus/common/model"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ import (
|
|||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/directxman12/k8s-prometheus-adapter/pkg/config"
|
||||
"github.com/kubernetes-sigs/prometheus-adapter/pkg/config"
|
||||
)
|
||||
|
||||
func TestReMatcherIs(t *testing.T) {
|
||||
|
|
|
|||
|
|
@ -26,9 +26,9 @@ import (
|
|||
apimeta "k8s.io/apimachinery/pkg/api/meta"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
|
||||
prom "github.com/directxman12/k8s-prometheus-adapter/pkg/client"
|
||||
"github.com/directxman12/k8s-prometheus-adapter/pkg/config"
|
||||
"github.com/kubernetes-sigs/custom-metrics-apiserver/pkg/provider"
|
||||
prom "github.com/kubernetes-sigs/prometheus-adapter/pkg/client"
|
||||
"github.com/kubernetes-sigs/prometheus-adapter/pkg/config"
|
||||
pmodel "github.com/prometheus/common/model"
|
||||
"k8s.io/klog/v2"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -32,9 +32,9 @@ import (
|
|||
metrics "k8s.io/metrics/pkg/apis/metrics"
|
||||
"sigs.k8s.io/metrics-server/pkg/api"
|
||||
|
||||
"github.com/directxman12/k8s-prometheus-adapter/pkg/client"
|
||||
"github.com/directxman12/k8s-prometheus-adapter/pkg/config"
|
||||
"github.com/directxman12/k8s-prometheus-adapter/pkg/naming"
|
||||
"github.com/kubernetes-sigs/prometheus-adapter/pkg/client"
|
||||
"github.com/kubernetes-sigs/prometheus-adapter/pkg/config"
|
||||
"github.com/kubernetes-sigs/prometheus-adapter/pkg/naming"
|
||||
pmodel "github.com/prometheus/common/model"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -30,9 +30,9 @@ import (
|
|||
"k8s.io/metrics/pkg/apis/metrics"
|
||||
"sigs.k8s.io/metrics-server/pkg/api"
|
||||
|
||||
config "github.com/directxman12/k8s-prometheus-adapter/cmd/config-gen/utils"
|
||||
prom "github.com/directxman12/k8s-prometheus-adapter/pkg/client"
|
||||
fakeprom "github.com/directxman12/k8s-prometheus-adapter/pkg/client/fake"
|
||||
config "github.com/kubernetes-sigs/prometheus-adapter/cmd/config-gen/utils"
|
||||
prom "github.com/kubernetes-sigs/prometheus-adapter/pkg/client"
|
||||
fakeprom "github.com/kubernetes-sigs/prometheus-adapter/pkg/client/fake"
|
||||
pmodel "github.com/prometheus/common/model"
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue