mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 14:07:14 +00:00
Merge pull request #56150 from php-coder/fix_format_string
Automatic merge from submit-queue (batch tested with PRs 57211, 56150, 56368, 56271, 55957). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. pkg/controller/garbagecollector/garbagecollector.go: fix string format **What this PR does / why we need it**: This PR fixes broken formatting in the warning message by using appropriate function: > W1121 13:13:39.359283 19160 garbagecollector.go:601] failed to discover preferred resources: %vGet https://127.0.0.1:37983/api: dial tcp 127.0.0.1:37983: getsockopt: connection refused **Special notes for your reviewer**: This change was introduced in #55259 **Release note**: ```release-note NONE ``` PTAL @ironcladlou CC @simo5
This commit is contained in:
commit
f588bb02f3
@ -599,9 +599,9 @@ func GetDeletableResources(discoveryClient discovery.ServerResourcesInterface) m
|
||||
preferredResources, err := discoveryClient.ServerPreferredResources()
|
||||
if err != nil {
|
||||
if discovery.IsGroupDiscoveryFailedError(err) {
|
||||
glog.Warning("failed to discover some groups: %v", err.(*discovery.ErrGroupDiscoveryFailed).Groups)
|
||||
glog.Warningf("failed to discover some groups: %v", err.(*discovery.ErrGroupDiscoveryFailed).Groups)
|
||||
} else {
|
||||
glog.Warning("failed to discover preferred resources: %v", err)
|
||||
glog.Warningf("failed to discover preferred resources: %v", err)
|
||||
}
|
||||
}
|
||||
if preferredResources == nil {
|
||||
@ -615,7 +615,7 @@ func GetDeletableResources(discoveryClient discovery.ServerResourcesInterface) m
|
||||
for _, rl := range deletableResources {
|
||||
gv, err := schema.ParseGroupVersion(rl.GroupVersion)
|
||||
if err != nil {
|
||||
glog.Warning("ignoring invalid discovered resource %q: %v", rl.GroupVersion, err)
|
||||
glog.Warningf("ignoring invalid discovered resource %q: %v", rl.GroupVersion, err)
|
||||
continue
|
||||
}
|
||||
for i := range rl.APIResources {
|
||||
|
Loading…
Reference in New Issue
Block a user