Skip to content

Commit

Permalink
chore(kubernetes): Handle spdy.NewRoundTripperWithConfig error
Browse files Browse the repository at this point in the history
  • Loading branch information
gabe565 committed Jan 12, 2024
1 parent 4e32b08 commit 73224cf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion internal/kubernetes/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,16 @@ func (client KubeClient) Exec(ctx context.Context, opt ExecOptions) error {
if opt.DisablePing {
pingPeriod = 0
}
upgradeRoundTripper := spdy.NewRoundTripperWithConfig(spdy.RoundTripperConfig{
upgradeRoundTripper, err := spdy.NewRoundTripperWithConfig(spdy.RoundTripperConfig{
TLS: tlsConfig,
Proxier: proxy,
// Needs to be 0 for dump/restore to prevent unexpected EOF.
// See https://github.com/kubernetes/kubernetes/issues/60140#issuecomment-1411477275
PingPeriod: pingPeriod,
})
if err != nil {
return err
}
wrapper, err := rest.HTTPWrappersForConfig(client.ClientConfig, upgradeRoundTripper)
if err != nil {
return err
Expand Down

0 comments on commit 73224cf

Please sign in to comment.