Skip to content

Commit 24a0f5b

Browse files
committed
*: Move to klog v2
When we moved to 0.19 Kube tooling in ef236c3 (vendor: Bump client-go and library-go to current 4.6 tips 2020-07-24, #420), the tooling moved to klog v2. Port our local klog consumers so we don't have to worry about configuring multiple klogs [1]. Generated with: $ sed -i 's|^go 1.13|go 1.15|' go.mod $ sed -i 's|k8s.io/klog v1.0.0|k8s.io/klog/v2 v2.3.0|' go.mod $ sed -i 's|"k8s.io/klog"|"k8s.io/klog/v2"|' $(git grep -l k8s.io/klog cmd lib pkg) $ sed -i 's|klog.V(\([0-9]\)) |klog.V(\1).Enabled() |' $(git grep -l klog.V cmd lib pkg) $ go mod tidy $ go mod vendor $ git add -A go.* vendor using: $ go version go version go1.15.2 linux/amd64 The change to Go 1.15 catches us up with 1d9a319 (Dockerfile.rhel: Bump to Go 1.15, 2020-09-16, #457). [1]: https://bugzilla.redhat.com/show_bug.cgi?id=1883705
1 parent 2269661 commit 24a0f5b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+61
-1870
lines changed

cmd/image.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"fmt"
55

66
"github.com/spf13/cobra"
7-
"k8s.io/klog"
7+
"k8s.io/klog/v2"
88

99
"github.com/openshift/cluster-version-operator/pkg/payload"
1010
)

cmd/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"flag"
55

66
"github.com/spf13/cobra"
7-
"k8s.io/klog"
7+
"k8s.io/klog/v2"
88
)
99

1010
var (

cmd/render.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"flag"
55

66
"github.com/spf13/cobra"
7-
"k8s.io/klog"
7+
"k8s.io/klog/v2"
88

99
"github.com/openshift/cluster-version-operator/pkg/payload"
1010
)

cmd/start.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"context"
55

66
"github.com/spf13/cobra"
7-
"k8s.io/klog"
7+
"k8s.io/klog/v2"
88

99
"github.com/openshift/cluster-version-operator/pkg/start"
1010
"github.com/openshift/cluster-version-operator/pkg/version"

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/openshift/cluster-version-operator
22

3-
go 1.13
3+
go 1.15
44

55
require (
66
github.com/blang/semver/v4 v4.0.0
@@ -24,7 +24,7 @@ require (
2424
k8s.io/apiextensions-apiserver v0.19.0-rc.2
2525
k8s.io/apimachinery v0.19.0-rc.2
2626
k8s.io/client-go v0.19.0-rc.2
27-
k8s.io/klog v1.0.0
27+
k8s.io/klog/v2 v2.3.0
2828
k8s.io/kube-aggregator v0.19.0-rc.2
2929
k8s.io/utils v0.0.0-20200720150651-0bdb4ca86cbc
3030
)

lib/manifest_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111

1212
"github.com/davecgh/go-spew/spew"
1313
"k8s.io/apimachinery/pkg/runtime/schema"
14-
"k8s.io/klog"
14+
"k8s.io/klog/v2"
1515
)
1616

1717
func init() {

lib/resourceapply/apiext.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
apiextclientv1beta1 "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1"
1111
apierrors "k8s.io/apimachinery/pkg/api/errors"
1212
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
13-
"k8s.io/klog"
13+
"k8s.io/klog/v2"
1414
"k8s.io/utils/pointer"
1515
)
1616

lib/resourcebuilder/apps.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
corev1 "k8s.io/api/core/v1"
1212
"k8s.io/apimachinery/pkg/api/errors"
1313
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
14-
"k8s.io/klog"
14+
"k8s.io/klog/v2"
1515

1616
"github.com/openshift/cluster-version-operator/pkg/payload"
1717
)

lib/resourcebuilder/batch.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
99
"k8s.io/apimachinery/pkg/util/wait"
1010
batchclientv1 "k8s.io/client-go/kubernetes/typed/batch/v1"
11-
"k8s.io/klog"
11+
"k8s.io/klog/v2"
1212
)
1313

1414
// WaitForJobCompletion waits for job to complete.

lib/resourcemerge/meta_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"k8s.io/apimachinery/pkg/api/equality"
99
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1010
"k8s.io/apimachinery/pkg/types"
11-
"k8s.io/klog"
11+
"k8s.io/klog/v2"
1212
"k8s.io/utils/pointer"
1313
)
1414

0 commit comments

Comments
 (0)