Closed very-doge-wow closed 6 months ago
Seems to be because we use v0.29.0 of client-go and kubedog uses v0.26.2, so the signature of the function has changed. How often do you integrate updates of dependencies here?
Hi, thanks for the report!
I think we can arrange client-go upgrade asap during this week.
@very-doge-wow Hi!
Just updated client-go to 1.29 https://github.com/werf/kubedog/pull/320, check it out!
Thanks, will try it after the holidays.
Have tested and it works now, thanks. Still the question, how often do you integrate updates?
I am also receiving the following warning, not sure how to fix this:
W0102 12:29:23.926279 59 reflector.go:462] pkg/mod/k8s.io/client-go@v0.29.0/tools/cache/reflector.go:229: watch of *v1.Event ended with: an error on the server ("unable to decode an event from the watch stream: context canceled") has prevented the request from succeeding
Any advice? 🤔
how often do you integrate updates
@very-doge-wow Hi! As for your question: we are about to setup our periodical routine to update dependencies once in 3 or 4 weeks (security updates should be merged asap of course).
It is important to know that kubedog project being used by such projects as: werf/werf and werf/nelm, and sometimes some dependencies updates may be blocked by these projects, but we are currently on a way to cleanup some old stuff from werf and keep dependencies as fresh as possible.
W0102 12:29:23.926279 59 reflector.go:462] pkg/mod/k8s.io/client-go@v0.29.0/tools/cache/reflector.go:229: watch of *v1.Event ended with: an error on the server ("unable to decode an event from the watch stream: context canceled") has prevented the request from succeeding
This is just harmless warning from inside client-go internals, which is part of it normal operation. However if you want to suppress these messages see this logger initialization snippet:
func SilenceKlogV2(ctx context.Context) error {
fs := flag.NewFlagSet("klog", flag.PanicOnError)
klog_v2.InitFlags(fs)
if err := fs.Set("logtostderr", "false"); err != nil {
return err
}
if err := fs.Set("alsologtostderr", "false"); err != nil {
return err
}
if err := fs.Set("stderrthreshold", "5"); err != nil {
return err
}
// Suppress info and warnings from client-go reflector
klog_v2.SetOutputBySeverity("INFO", ioutil.Discard)
klog_v2.SetOutputBySeverity("WARNING", ioutil.Discard)
klog_v2.SetOutputBySeverity("ERROR", ioutil.Discard)
klog_v2.SetOutputBySeverity("FATAL", logboek.Context(ctx).ErrStream())
return nil
}
func SilenceKlog(ctx context.Context) error {
fs := flag.NewFlagSet("klog", flag.PanicOnError)
klog.InitFlags(fs)
if err := fs.Set("logtostderr", "false"); err != nil {
return err
}
if err := fs.Set("alsologtostderr", "false"); err != nil {
return err
}
if err := fs.Set("stderrthreshold", "5"); err != nil {
return err
}
// Suppress info and warnings from client-go reflector
klog.SetOutputBySeverity("INFO", ioutil.Discard)
klog.SetOutputBySeverity("WARNING", ioutil.Discard)
klog.SetOutputBySeverity("ERROR", ioutil.Discard)
klog.SetOutputBySeverity("FATAL", logboek.Context(ctx).ErrStream())
return nil
}
https://github.com/werf/kubedog/blob/main/cmd/kubedog/main.go#L72C13-L72C24
I'm trying to use the library as specified in: https://github.com/werf/kubedog/blob/main/doc/usage.md#examples-of-using-trackers
However I always receive this error:
This is my code:
I am using the most current version v0.11.0. Any help would be appreciated.