refactor: refactor ssh structure (#311)

This commit is contained in:
naison
2024-07-27 10:37:48 +08:00
committed by GitHub
parent 675ce2a52f
commit a3b8c1586d
38 changed files with 752 additions and 736 deletions

View File

@@ -35,7 +35,7 @@ import (
"k8s.io/apimachinery/pkg/util/wait"
"github.com/wencaiwulue/kubevpn/v2/pkg/config"
"github.com/wencaiwulue/kubevpn/v2/pkg/util"
pkgssh "github.com/wencaiwulue/kubevpn/v2/pkg/ssh"
)
func waitExitOrRemoved(ctx context.Context, apiClient client.APIClient, containerID string, waitRemove bool) <-chan int {
@@ -576,7 +576,7 @@ func run(ctx context.Context, cli *client.Client, dockerCli *command.DockerCli,
}
}
if needPull {
err = util.PullImage(ctx, runConfig.platform, cli, dockerCli, config.Image, nil)
err = pkgssh.PullImage(ctx, runConfig.platform, cli, dockerCli, config.Image, nil)
if err != nil {
logrus.Errorf("Failed to pull image: %s, err: %s", config.Image, err)
return