feat: kubesphere 4.0 (#6115)
* feat: kubesphere 4.0 Signed-off-by: ci-bot <ci-bot@kubesphere.io> * feat: kubesphere 4.0 Signed-off-by: ci-bot <ci-bot@kubesphere.io> --------- Signed-off-by: ci-bot <ci-bot@kubesphere.io> Co-authored-by: ks-ci-bot <ks-ci-bot@example.com> Co-authored-by: joyceliu <joyceliu@yunify.com>
This commit is contained in:
committed by
GitHub
parent
b5015ec7b9
commit
447a51f08b
21
vendor/helm.sh/helm/v3/pkg/getter/getter.go
vendored
21
vendor/helm.sh/helm/v3/pkg/getter/getter.go
vendored
@@ -37,6 +37,7 @@ type options struct {
|
||||
caFile string
|
||||
unTar bool
|
||||
insecureSkipVerifyTLS bool
|
||||
plainHTTP bool
|
||||
username string
|
||||
password string
|
||||
passCredentialsAll bool
|
||||
@@ -96,6 +97,12 @@ func WithTLSClientConfig(certFile, keyFile, caFile string) Option {
|
||||
}
|
||||
}
|
||||
|
||||
func WithPlainHTTP(plainHTTP bool) Option {
|
||||
return func(opts *options) {
|
||||
opts.plainHTTP = plainHTTP
|
||||
}
|
||||
}
|
||||
|
||||
// WithTimeout sets the timeout for requests
|
||||
func WithTimeout(timeout time.Duration) Option {
|
||||
return func(opts *options) {
|
||||
@@ -172,9 +179,21 @@ func (p Providers) ByScheme(scheme string) (Getter, error) {
|
||||
return nil, errors.Errorf("scheme %q not supported", scheme)
|
||||
}
|
||||
|
||||
const (
|
||||
// The cost timeout references curl's default connection timeout.
|
||||
// https://github.com/curl/curl/blob/master/lib/connect.h#L40C21-L40C21
|
||||
// The helm commands are usually executed manually. Considering the acceptable waiting time, we reduced the entire request time to 120s.
|
||||
DefaultHTTPTimeout = 120
|
||||
)
|
||||
|
||||
var defaultOptions = []Option{WithTimeout(time.Second * DefaultHTTPTimeout)}
|
||||
|
||||
var httpProvider = Provider{
|
||||
Schemes: []string{"http", "https"},
|
||||
New: NewHTTPGetter,
|
||||
New: func(options ...Option) (Getter, error) {
|
||||
options = append(options, defaultOptions...)
|
||||
return NewHTTPGetter(options...)
|
||||
},
|
||||
}
|
||||
|
||||
var ociProvider = Provider{
|
||||
|
||||
Reference in New Issue
Block a user