Skip to content

Commit

Permalink
Merge pull request #1238 from omegas27/update-go-path-to-v2
Browse files Browse the repository at this point in the history
Update go module path to k8s.io/kube-state-metrics/v2
  • Loading branch information
k8s-ci-robot authored Sep 23, 2020
2 parents 2ebe4df + 7250bc2 commit 392f924
Show file tree
Hide file tree
Showing 79 changed files with 173 additions and 623 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

NOTE: This is a major new alpha 2.0 release with breaking changes and removed metrics. See details below!

* [CHANGE] Update go module path to k8s.io/kube-state-metrics/v2 #1238
* [CHANGE] Update DaemonSet updated_number_scheduled metric name to be consistent #1181
Metric was changed from kube_daemonset_updated_number_scheduled to kube_daemonset_status_updated_number_scheduled
* [CHANGE] Rework resource metrics #1168
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ARCH ?= $(shell go env GOARCH)
BuildDate = $(shell date -u +'%Y-%m-%dT%H:%M:%SZ')
Commit = $(shell git rev-parse --short HEAD)
ALL_ARCH = amd64 arm arm64 ppc64le s390x
PKG = k8s.io/kube-state-metrics/pkg
PKG = k8s.io/kube-state-metrics/v2/pkg
GO_VERSION = 1.14.7
IMAGE = $(REGISTRY)/kube-state-metrics
MULTI_ARCH_IMG = $(IMAGE)-$(ARCH)
Expand Down
12 changes: 10 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,20 +1,28 @@
module k8s.io/kube-state-metrics
module k8s.io/kube-state-metrics/v2

