mirror of
https://github.com/kubernetes-sigs/prometheus-adapter.git
synced 2026-04-06 01:38:10 +00:00
Merge pull request #374 from paulfantom/imports
*: move all imports to github.com/kubernetes-sigs/prometheus-adapter
This commit is contained in:
commit
30f6e2fd07
24 changed files with 50 additions and 50 deletions
|
|
@ -4,7 +4,7 @@ go:
|
||||||
- '1.15'
|
- '1.15'
|
||||||
|
|
||||||
# blech, Travis downloads with capitals in DirectXMan12, which confuses go
|
# 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
|
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")
|
src_deps=$(shell find pkg cmd -type f -name "*.go")
|
||||||
$(OUT_DIR)/%/adapter: $(src_deps)
|
$(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-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 "\
|
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/directxman12/k8s-prometheus-adapter/cmd/adapter"
|
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)
|
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"
|
"github.com/kubernetes-sigs/custom-metrics-apiserver/pkg/provider"
|
||||||
"sigs.k8s.io/metrics-server/pkg/api"
|
"sigs.k8s.io/metrics-server/pkg/api"
|
||||||
|
|
||||||
generatedopenapi "github.com/directxman12/k8s-prometheus-adapter/pkg/api/generated/openapi"
|
generatedopenapi "github.com/kubernetes-sigs/prometheus-adapter/pkg/api/generated/openapi"
|
||||||
prom "github.com/directxman12/k8s-prometheus-adapter/pkg/client"
|
prom "github.com/kubernetes-sigs/prometheus-adapter/pkg/client"
|
||||||
mprom "github.com/directxman12/k8s-prometheus-adapter/pkg/client/metrics"
|
mprom "github.com/kubernetes-sigs/prometheus-adapter/pkg/client/metrics"
|
||||||
adaptercfg "github.com/directxman12/k8s-prometheus-adapter/pkg/config"
|
adaptercfg "github.com/kubernetes-sigs/prometheus-adapter/pkg/config"
|
||||||
cmprov "github.com/directxman12/k8s-prometheus-adapter/pkg/custom-provider"
|
cmprov "github.com/kubernetes-sigs/prometheus-adapter/pkg/custom-provider"
|
||||||
extprov "github.com/directxman12/k8s-prometheus-adapter/pkg/external-provider"
|
extprov "github.com/kubernetes-sigs/prometheus-adapter/pkg/external-provider"
|
||||||
"github.com/directxman12/k8s-prometheus-adapter/pkg/naming"
|
"github.com/kubernetes-sigs/prometheus-adapter/pkg/naming"
|
||||||
resprov "github.com/directxman12/k8s-prometheus-adapter/pkg/resourceprovider"
|
resprov "github.com/kubernetes-sigs/prometheus-adapter/pkg/resourceprovider"
|
||||||
)
|
)
|
||||||
|
|
||||||
type PrometheusAdapter struct {
|
type PrometheusAdapter struct {
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ import (
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
yaml "gopkg.in/yaml.v2"
|
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() {
|
func main() {
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,8 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
prom "github.com/directxman12/k8s-prometheus-adapter/pkg/client"
|
prom "github.com/kubernetes-sigs/prometheus-adapter/pkg/client"
|
||||||
. "github.com/directxman12/k8s-prometheus-adapter/pkg/config"
|
. "github.com/kubernetes-sigs/prometheus-adapter/pkg/config"
|
||||||
pmodel "github.com/prometheus/common/model"
|
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
|
go 1.13
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"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"
|
pmodel "github.com/prometheus/common/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ import (
|
||||||
|
|
||||||
"github.com/prometheus/client_golang/prometheus"
|
"github.com/prometheus/client_golang/prometheus"
|
||||||
|
|
||||||
"github.com/directxman12/k8s-prometheus-adapter/pkg/client"
|
"github.com/kubernetes-sigs/prometheus-adapter/pkg/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
||||||
|
|
@ -37,8 +37,8 @@ import (
|
||||||
"k8s.io/klog/v2"
|
"k8s.io/klog/v2"
|
||||||
"k8s.io/metrics/pkg/apis/custom_metrics"
|
"k8s.io/metrics/pkg/apis/custom_metrics"
|
||||||
|
|
||||||
prom "github.com/directxman12/k8s-prometheus-adapter/pkg/client"
|
prom "github.com/kubernetes-sigs/prometheus-adapter/pkg/client"
|
||||||
"github.com/directxman12/k8s-prometheus-adapter/pkg/naming"
|
"github.com/kubernetes-sigs/prometheus-adapter/pkg/naming"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Runnable represents something that can be run until told to stop.
|
// Runnable represents something that can be run until told to stop.
|
||||||
|
|
|
||||||
|
|
@ -25,10 +25,10 @@ import (
|
||||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||||
fakedyn "k8s.io/client-go/dynamic/fake"
|
fakedyn "k8s.io/client-go/dynamic/fake"
|
||||||
|
|
||||||
config "github.com/directxman12/k8s-prometheus-adapter/cmd/config-gen/utils"
|
config "github.com/kubernetes-sigs/prometheus-adapter/cmd/config-gen/utils"
|
||||||
prom "github.com/directxman12/k8s-prometheus-adapter/pkg/client"
|
prom "github.com/kubernetes-sigs/prometheus-adapter/pkg/client"
|
||||||
fakeprom "github.com/directxman12/k8s-prometheus-adapter/pkg/client/fake"
|
fakeprom "github.com/kubernetes-sigs/prometheus-adapter/pkg/client/fake"
|
||||||
"github.com/directxman12/k8s-prometheus-adapter/pkg/naming"
|
"github.com/kubernetes-sigs/prometheus-adapter/pkg/naming"
|
||||||
pmodel "github.com/prometheus/common/model"
|
pmodel "github.com/prometheus/common/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,8 +24,8 @@ import (
|
||||||
apimeta "k8s.io/apimachinery/pkg/api/meta"
|
apimeta "k8s.io/apimachinery/pkg/api/meta"
|
||||||
"k8s.io/apimachinery/pkg/labels"
|
"k8s.io/apimachinery/pkg/labels"
|
||||||
|
|
||||||
prom "github.com/directxman12/k8s-prometheus-adapter/pkg/client"
|
prom "github.com/kubernetes-sigs/prometheus-adapter/pkg/client"
|
||||||
"github.com/directxman12/k8s-prometheus-adapter/pkg/naming"
|
"github.com/kubernetes-sigs/prometheus-adapter/pkg/naming"
|
||||||
pmodel "github.com/prometheus/common/model"
|
pmodel "github.com/prometheus/common/model"
|
||||||
"k8s.io/klog/v2"
|
"k8s.io/klog/v2"
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -31,9 +31,9 @@ import (
|
||||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||||
"k8s.io/apimachinery/pkg/selection"
|
"k8s.io/apimachinery/pkg/selection"
|
||||||
|
|
||||||
config "github.com/directxman12/k8s-prometheus-adapter/cmd/config-gen/utils"
|
config "github.com/kubernetes-sigs/prometheus-adapter/cmd/config-gen/utils"
|
||||||
prom "github.com/directxman12/k8s-prometheus-adapter/pkg/client"
|
prom "github.com/kubernetes-sigs/prometheus-adapter/pkg/client"
|
||||||
"github.com/directxman12/k8s-prometheus-adapter/pkg/naming"
|
"github.com/kubernetes-sigs/prometheus-adapter/pkg/naming"
|
||||||
)
|
)
|
||||||
|
|
||||||
// restMapper creates a RESTMapper with just the types we need for
|
// restMapper creates a RESTMapper with just the types we need for
|
||||||
|
|
|
||||||
|
|
@ -24,8 +24,8 @@ import (
|
||||||
pmodel "github.com/prometheus/common/model"
|
pmodel "github.com/prometheus/common/model"
|
||||||
"k8s.io/klog/v2"
|
"k8s.io/klog/v2"
|
||||||
|
|
||||||
prom "github.com/directxman12/k8s-prometheus-adapter/pkg/client"
|
prom "github.com/kubernetes-sigs/prometheus-adapter/pkg/client"
|
||||||
"github.com/directxman12/k8s-prometheus-adapter/pkg/naming"
|
"github.com/kubernetes-sigs/prometheus-adapter/pkg/naming"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Runnable represents something that can be run until told to stop.
|
// Runnable represents something that can be run until told to stop.
|
||||||
|
|
|
||||||
|
|
@ -20,8 +20,8 @@ import (
|
||||||
"k8s.io/apimachinery/pkg/labels"
|
"k8s.io/apimachinery/pkg/labels"
|
||||||
"k8s.io/klog/v2"
|
"k8s.io/klog/v2"
|
||||||
|
|
||||||
prom "github.com/directxman12/k8s-prometheus-adapter/pkg/client"
|
prom "github.com/kubernetes-sigs/prometheus-adapter/pkg/client"
|
||||||
"github.com/directxman12/k8s-prometheus-adapter/pkg/naming"
|
"github.com/kubernetes-sigs/prometheus-adapter/pkg/naming"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ExternalSeriesRegistry acts as the top-level converter for transforming Kubernetes requests
|
// ExternalSeriesRegistry acts as the top-level converter for transforming Kubernetes requests
|
||||||
|
|
|
||||||
|
|
@ -17,8 +17,8 @@ import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
prom "github.com/directxman12/k8s-prometheus-adapter/pkg/client"
|
|
||||||
"github.com/kubernetes-sigs/custom-metrics-apiserver/pkg/provider"
|
"github.com/kubernetes-sigs/custom-metrics-apiserver/pkg/provider"
|
||||||
|
prom "github.com/kubernetes-sigs/prometheus-adapter/pkg/client"
|
||||||
"github.com/prometheus/common/model"
|
"github.com/prometheus/common/model"
|
||||||
"k8s.io/apimachinery/pkg/api/resource"
|
"k8s.io/apimachinery/pkg/api/resource"
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
prom "github.com/directxman12/k8s-prometheus-adapter/pkg/client"
|
prom "github.com/kubernetes-sigs/prometheus-adapter/pkg/client"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -29,8 +29,8 @@ import (
|
||||||
"k8s.io/apimachinery/pkg/labels"
|
"k8s.io/apimachinery/pkg/labels"
|
||||||
"k8s.io/metrics/pkg/apis/external_metrics"
|
"k8s.io/metrics/pkg/apis/external_metrics"
|
||||||
|
|
||||||
prom "github.com/directxman12/k8s-prometheus-adapter/pkg/client"
|
prom "github.com/kubernetes-sigs/prometheus-adapter/pkg/client"
|
||||||
"github.com/directxman12/k8s-prometheus-adapter/pkg/naming"
|
"github.com/kubernetes-sigs/prometheus-adapter/pkg/naming"
|
||||||
)
|
)
|
||||||
|
|
||||||
type externalPrometheusProvider struct {
|
type externalPrometheusProvider struct {
|
||||||
|
|
|
||||||
|
|
@ -24,8 +24,8 @@ import (
|
||||||
"k8s.io/apimachinery/pkg/labels"
|
"k8s.io/apimachinery/pkg/labels"
|
||||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||||
|
|
||||||
prom "github.com/directxman12/k8s-prometheus-adapter/pkg/client"
|
prom "github.com/kubernetes-sigs/prometheus-adapter/pkg/client"
|
||||||
"github.com/directxman12/k8s-prometheus-adapter/pkg/config"
|
"github.com/kubernetes-sigs/prometheus-adapter/pkg/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
// MetricNamer knows how to convert Prometheus series names and label names to
|
// 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/runtime/schema"
|
||||||
"k8s.io/apimachinery/pkg/selection"
|
"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
|
// MetricsQuery represents a compiled metrics query for some set of
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"testing"
|
"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"
|
pmodel "github.com/prometheus/common/model"
|
||||||
labels "k8s.io/apimachinery/pkg/labels"
|
labels "k8s.io/apimachinery/pkg/labels"
|
||||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ import (
|
||||||
|
|
||||||
"github.com/stretchr/testify/require"
|
"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) {
|
func TestReMatcherIs(t *testing.T) {
|
||||||
|
|
|
||||||
|
|
@ -26,9 +26,9 @@ import (
|
||||||
apimeta "k8s.io/apimachinery/pkg/api/meta"
|
apimeta "k8s.io/apimachinery/pkg/api/meta"
|
||||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
"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"
|
"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"
|
pmodel "github.com/prometheus/common/model"
|
||||||
"k8s.io/klog/v2"
|
"k8s.io/klog/v2"
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -32,9 +32,9 @@ import (
|
||||||
metrics "k8s.io/metrics/pkg/apis/metrics"
|
metrics "k8s.io/metrics/pkg/apis/metrics"
|
||||||
"sigs.k8s.io/metrics-server/pkg/api"
|
"sigs.k8s.io/metrics-server/pkg/api"
|
||||||
|
|
||||||
"github.com/directxman12/k8s-prometheus-adapter/pkg/client"
|
"github.com/kubernetes-sigs/prometheus-adapter/pkg/client"
|
||||||
"github.com/directxman12/k8s-prometheus-adapter/pkg/config"
|
"github.com/kubernetes-sigs/prometheus-adapter/pkg/config"
|
||||||
"github.com/directxman12/k8s-prometheus-adapter/pkg/naming"
|
"github.com/kubernetes-sigs/prometheus-adapter/pkg/naming"
|
||||||
pmodel "github.com/prometheus/common/model"
|
pmodel "github.com/prometheus/common/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,9 +30,9 @@ import (
|
||||||
"k8s.io/metrics/pkg/apis/metrics"
|
"k8s.io/metrics/pkg/apis/metrics"
|
||||||
"sigs.k8s.io/metrics-server/pkg/api"
|
"sigs.k8s.io/metrics-server/pkg/api"
|
||||||
|
|
||||||
config "github.com/directxman12/k8s-prometheus-adapter/cmd/config-gen/utils"
|
config "github.com/kubernetes-sigs/prometheus-adapter/cmd/config-gen/utils"
|
||||||
prom "github.com/directxman12/k8s-prometheus-adapter/pkg/client"
|
prom "github.com/kubernetes-sigs/prometheus-adapter/pkg/client"
|
||||||
fakeprom "github.com/directxman12/k8s-prometheus-adapter/pkg/client/fake"
|
fakeprom "github.com/kubernetes-sigs/prometheus-adapter/pkg/client/fake"
|
||||||
pmodel "github.com/prometheus/common/model"
|
pmodel "github.com/prometheus/common/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue