Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add http request header timeout to help stalling image push #2319

Merged
merged 15 commits into from
Feb 23, 2024
Merged
Changes from 12 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/internal/packager/images/push.go
Expand Up @@ -7,6 +7,7 @@ package images
import (
"fmt"
"net/http"
"time"

"github.com/defenseunicorns/zarf/src/config"
"github.com/defenseunicorns/zarf/src/pkg/cluster"
Expand Down Expand Up @@ -50,6 +51,7 @@ func (i *ImageConfig) PushToZarfRegistry() error {

httpTransport := http.DefaultTransport.(*http.Transport).Clone()
httpTransport.TLSClientConfig.InsecureSkipVerify = i.Insecure
httpTransport.ResponseHeaderTimeout = 10 * time.Second
Noxsios marked this conversation as resolved.
Show resolved Hide resolved
progressBar := message.NewProgressBar(totalSize, fmt.Sprintf("Pushing %d images to the zarf registry", len(i.ImageList)))
defer progressBar.Stop()
craneTransport := utils.NewTransport(httpTransport, progressBar)
Expand Down