Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use klog for logging #166

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 15 additions & 14 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ require (
github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.74.0
github.com/spf13/cobra v1.8.0
github.com/spf13/pflag v1.0.5
github.com/stolostron/kubernetes-dependency-watches v0.7.0
github.com/stolostron/kubernetes-dependency-watches v0.8.1
k8s.io/apimachinery v0.29.5
k8s.io/client-go v0.29.5
k8s.io/component-base v0.29.5
Expand All @@ -20,19 +20,13 @@ require (
sigs.k8s.io/controller-runtime v0.17.5
)

require (
github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df // indirect
github.com/felixge/fgprof v0.9.3 // indirect
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect
)

require (
github.com/BurntSushi/toml v1.4.0 // indirect
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/Masterminds/semver/v3 v3.2.1 // indirect
github.com/Masterminds/sprig/v3 v3.2.3 // indirect
github.com/NYTimes/gziphandler v1.1.1 // indirect
github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df // indirect
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
Expand All @@ -45,6 +39,7 @@ require (
github.com/evanphx/json-patch v5.9.0+incompatible // indirect
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
github.com/fatih/structs v1.1.0 // indirect
github.com/felixge/fgprof v0.9.3 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/ghodss/yaml v1.0.0 // indirect
Expand All @@ -53,20 +48,21 @@ require (
github.com/go-openapi/jsonpointer v0.21.0 // indirect
github.com/go-openapi/jsonreference v0.21.0 // indirect
github.com/go-openapi/swag v0.23.0 // indirect
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
github.com/gobwas/glob v0.2.3 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/cel-go v0.17.8 // indirect
github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/gnostic-models v0.6.9-0.20230804172637-c7be7c783f49 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/pprof v0.0.0-20240528025155-186aa0362fba // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect
github.com/huandu/xstrings v1.4.0 // indirect
github.com/imdario/mergo v1.0.0 // indirect
github.com/imdario/mergo v0.3.16 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
Expand All @@ -80,9 +76,9 @@ require (
github.com/openshift/client-go v0.0.0-20231218140158-47f6d749b9d9 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pkg/profile v1.7.0 // indirect
github.com/prometheus/client_golang v1.18.0 // indirect
github.com/prometheus/client_golang v1.19.1 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.45.0 // indirect
github.com/prometheus/common v0.53.0 // indirect
github.com/prometheus/procfs v0.15.0 // indirect
github.com/shopspring/decimal v1.4.0 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
Expand Down Expand Up @@ -129,7 +125,7 @@ require (
k8s.io/api v0.29.5 // indirect
k8s.io/apiextensions-apiserver v0.29.5 // indirect
k8s.io/apiserver v0.29.5 // indirect
k8s.io/klog v1.0.0 // indirect
k8s.io/klog v1.0.0
k8s.io/kms v0.29.5 // indirect
k8s.io/kube-aggregator v0.29.5 // indirect
k8s.io/kube-openapi v0.0.0-20240521193020-835d969ad83a // indirect
Expand All @@ -142,4 +138,9 @@ require (
sigs.k8s.io/yaml v1.4.0 // indirect
)

replace github.com/imdario/mergo => github.com/imdario/mergo v0.3.16 // Replaced so that 'go get -u' works. Remove/bump when upgrading.
replace (
// Replaced for compatibility with k8s.io/[email protected]
// Above v0.29.5, we'd need to upgrade Go to v1.22, which isn't compatible
github.com/prometheus/client_golang => github.com/prometheus/client_golang v1.18.0
github.com/prometheus/common => github.com/prometheus/common v0.47.0
)
Comment on lines +141 to +146
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trades out replace statements, but I'm assuming the kubernetes-dependency-watch version bump is desireable, so hopefully the next round we can get rid of these entirely.

16 changes: 8 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4=
github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA=
github.com/google/cel-go v0.17.8 h1:j9m730pMZt1Fc4oKhCLUHfjj6527LuhYcYw0Rl8gqto=
github.com/google/cel-go v0.17.8/go.mod h1:HXZKzB0LXqer5lHHgfWAnlYwJaQBDKMjxjulNQzhwhY=
github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I=
github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U=
github.com/google/gnostic-models v0.6.9-0.20230804172637-c7be7c783f49 h1:0VpGH+cDhbDtdcweoyCVsF3fhN8kejK6rFe/2FFX2nU=
github.com/google/gnostic-models v0.6.9-0.20230804172637-c7be7c783f49/go.mod h1:BkkQ4L1KS1xMt2aWSPStnn55ChGC0DPOn2FQYj+f25M=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
Expand All @@ -114,6 +114,7 @@ github.com/huandu/xstrings v1.3.3/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq
github.com/huandu/xstrings v1.4.0 h1:D17IlohoQq4UcpqD7fDk80P7l+lwAmlFaBHgOipl2FU=
github.com/huandu/xstrings v1.4.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE=
github.com/ianlancetaylor/demangle v0.0.0-20210905161508-09a460cdf81d/go.mod h1:aYm2/VgdVmcIU8iMfdMvDMsRAQjcfZSKFby6HOFvi/w=
github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4=
github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY=
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
Expand All @@ -132,8 +133,6 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg=
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k=
github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw=
github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw=
github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s=
Expand Down Expand Up @@ -174,8 +173,8 @@ github.com/prometheus/client_golang v1.18.0 h1:HzFfmkOzH5Q8L8G+kSJKUx5dtG87sewO+
github.com/prometheus/client_golang v1.18.0/go.mod h1:T+GXkCk5wSJyOqMIzVgvvjFDlkOQntgjkJWKrN5txjA=
github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E=
github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY=
github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM=
github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY=
github.com/prometheus/common v0.47.0 h1:p5Cz0FNHo7SnWOmWmoRozVcjEp0bIVU8cV7OShpjL1k=
github.com/prometheus/common v0.47.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc=
github.com/prometheus/procfs v0.15.0 h1:A82kmvXJq2jTu5YUhSGNlYoxh85zLnKgPz4bMZgI5Ek=
github.com/prometheus/procfs v0.15.0/go.mod h1:Y0RJ/Y5g5wJpkTisOtqwDSo4HwhGmLB4VQSw2sQJLHk=
github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8=
Expand All @@ -197,8 +196,8 @@ github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/stoewer/go-strcase v1.3.0 h1:g0eASXYtp+yvN9fK8sH94oCIk0fau9uV1/ZdJ0AVEzs=
github.com/stoewer/go-strcase v1.3.0/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo=
github.com/stolostron/kubernetes-dependency-watches v0.7.0 h1:aiJSZUusiPtWEz1CIdFperRgS9ibA0Gr8Hu3K8bpN/o=
github.com/stolostron/kubernetes-dependency-watches v0.7.0/go.mod h1:6v54aX8Bxx1m9YETZUxNGUrSHcRIArM/YnOqnUbIB/g=
github.com/stolostron/kubernetes-dependency-watches v0.8.1 h1:lm2p785iltlQe6+ImNCHR3d/Un4X42/NmRvm//9EvRc=
github.com/stolostron/kubernetes-dependency-watches v0.8.1/go.mod h1:BpDgquBjEbNM9dQYlLndGBX+FoaXDUJQ6eR3j1NA+Kk=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
Expand Down Expand Up @@ -353,6 +352,7 @@ gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkep
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
Expand Down
14 changes: 6 additions & 8 deletions pkg/addon/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,16 @@ import (
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/kubernetes/scheme"
"k8s.io/client-go/rest"
"k8s.io/klog"
"open-cluster-management.io/addon-framework/pkg/addonmanager"
"open-cluster-management.io/addon-framework/pkg/agent"
"open-cluster-management.io/addon-framework/pkg/utils"
addonapiv1alpha1 "open-cluster-management.io/api/addon/v1alpha1"
clusterv1client "open-cluster-management.io/api/client/cluster/clientset/versioned"
clusterv1informers "open-cluster-management.io/api/client/cluster/informers/externalversions"
clusterv1 "open-cluster-management.io/api/cluster/v1"
ctrl "sigs.k8s.io/controller-runtime"
)

var log = ctrl.Log.WithName("common")

const (
PolicyAddonPauseAnnotation = "policy-addon-pause"
PolicyLogLevelAnnotation = "log-level"
Expand Down Expand Up @@ -59,13 +57,13 @@ var Scheme = runtime.NewScheme()
func init() {
err := scheme.AddToScheme(Scheme)
if err != nil {
log.Error(err, "Failed to add to scheme")
klog.Error(err, "Failed to add to scheme")
os.Exit(1)
}

err = prometheusv1.AddToScheme(Scheme)
if err != nil {
log.Error(err, "Failed to add the Prometheus scheme to scheme")
klog.Error(err, "Failed to add the Prometheus scheme to scheme")
os.Exit(1)
}
}
Expand Down Expand Up @@ -197,7 +195,7 @@ func GetLogLevel(component string, level string) int8 {

logLevel, err := strconv.ParseInt(level, 10, 8)
if err != nil || logLevel < -1 {
log.Error(err, fmt.Sprintf(
klog.Error(err, fmt.Sprintf(
"Failed to verify '%s' annotation value '%s' for component %s (falling back to default value %d)",
PolicyLogLevelAnnotation, level, component, logDefault),
)
Expand Down Expand Up @@ -235,7 +233,7 @@ func CommonAgentInstallNamespaceFromDeploymentConfigFunc(
) func(*addonapiv1alpha1.ManagedClusterAddOn) (string, error) {
return func(addon *addonapiv1alpha1.ManagedClusterAddOn) (string, error) {
if addon == nil {
log.Info("failed to get addon install namespace, addon is nil")
klog.Info("failed to get addon install namespace, addon is nil")

return "", nil
}
Expand All @@ -248,7 +246,7 @@ func CommonAgentInstallNamespaceFromDeploymentConfigFunc(

config, err := utils.GetDesiredAddOnDeploymentConfig(addon, adcgetter)
if err != nil {
log.Error(err, fmt.Sprintf("failed to get deployment config for addon %s: ", addon.Name))
klog.Error(err, fmt.Sprintf("failed to get deployment config for addon %s: ", addon.Name))

return "", err
}
Expand Down
14 changes: 6 additions & 8 deletions pkg/addon/configpolicy/agent_addon.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ import (
"strconv"

"github.com/openshift/library-go/pkg/controller/controllercmd"
"k8s.io/klog"
"open-cluster-management.io/addon-framework/pkg/addonfactory"
"open-cluster-management.io/addon-framework/pkg/addonmanager"
"open-cluster-management.io/addon-framework/pkg/agent"
"open-cluster-management.io/addon-framework/pkg/utils"
addonapiv1alpha1 "open-cluster-management.io/api/addon/v1alpha1"
addonv1alpha1client "open-cluster-management.io/api/client/addon/clientset/versioned"
clusterv1 "open-cluster-management.io/api/cluster/v1"
ctrl "sigs.k8s.io/controller-runtime"

policyaddon "open-cluster-management.io/governance-policy-addon-controller/pkg/addon"
)
Expand All @@ -29,8 +29,6 @@ const (
operatorPolicyDisabledAnnotation = "operator-policy-disabled"
)

var log = ctrl.Log.WithName("configpolicy")

type UserArgs struct {
policyaddon.UserArgs
EvaluationConcurrency uint8 `json:"evaluationConcurrency,omitempty"`
Expand Down Expand Up @@ -127,7 +125,7 @@ func getValues(cluster *clusterv1.ManagedCluster,
if val, ok := annotations[evaluationConcurrencyAnnotation]; ok {
value, err := strconv.ParseUint(val, 10, 8)
if err != nil {
log.Error(err, fmt.Sprintf(
klog.Error(err, fmt.Sprintf(
"Failed to verify '%s' annotation value '%s' for component %s (falling back to default value %d)",
evaluationConcurrencyAnnotation, val, addonName, userValues.UserArgs.EvaluationConcurrency),
)
Expand All @@ -140,7 +138,7 @@ func getValues(cluster *clusterv1.ManagedCluster,
if val, ok := annotations[clientQPSAnnotation]; ok {
value, err := strconv.ParseUint(val, 10, 8)
if err != nil {
log.Error(err, fmt.Sprintf(
klog.Error(err, fmt.Sprintf(
"Failed to verify '%s' annotation value '%s' for component %s (falling back to default value %d)",
clientQPSAnnotation, val, addonName, userValues.UserArgs.ClientQPS),
)
Expand All @@ -155,7 +153,7 @@ func getValues(cluster *clusterv1.ManagedCluster,
if val, ok := annotations[clientBurstAnnotation]; ok {
value, err := strconv.ParseUint(val, 10, 8)
if err != nil {
log.Error(err, fmt.Sprintf(
klog.Error(err, fmt.Sprintf(
"Failed to verify '%s' annotation value '%s' for component %s (falling back to default value %d)",
clientBurstAnnotation, val, addonName, userValues.UserArgs.ClientBurst),
)
Expand All @@ -171,7 +169,7 @@ func getValues(cluster *clusterv1.ManagedCluster,
if val, ok := annotations[prometheusEnabledAnnotation]; ok {
valBool, err := strconv.ParseBool(val)
if err != nil {
log.Error(err, fmt.Sprintf(
klog.Error(err, fmt.Sprintf(
"Failed to verify '%s' annotation value '%s' for component %s (falling back to default value %v)",
prometheusEnabledAnnotation, val, addonName, userValues.Prometheus["enabled"]),
)
Expand All @@ -183,7 +181,7 @@ func getValues(cluster *clusterv1.ManagedCluster,
if val, ok := annotations[operatorPolicyDisabledAnnotation]; ok {
valBool, err := strconv.ParseBool(val)
if err != nil {
log.Error(err, fmt.Sprintf(
klog.Error(err, fmt.Sprintf(
"Failed to verify '%s' annotation value '%s' for component %s (falling back to default value %v)",
operatorPolicyDisabledAnnotation, val, addonName, userValues.OperatorPolicy["disabled"]),
)
Expand Down
12 changes: 5 additions & 7 deletions pkg/addon/policyframework/agent_addon.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ import (
"strings"

"github.com/openshift/library-go/pkg/controller/controllercmd"
"k8s.io/klog"
"open-cluster-management.io/addon-framework/pkg/addonfactory"
"open-cluster-management.io/addon-framework/pkg/addonmanager"
"open-cluster-management.io/addon-framework/pkg/agent"
"open-cluster-management.io/addon-framework/pkg/utils"
addonapiv1alpha1 "open-cluster-management.io/api/addon/v1alpha1"
addonv1alpha1client "open-cluster-management.io/api/client/addon/clientset/versioned"
clusterv1 "open-cluster-management.io/api/cluster/v1"
ctrl "sigs.k8s.io/controller-runtime"

policyaddon "open-cluster-management.io/governance-policy-addon-controller/pkg/addon"
)
Expand All @@ -32,8 +32,6 @@ const (
syncPoliciesOnMulticlusterHubAnnotation = "policy.open-cluster-management.io/sync-policies-on-multicluster-hub"
)

var log = ctrl.Log.WithName("policyframework")

// FS go:embed
//
//go:embed manifests
Expand Down Expand Up @@ -150,7 +148,7 @@ func getValues(cluster *clusterv1.ManagedCluster,
if val, ok := annotations[evaluationConcurrencyAnnotation]; ok {
value, err := strconv.ParseUint(val, 10, 8)
if err != nil {
log.Error(err, fmt.Sprintf(
klog.Error(err, fmt.Sprintf(
"Failed to verify '%s' annotation value '%s' for component %s (falling back to default value %d)",
evaluationConcurrencyAnnotation, val, addonName, userValues.UserArgs.EvaluationConcurrency),
)
Expand All @@ -163,7 +161,7 @@ func getValues(cluster *clusterv1.ManagedCluster,
if val, ok := annotations[clientQPSAnnotation]; ok {
value, err := strconv.ParseUint(val, 10, 8)
if err != nil {
log.Error(err, fmt.Sprintf(
klog.Error(err, fmt.Sprintf(
"Failed to verify '%s' annotation value '%s' for component %s (falling back to default value %d)",
clientQPSAnnotation, val, addonName, userValues.UserArgs.ClientQPS),
)
Expand All @@ -178,7 +176,7 @@ func getValues(cluster *clusterv1.ManagedCluster,
if val, ok := annotations[clientBurstAnnotation]; ok {
value, err := strconv.ParseUint(val, 10, 8)
if err != nil {
log.Error(err, fmt.Sprintf(
klog.Error(err, fmt.Sprintf(
"Failed to verify '%s' annotation value '%s' for component %s (falling back to default value %d)",
clientBurstAnnotation, val, addonName, userValues.UserArgs.ClientBurst),
)
Expand All @@ -197,7 +195,7 @@ func getValues(cluster *clusterv1.ManagedCluster,
if val, ok := annotations[prometheusEnabledAnnotation]; ok {
valBool, err := strconv.ParseBool(val)
if err != nil {
log.Error(err, fmt.Sprintf(
klog.Error(err, fmt.Sprintf(
"Failed to verify '%s' annotation value '%s' for component %s (falling back to default value %v)",
prometheusEnabledAnnotation, val, addonName, userValues.Prometheus["enabled"]),
)
Expand Down