Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Barbato <alex.j.barbato@gmail.com>
  • Loading branch information
alexbarbato committed Jan 6, 2024
1 parent 0b54783 commit 59af189
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions pkg/vendir/config/directory.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ type DirectoryContentsImage struct {
// +optional
SecretRef *DirectoryContentsLocalRef `json:"secretRef,omitempty"`

ResponseHeaderTimeout int `json:"responseHeaderTimeout,omitempty"`
DangerousSkipTLSVerify bool `json:"dangerousSkipTLSVerify,omitempty"`
}

Expand All @@ -134,6 +135,7 @@ type DirectoryContentsImgpkgBundle struct {
// +optional
SecretRef *DirectoryContentsLocalRef `json:"secretRef,omitempty"`

ResponseHeaderTimeout int `json:"responseHeaderTimeout,omitempty"`
DangerousSkipTLSVerify bool `json:"dangerousSkipTLSVerify,omitempty"`
Recursive bool `json:"recursive,omitempty"`
}
Expand Down
3 changes: 2 additions & 1 deletion pkg/vendir/fetch/image/imgpkg.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const (
type ImgpkgOpts struct {
SecretRef *ctlconf.DirectoryContentsLocalRef
DangerousSkipTLSVerify bool
ResponseHeaderTimeout int

EnvironFunc func() []string
}
Expand Down Expand Up @@ -158,7 +159,7 @@ func (t *Imgpkg) RegistryOpts() (registry.Opts, error) {
opts := registry.Opts{
VerifyCerts: !t.opts.DangerousSkipTLSVerify,
Insecure: false,
ResponseHeaderTimeout: 30 * time.Second,
ResponseHeaderTimeout: time.Duration(t.opts.ResponseHeaderTimeout|30) * time.Second,
RetryCount: 5,
EnvironFunc: func() []string {
return append(envVariables, t.opts.EnvironFunc()...)
Expand Down
1 change: 1 addition & 0 deletions pkg/vendir/fetch/image/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ func NewSync(opts ctlconf.DirectoryContentsImage, refFetcher ctlfetch.RefFetcher
imgpkgOpts := ImgpkgOpts{
SecretRef: opts.SecretRef,
DangerousSkipTLSVerify: opts.DangerousSkipTLSVerify,
ResponseHeaderTimeout: opts.ResponseHeaderTimeout,
}
return &Sync{opts, NewImgpkg(imgpkgOpts, refFetcher, c)}
}
Expand Down
1 change: 1 addition & 0 deletions pkg/vendir/fetch/imgpkgbundle/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ func NewSync(opts ctlconf.DirectoryContentsImgpkgBundle, refFetcher ctlfetch.Ref
imgpkgOpts := ctlimg.ImgpkgOpts{
SecretRef: opts.SecretRef,
DangerousSkipTLSVerify: opts.DangerousSkipTLSVerify,
ResponseHeaderTimeout: opts.ResponseHeaderTimeout,
}
return &Sync{opts, ctlimg.NewImgpkg(imgpkgOpts, refFetcher, c)}
}
Expand Down

0 comments on commit 59af189

Please sign in to comment.