Skip to content

Commit

Permalink
Merge pull request #328 from s-urbaniak/bump-klog
Browse files Browse the repository at this point in the history
bump to klog/v2
  • Loading branch information
s-urbaniak authored Oct 28, 2020
2 parents b9e5a71 + 69569bf commit 82450eb
Show file tree
Hide file tree
Showing 1,031 changed files with 93,332 additions and 28,327 deletions.
6 changes: 3 additions & 3 deletions cmd/adapter/adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ import (
"k8s.io/client-go/tools/clientcmd"
"k8s.io/client-go/transport"
"k8s.io/component-base/logs"
"k8s.io/klog"
"k8s.io/klog/v2"
"k8s.io/sample-apiserver/pkg/apiserver"

basecmd "github.com/kubernetes-incubator/custom-metrics-apiserver/pkg/cmd"
"github.com/kubernetes-incubator/custom-metrics-apiserver/pkg/provider"
basecmd "github.com/kubernetes-sigs/custom-metrics-apiserver/pkg/cmd"
"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"
Expand Down
2 changes: 1 addition & 1 deletion docs/config-walkthrough.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ all resources currently available in your cluster, you can use the
`kubectl api-resources` command (but the list of available resources can
change as you add or remove CRDs or aggregated API servers). For more
information on resources, see [Kinds, Resources, and
Scopes](https://github.com/kubernetes-incubator/custom-metrics-apiserver/blob/master/docs/getting-started.md#kinds-resources-and-scopes)
Scopes](https://github.com/kubernetes-sigs/custom-metrics-apiserver/blob/master/docs/getting-started.md#kinds-resources-and-scopes)
in the custom-metrics-apiserver boilerplate guide.

Now, cumulative metrics (like those that end in `_total`) aren't
Expand Down
24 changes: 12 additions & 12 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,24 @@ require (
github.com/NYTimes/gziphandler v1.0.1 // indirect
github.com/go-openapi/spec v0.19.8
github.com/imdario/mergo v0.3.8 // indirect
github.com/kubernetes-incubator/custom-metrics-apiserver v0.0.0-20201023074945-51cc7b53320e
github.com/kubernetes-sigs/custom-metrics-apiserver v0.0.0-20201027110359-fbe475e9e9e8
github.com/onsi/ginkgo v1.11.0
github.com/onsi/gomega v1.7.0
github.com/prometheus/client_golang v1.0.0
github.com/prometheus/client_golang v1.7.1
github.com/prometheus/common v0.10.0
github.com/spf13/cobra v1.0.0
github.com/stretchr/testify v1.4.0
github.com/stretchr/testify v1.6.1
gopkg.in/yaml.v2 v2.2.8
k8s.io/api v0.18.5
k8s.io/apimachinery v0.18.5
k8s.io/apiserver v0.18.5
k8s.io/client-go v0.18.5
k8s.io/component-base v0.18.5
k8s.io/klog v1.0.0
k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6
k8s.io/metrics v0.18.5
k8s.io/api v0.19.3
k8s.io/apimachinery v0.19.3
k8s.io/apiserver v0.19.3
k8s.io/client-go v0.19.3
k8s.io/component-base v0.19.3
k8s.io/klog/v2 v2.3.0
k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6
k8s.io/metrics v0.19.3
k8s.io/sample-apiserver v0.18.5
sigs.k8s.io/metrics-server v0.3.7-0.20200925134111-c39853110962
sigs.k8s.io/metrics-server v0.3.7-0.20201028092756-2a1d1385123b
)

// forced by the inclusion of sigs.k8s.io/metrics-server's use of this in their go.mod
Expand Down
263 changes: 240 additions & 23 deletions go.sum

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions pkg/client/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
"time"

"github.com/prometheus/common/model"
"k8s.io/klog"
"k8s.io/klog/v2"
)

// APIClient is a raw client to the Prometheus Query API.
Expand Down Expand Up @@ -70,7 +70,7 @@ func (c *httpAPIClient) Do(ctx context.Context, verb, endpoint string, query url
return APIResponse{}, err
}

if klog.V(6) {
if klog.V(6).Enabled() {
klog.Infof("%s %s %s", verb, u.String(), resp.Status)
}

Expand All @@ -85,7 +85,7 @@ func (c *httpAPIClient) Do(ctx context.Context, verb, endpoint string, query url
}

var body io.Reader = resp.Body
if klog.V(8) {
if klog.V(8).Enabled() {
data, err := ioutil.ReadAll(body)
if err != nil {
return APIResponse{}, fmt.Errorf("unable to log response body: %v", err)
Expand Down
6 changes: 3 additions & 3 deletions pkg/custom-provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import (
"math"
"time"

"github.com/kubernetes-incubator/custom-metrics-apiserver/pkg/provider"
"github.com/kubernetes-incubator/custom-metrics-apiserver/pkg/provider/helpers"
"github.com/kubernetes-sigs/custom-metrics-apiserver/pkg/provider"
"github.com/kubernetes-sigs/custom-metrics-apiserver/pkg/provider/helpers"
pmodel "github.com/prometheus/common/model"
apierr "k8s.io/apimachinery/pkg/api/errors"
apimeta "k8s.io/apimachinery/pkg/api/meta"
Expand All @@ -34,7 +34,7 @@ import (
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
"k8s.io/apimachinery/pkg/util/wait"
"k8s.io/client-go/dynamic"
"k8s.io/klog"
"k8s.io/klog/v2"
"k8s.io/metrics/pkg/apis/custom_metrics"

prom "github.com/directxman12/k8s-prometheus-adapter/pkg/client"
Expand Down
2 changes: 1 addition & 1 deletion pkg/custom-provider/provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package provider
import (
"time"

"github.com/kubernetes-incubator/custom-metrics-apiserver/pkg/provider"
"github.com/kubernetes-sigs/custom-metrics-apiserver/pkg/provider"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"k8s.io/apimachinery/pkg/runtime/schema"
Expand Down
4 changes: 2 additions & 2 deletions pkg/custom-provider/series_registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ import (
"fmt"
"sync"

"github.com/kubernetes-incubator/custom-metrics-apiserver/pkg/provider"
"github.com/kubernetes-sigs/custom-metrics-apiserver/pkg/provider"
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"
pmodel "github.com/prometheus/common/model"
"k8s.io/klog"
"k8s.io/klog/v2"
)

// NB: container metrics sourced from cAdvisor don't consistently follow naming conventions,
Expand Down
2 changes: 1 addition & 1 deletion pkg/custom-provider/series_registry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"fmt"
"time"

"github.com/kubernetes-incubator/custom-metrics-apiserver/pkg/provider"
"github.com/kubernetes-sigs/custom-metrics-apiserver/pkg/provider"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
pmodel "github.com/prometheus/common/model"
Expand Down
2 changes: 1 addition & 1 deletion pkg/external-provider/basic_metric_lister.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"time"

pmodel "github.com/prometheus/common/model"
"k8s.io/klog"
"k8s.io/klog/v2"

prom "github.com/directxman12/k8s-prometheus-adapter/pkg/client"
"github.com/directxman12/k8s-prometheus-adapter/pkg/naming"
Expand Down
4 changes: 2 additions & 2 deletions pkg/external-provider/external_series_registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ package provider
import (
"sync"

"github.com/kubernetes-incubator/custom-metrics-apiserver/pkg/provider"
"github.com/kubernetes-sigs/custom-metrics-apiserver/pkg/provider"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/klog"
"k8s.io/klog/v2"

prom "github.com/directxman12/k8s-prometheus-adapter/pkg/client"
"github.com/directxman12/k8s-prometheus-adapter/pkg/naming"
Expand Down
2 changes: 1 addition & 1 deletion pkg/external-provider/metric_converter.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"fmt"

prom "github.com/directxman12/k8s-prometheus-adapter/pkg/client"
"github.com/kubernetes-incubator/custom-metrics-apiserver/pkg/provider"
"github.com/kubernetes-sigs/custom-metrics-apiserver/pkg/provider"
"github.com/prometheus/common/model"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
4 changes: 2 additions & 2 deletions pkg/external-provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ import (
"k8s.io/apimachinery/pkg/runtime/schema"

pmodel "github.com/prometheus/common/model"
"k8s.io/klog"
"k8s.io/klog/v2"

"github.com/kubernetes-incubator/custom-metrics-apiserver/pkg/provider"
"github.com/kubernetes-sigs/custom-metrics-apiserver/pkg/provider"

apierr "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
Expand Down
4 changes: 2 additions & 2 deletions pkg/naming/resource_converter.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ import (

prom "github.com/directxman12/k8s-prometheus-adapter/pkg/client"
"github.com/directxman12/k8s-prometheus-adapter/pkg/config"
"github.com/kubernetes-incubator/custom-metrics-apiserver/pkg/provider"
"github.com/kubernetes-sigs/custom-metrics-apiserver/pkg/provider"
pmodel "github.com/prometheus/common/model"
"k8s.io/klog"
"k8s.io/klog/v2"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion pkg/resourceprovider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
"k8s.io/apimachinery/pkg/labels"
"k8s.io/apimachinery/pkg/runtime/schema"
apitypes "k8s.io/apimachinery/pkg/types"
"k8s.io/klog"
"k8s.io/klog/v2"
metrics "k8s.io/metrics/pkg/apis/metrics"
"sigs.k8s.io/metrics-server/pkg/api"

Expand Down
8 changes: 8 additions & 0 deletions vendor/github.com/cespare/xxhash/v2/.travis.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions vendor/github.com/cespare/xxhash/v2/LICENSE.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

67 changes: 67 additions & 0 deletions vendor/github.com/cespare/xxhash/v2/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions vendor/github.com/cespare/xxhash/v2/go.mod

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Empty file.
Loading

0 comments on commit 82450eb

Please sign in to comment.