require (
github.com/Azure/go-autorest/autorest v0.10.0 // indirect
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d // indirect
github.com/brancz/gojsontoyaml v0.0.0-20190425155809-e8bd32d46b3d
github.com/campoy/embedmd v1.0.0
github.com/dgryski/go-jump v0.0.0-20170409065014-e1f439676b57
github.com/fatih/color v1.9.0 // indirect
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6 // indirect
github.com/google/go-jsonnet v0.14.0
github.com/gophercloud/gophercloud v0.8.0 // indirect
github.com/jsonnet-bundler/jsonnet-bundler v0.4.1-0.20200708074244-ada055a225fa
github.com/kr/pretty v0.2.0 // indirect
github.com/mattn/go-colorable v0.1.7 // indirect
github.com/oklog/run v1.1.0
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.7.1
github.com/prometheus/client_model v0.2.0
github.com/prometheus/common v0.10.0
github.com/prometheus/prometheus v1.8.2-0.20200326161412-ae041f97cfc6
github.com/prometheus/prometheus v2.5.0+incompatible
github.com/robfig/cron/v3 v3.0.0
github.com/spf13/pflag v1.0.5
golang.org/x/net v0.0.0-20200301022130-244492dfa37a // indirect
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d // indirect
golang.org/x/sys v0.0.0-20200915084602-288bc346aa39 // indirect
golang.org/x/tools v0.0.0-20200305205014-bc073721adb6
k8s.io/api v0.18.6
Expand Down
363 changes: 2 additions & 361 deletions go.sum

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions internal/store/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ import (
"k8s.io/client-go/tools/cache"
"k8s.io/klog"

ksmtypes "k8s.io/kube-state-metrics/pkg/builder/types"
"k8s.io/kube-state-metrics/pkg/listwatch"
generator "k8s.io/kube-state-metrics/pkg/metric_generator"
metricsstore "k8s.io/kube-state-metrics/pkg/metrics_store"
"k8s.io/kube-state-metrics/pkg/options"
"k8s.io/kube-state-metrics/pkg/sharding"
"k8s.io/kube-state-metrics/pkg/watch"
ksmtypes "k8s.io/kube-state-metrics/v2/pkg/builder/types"
"k8s.io/kube-state-metrics/v2/pkg/listwatch"
generator "k8s.io/kube-state-metrics/v2/pkg/metric_generator"
metricsstore "k8s.io/kube-state-metrics/v2/pkg/metrics_store"
"k8s.io/kube-state-metrics/v2/pkg/options"
"k8s.io/kube-state-metrics/v2/pkg/sharding"
"k8s.io/kube-state-metrics/v2/pkg/watch"
)

// Builder helps to build store. It follows the builder pattern
Expand Down
4 changes: 2 additions & 2 deletions internal/store/certificatesigningrequest.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ package store
import (
"context"

"k8s.io/kube-state-metrics/pkg/metric"
generator "k8s.io/kube-state-metrics/pkg/metric_generator"
"k8s.io/kube-state-metrics/v2/pkg/metric"
generator "k8s.io/kube-state-metrics/v2/pkg/metric_generator"

certv1beta1 "k8s.io/api/certificates/v1beta1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
2 changes: 1 addition & 1 deletion internal/store/certificatesigningrequest_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
certv1beta1 "k8s.io/api/certificates/v1beta1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

generator "k8s.io/kube-state-metrics/pkg/metric_generator"
generator "k8s.io/kube-state-metrics/v2/pkg/metric_generator"
)

func TestCsrStore(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions internal/store/configmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import (
clientset "k8s.io/client-go/kubernetes"
"k8s.io/client-go/tools/cache"

"k8s.io/kube-state-metrics/pkg/metric"
generator "k8s.io/kube-state-metrics/pkg/metric_generator"
"k8s.io/kube-state-metrics/v2/pkg/metric"
generator "k8s.io/kube-state-metrics/v2/pkg/metric_generator"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion internal/store/configmap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

generator "k8s.io/kube-state-metrics/pkg/metric_generator"
generator "k8s.io/kube-state-metrics/v2/pkg/metric_generator"
)

func TestConfigMapStore(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions internal/store/cronjob.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ import (
clientset "k8s.io/client-go/kubernetes"
"k8s.io/client-go/tools/cache"

"k8s.io/kube-state-metrics/pkg/metric"
generator "k8s.io/kube-state-metrics/pkg/metric_generator"
"k8s.io/kube-state-metrics/v2/pkg/metric"
generator "k8s.io/kube-state-metrics/v2/pkg/metric_generator"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion internal/store/cronjob_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

generator "k8s.io/kube-state-metrics/pkg/metric_generator"
generator "k8s.io/kube-state-metrics/v2/pkg/metric_generator"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions internal/store/daemonset.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import (
clientset "k8s.io/client-go/kubernetes"
"k8s.io/client-go/tools/cache"

"k8s.io/kube-state-metrics/pkg/metric"
generator "k8s.io/kube-state-metrics/pkg/metric_generator"
"k8s.io/kube-state-metrics/v2/pkg/metric"
generator "k8s.io/kube-state-metrics/v2/pkg/metric_generator"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion internal/store/daemonset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
v1 "k8s.io/api/apps/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

generator "k8s.io/kube-state-metrics/pkg/metric_generator"
generator "k8s.io/kube-state-metrics/v2/pkg/metric_generator"
)

func TestDaemonSetStore(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions internal/store/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ package store
import (
"context"

"k8s.io/kube-state-metrics/pkg/metric"
generator "k8s.io/kube-state-metrics/pkg/metric_generator"
"k8s.io/kube-state-metrics/v2/pkg/metric"
generator "k8s.io/kube-state-metrics/v2/pkg/metric_generator"

v1 "k8s.io/api/apps/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
2 changes: 1 addition & 1 deletion internal/store/deployment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/intstr"

generator "k8s.io/kube-state-metrics/pkg/metric_generator"
generator "k8s.io/kube-state-metrics/v2/pkg/metric_generator"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions internal/store/endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import (
clientset "k8s.io/client-go/kubernetes"
"k8s.io/client-go/tools/cache"

"k8s.io/kube-state-metrics/pkg/metric"
generator "k8s.io/kube-state-metrics/pkg/metric_generator"
"k8s.io/kube-state-metrics/v2/pkg/metric"
generator "k8s.io/kube-state-metrics/v2/pkg/metric_generator"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion internal/store/endpoint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

generator "k8s.io/kube-state-metrics/pkg/metric_generator"
generator "k8s.io/kube-state-metrics/v2/pkg/metric_generator"
)

func TestEndpointStore(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions internal/store/horizontalpodautoscaler.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import (
clientset "k8s.io/client-go/kubernetes"
"k8s.io/client-go/tools/cache"

"k8s.io/kube-state-metrics/pkg/metric"
generator "k8s.io/kube-state-metrics/pkg/metric_generator"
"k8s.io/kube-state-metrics/v2/pkg/metric"
generator "k8s.io/kube-state-metrics/v2/pkg/metric_generator"
)

type metricTargetType int
Expand Down
2 changes: 1 addition & 1 deletion internal/store/horizontalpodautoscaler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

generator "k8s.io/kube-state-metrics/pkg/metric_generator"
generator "k8s.io/kube-state-metrics/v2/pkg/metric_generator"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions internal/store/ingress.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ package store
import (
"context"

"k8s.io/kube-state-metrics/pkg/metric"
generator "k8s.io/kube-state-metrics/pkg/metric_generator"
"k8s.io/kube-state-metrics/v2/pkg/metric"
generator "k8s.io/kube-state-metrics/v2/pkg/metric_generator"

"k8s.io/api/extensions/v1beta1"

Expand Down
2 changes: 1 addition & 1 deletion internal/store/ingress_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/intstr"

generator "k8s.io/kube-state-metrics/pkg/metric_generator"
generator "k8s.io/kube-state-metrics/v2/pkg/metric_generator"
)

func TestIngressStore(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions internal/store/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (
"context"
"strconv"

"k8s.io/kube-state-metrics/pkg/metric"
generator "k8s.io/kube-state-metrics/pkg/metric_generator"
"k8s.io/kube-state-metrics/v2/pkg/metric"
generator "k8s.io/kube-state-metrics/v2/pkg/metric_generator"

v1batch "k8s.io/api/batch/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
2 changes: 1 addition & 1 deletion internal/store/job_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

generator "k8s.io/kube-state-metrics/pkg/metric_generator"
generator "k8s.io/kube-state-metrics/v2/pkg/metric_generator"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions internal/store/lease.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import (
clientset "k8s.io/client-go/kubernetes"
"k8s.io/client-go/tools/cache"

"k8s.io/kube-state-metrics/pkg/metric"
generator "k8s.io/kube-state-metrics/pkg/metric_generator"
"k8s.io/kube-state-metrics/v2/pkg/metric"
generator "k8s.io/kube-state-metrics/v2/pkg/metric_generator"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion internal/store/lease_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
coordinationv1 "k8s.io/api/coordination/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

generator "k8s.io/kube-state-metrics/pkg/metric_generator"
generator "k8s.io/kube-state-metrics/v2/pkg/metric_generator"
)

func TestLeaseStore(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions internal/store/limitrange.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import (
clientset "k8s.io/client-go/kubernetes"
"k8s.io/client-go/tools/cache"

"k8s.io/kube-state-metrics/pkg/metric"
generator "k8s.io/kube-state-metrics/pkg/metric_generator"
"k8s.io/kube-state-metrics/v2/pkg/metric"
generator "k8s.io/kube-state-metrics/v2/pkg/metric_generator"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion internal/store/limitrange_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

generator "k8s.io/kube-state-metrics/pkg/metric_generator"
generator "k8s.io/kube-state-metrics/v2/pkg/metric_generator"
)

func TestLimitRangeStore(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions internal/store/mutatingwebhookconfiguration.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import (
clientset "k8s.io/client-go/kubernetes"
"k8s.io/client-go/tools/cache"

"k8s.io/kube-state-metrics/pkg/metric"
generator "k8s.io/kube-state-metrics/pkg/metric_generator"
"k8s.io/kube-state-metrics/v2/pkg/metric"
generator "k8s.io/kube-state-metrics/v2/pkg/metric_generator"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion internal/store/mutatingwebhookconfiguration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
admissionregistrationv1 "k8s.io/api/admissionregistration/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

generator "k8s.io/kube-state-metrics/pkg/metric_generator"
generator "k8s.io/kube-state-metrics/v2/pkg/metric_generator"
)

func TestMutatingWebhookConfigurationStore(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions internal/store/namespace.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ package store
import (
"context"

"k8s.io/kube-state-metrics/pkg/metric"
generator "k8s.io/kube-state-metrics/pkg/metric_generator"
"k8s.io/kube-state-metrics/v2/pkg/metric"
generator "k8s.io/kube-state-metrics/v2/pkg/metric_generator"

v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
2 changes: 1 addition & 1 deletion internal/store/namespace_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

generator "k8s.io/kube-state-metrics/pkg/metric_generator"
generator "k8s.io/kube-state-metrics/v2/pkg/metric_generator"
)

func TestNamespaceStore(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions internal/store/networkpolicy.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import (
clientset "k8s.io/client-go/kubernetes"
"k8s.io/client-go/tools/cache"

"k8s.io/kube-state-metrics/pkg/metric"
generator "k8s.io/kube-state-metrics/pkg/metric_generator"
"k8s.io/kube-state-metrics/v2/pkg/metric"
generator "k8s.io/kube-state-metrics/v2/pkg/metric_generator"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion internal/store/networkpolicy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
networkingv1 "k8s.io/api/networking/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

generator "k8s.io/kube-state-metrics/pkg/metric_generator"
generator "k8s.io/kube-state-metrics/v2/pkg/metric_generator"
)

func TestNetworkPolicyStore(t *testing.T) {
Expand Down
6 changes: 3 additions & 3 deletions internal/store/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ import (
"context"
"strings"

"k8s.io/kube-state-metrics/pkg/constant"
"k8s.io/kube-state-metrics/pkg/metric"
generator "k8s.io/kube-state-metrics/pkg/metric_generator"
"k8s.io/kube-state-metrics/v2/pkg/constant"
"k8s.io/kube-state-metrics/v2/pkg/metric"
generator "k8s.io/kube-state-metrics/v2/pkg/metric_generator"

v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
2 changes: 1 addition & 1 deletion internal/store/node_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

generator "k8s.io/kube-state-metrics/pkg/metric_generator"
generator "k8s.io/kube-state-metrics/v2/pkg/metric_generator"
)

func TestNodeStore(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions internal/store/persistentvolume.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (
"context"
"strconv"

"k8s.io/kube-state-metrics/pkg/metric"
generator "k8s.io/kube-state-metrics/pkg/metric_generator"
"k8s.io/kube-state-metrics/v2/pkg/metric"
generator "k8s.io/kube-state-metrics/v2/pkg/metric_generator"

v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
2 changes: 1 addition & 1 deletion internal/store/persistentvolume_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

generator "k8s.io/kube-state-metrics/pkg/metric_generator"
generator "k8s.io/kube-state-metrics/v2/pkg/metric_generator"
)

func TestPersistentVolumeStore(t *testing.T) {
Expand Down
Loading

0 comments on commit 392f924

Please sign in to comment.