mirror of
https://github.com/kubernetes/client-go.git
synced 2025-06-27 15:39:39 +00:00
Adds logging during remote command executor fallback
Kubernetes-commit: d8269e5a394dfa0116e8baeb7aac0a82eb430e5e
This commit is contained in:
parent
6090471cca
commit
0b664571bb
@ -18,6 +18,8 @@ package remotecommand
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
|
"k8s.io/klog/v2"
|
||||||
)
|
)
|
||||||
|
|
||||||
var _ Executor = &FallbackExecutor{}
|
var _ Executor = &FallbackExecutor{}
|
||||||
@ -51,6 +53,7 @@ func (f *FallbackExecutor) Stream(options StreamOptions) error {
|
|||||||
func (f *FallbackExecutor) StreamWithContext(ctx context.Context, options StreamOptions) error {
|
func (f *FallbackExecutor) StreamWithContext(ctx context.Context, options StreamOptions) error {
|
||||||
err := f.primary.StreamWithContext(ctx, options)
|
err := f.primary.StreamWithContext(ctx, options)
|
||||||
if f.shouldFallback(err) {
|
if f.shouldFallback(err) {
|
||||||
|
klog.V(4).Infof("RemoteCommand fallback: %v", err)
|
||||||
return f.secondary.StreamWithContext(ctx, options)
|
return f.secondary.StreamWithContext(ctx, options)
|
||||||
}
|
}
|
||||||
return err
|
return err
|
||||||
|
Loading…
Reference in New Issue
Block a user