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 all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/internal/packager/images/push.go
Original file line number Diff line number Diff line change
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,8 @@ func (i *ImageConfig) PushToZarfRegistry() error {

httpTransport := http.DefaultTransport.(*http.Transport).Clone()
httpTransport.TLSClientConfig.InsecureSkipVerify = i.Insecure
// TODO (@WSTARR) This is set to match the TLSHandshakeTimeout to potentially mitigate effects of https://github.com/defenseunicorns/zarf/issues/1444
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
Loading