Skip to content

Commit

Permalink
exec.Stream() -> exec.StreamWithContext()
Browse files Browse the repository at this point in the history
  • Loading branch information
mkuratczyk committed Jan 2, 2024
1 parent 697ab71 commit 8709ebe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion controllers/pod_executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package controllers
import (
"bufio"
"bytes"
"context"

corev1 "k8s.io/api/core/v1"
"k8s.io/client-go/kubernetes"
Expand Down Expand Up @@ -42,7 +43,7 @@ func (p *rabbitmqPodExecutor) Exec(clientset *kubernetes.Clientset, clusterConfi
stdOut := bytes.Buffer{}
stdErr := bytes.Buffer{}

err = exec.Stream(remotecommand.StreamOptions{
err = exec.StreamWithContext(context.TODO(), remotecommand.StreamOptions{
Stdout: bufio.NewWriter(&stdOut),
Stderr: bufio.NewWriter(&stdErr),
Stdin: nil,
Expand Down

0 comments on commit 8709ebe

Please sign in to comment.