Skip to content

Commit 96123cb

Browse files
fix(bundle): support for --insecure-registry/--skip-tls-verify-registry options
Signed-off-by: Aleksei Igrychev <aleksei.igrychev@palark.com>
1 parent 0050409 commit 96123cb

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

cmd/werf/common/helm.go

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import (
1313
bundles_registry "github.com/werf/werf/pkg/deploy/bundles/registry"
1414
"github.com/werf/werf/pkg/deploy/helm"
1515
"github.com/werf/werf/pkg/docker"
16-
"github.com/werf/werf/pkg/util"
1716
)
1817

1918
func NewHelmRegistryClient(ctx context.Context, dockerConfig string, insecureHelmDependencies bool) (*registry.Client, error) {
@@ -42,16 +41,13 @@ func InitHelmRegistryClient(registryClient *registry.Client, dockerConfig string
4241
}
4342

4443
func NewBundlesRegistryClient(ctx context.Context, commonCmdData *CmdData) (*bundles_registry.Client, error) {
45-
debug := logboek.Context(ctx).Debug().IsAccepted()
46-
insecure := util.GetBoolEnvironmentDefaultFalse("WERF_BUNDLE_INSECURE_REGISTRY")
47-
skipTlsVerify := util.GetBoolEnvironmentDefaultFalse("WERF_BUNDLE_SKIP_TLS_VERIFY_REGISTRY")
4844
out := logboek.Context(ctx).OutStream()
4945

5046
return bundles_registry.NewClient(
5147
bundles_registry.ClientOptCredentialsFile(docker.GetDockerConfigCredentialsFile(*commonCmdData.DockerConfig)),
52-
bundles_registry.ClientOptDebug(debug),
53-
bundles_registry.ClientOptInsecure(insecure),
54-
bundles_registry.ClientOptSkipTlsVerify(skipTlsVerify),
48+
bundles_registry.ClientOptDebug(*commonCmdData.LogDebug),
49+
bundles_registry.ClientOptInsecure(*commonCmdData.InsecureRegistry),
50+
bundles_registry.ClientOptSkipTlsVerify(*commonCmdData.SkipTlsVerifyRegistry),
5551
bundles_registry.ClientOptWriter(out),
5652
)
5753
}

0 commit comments

Comments
 (0)