switch over k/k to use klog v2

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
This commit is contained in:
Davanum Srinivas
2020-04-17 15:25:06 -04:00
parent 9006b2db69
commit 442a69c3bd
957 changed files with 998 additions and 1326 deletions

View File

@@ -17,7 +17,7 @@ limitations under the License.
package replicaset
import (
"k8s.io/klog"
"k8s.io/klog/v2"
)
func init() {

View File

@@ -56,7 +56,7 @@ import (
"k8s.io/client-go/tools/record"
"k8s.io/client-go/util/workqueue"
"k8s.io/component-base/metrics/prometheus/ratelimiter"
"k8s.io/klog"
"k8s.io/klog/v2"
podutil "k8s.io/kubernetes/pkg/api/v1/pod"
"k8s.io/kubernetes/pkg/controller"
"k8s.io/utils/integer"
@@ -214,7 +214,7 @@ func (rsc *ReplicaSetController) getReplicaSetsWithSameController(rs *apps.Repli
}
}
if klog.V(2) {
if klog.V(2).Enabled() {
var related string
if len(relatedRSs) > 0 {
var relatedNames []string
@@ -788,7 +788,7 @@ func (rsc *ReplicaSetController) getIndirectlyRelatedPods(rs *apps.ReplicaSet) (
relatedPods = append(relatedPods, pod)
}
}
if klog.V(4) {
if klog.V(4).Enabled() {
var relatedNames []string
for _, related := range relatedPods {
relatedNames = append(relatedNames, related.Name)

View File

@@ -48,7 +48,7 @@ import (
"k8s.io/client-go/tools/cache"
utiltesting "k8s.io/client-go/util/testing"
"k8s.io/client-go/util/workqueue"
"k8s.io/klog"
"k8s.io/klog/v2"
"k8s.io/kubernetes/pkg/controller"
. "k8s.io/kubernetes/pkg/controller/testutil"
"k8s.io/kubernetes/pkg/securitycontext"

View File

@@ -23,7 +23,7 @@ import (
"fmt"
"reflect"
"k8s.io/klog"
"k8s.io/klog/v2"
apps "k8s.io/api/apps/v1"
"k8s.io/api/core/v1"