From 6a2e159b8e54c9631c7eb7bc175dcd9b0ec37305 Mon Sep 17 00:00:00 2001 From: Timofey Kirillov Date: Thu, 23 Sep 2021 13:18:22 +0300 Subject: [PATCH] fix: panic in dismiss command, helm regsitry client initialization failure Added missing --insecure-helm-dependencies flag into werf-dismiss command. --- cmd/werf/dismiss/dismiss.go | 4 ++++ cmd/werf/helm/migrate2to3.go | 2 ++ docs/documentation/_includes/reference/cli/werf_dismiss.md | 3 +++ .../_includes/reference/cli/werf_helm_migrate2to3.md | 3 +++ .../_includes/reference/cli/werf_helm_show_all.md | 2 +- .../_includes/reference/cli/werf_helm_show_chart.md | 2 +- 6 files changed, 14 insertions(+), 2 deletions(-) diff --git a/cmd/werf/dismiss/dismiss.go b/cmd/werf/dismiss/dismiss.go index 2cfac5bda5..7e93305520 100644 --- a/cmd/werf/dismiss/dismiss.go +++ b/cmd/werf/dismiss/dismiss.go @@ -113,6 +113,10 @@ Read more info about Helm Release name, Kubernetes Namespace and how to change i common.SetupAllowedLocalCacheVolumeUsageMargin(&commonCmdData, cmd) common.SetupDockerServerStoragePath(&commonCmdData, cmd) + common.SetupInsecureRegistry(&commonCmdData, cmd) + common.SetupInsecureHelmDependencies(&commonCmdData, cmd) + common.SetupSkipTlsVerifyRegistry(&commonCmdData, cmd) + common.SetupPlatform(&commonCmdData, cmd) cmd.Flags().BoolVarP(&cmdData.WithNamespace, "with-namespace", "", common.GetBoolEnvironmentDefaultFalse("WERF_WITH_NAMESPACE"), "Delete Kubernetes Namespace after purging Helm Release (default $WERF_WITH_NAMESPACE)") diff --git a/cmd/werf/helm/migrate2to3.go b/cmd/werf/helm/migrate2to3.go index 94884f2795..bfd804c506 100644 --- a/cmd/werf/helm/migrate2to3.go +++ b/cmd/werf/helm/migrate2to3.go @@ -87,6 +87,8 @@ func NewMigrate2To3Cmd() *cobra.Command { common.SetupKubeConfigBase64(&migrate2To3CommonCmdData, cmd) common.SetupKubeContext(&migrate2To3CommonCmdData, cmd) + common.SetupInsecureHelmDependencies(&migrate2To3CommonCmdData, cmd) + common.SetupLogOptions(&migrate2To3CommonCmdData, cmd) cmd.Flags().StringVarP(&migrate2ToCmdData.Release, "release", "", os.Getenv("WERF_RELEASE"), "Existing helm 2 release name which should be migrated to helm 3 (default $WERF_RELEASE). Option also sets target name for a new helm 3 release, use --target-release option (or $WERF_TARGET_RELEASE) to specify a different helm 3 release name.") diff --git a/docs/documentation/_includes/reference/cli/werf_dismiss.md b/docs/documentation/_includes/reference/cli/werf_dismiss.md index e2c65f24cb..7d02cc6584 100644 --- a/docs/documentation/_includes/reference/cli/werf_dismiss.md +++ b/docs/documentation/_includes/reference/cli/werf_dismiss.md @@ -122,6 +122,9 @@ werf dismiss [options] --hooks-status-progress-period=5 Hooks status progress period in seconds. Set 0 to stop showing hooks status progress. Defaults to $WERF_HOOKS_STATUS_PROGRESS_PERIOD_SECONDS or status progress period value + --insecure-helm-dependencies=false + Allow insecure oci registries to be used in the .helm/Chart.yaml dependencies + configuration (default $WERF_INSECURE_HELM_DEPENDENCIES) --insecure-registry=false Use plain HTTP requests when accessing a registry (default $WERF_INSECURE_REGISTRY) --kube-config='' diff --git a/docs/documentation/_includes/reference/cli/werf_helm_migrate2to3.md b/docs/documentation/_includes/reference/cli/werf_helm_migrate2to3.md index 9a18ae6717..f6155b73be 100644 --- a/docs/documentation/_includes/reference/cli/werf_helm_migrate2to3.md +++ b/docs/documentation/_includes/reference/cli/werf_helm_migrate2to3.md @@ -23,6 +23,9 @@ werf helm migrate2to3 [options] $WERF_HELM2_RELEASE_STORAGE_TYPE, or $WERF_HELM_RELEASE_STORAGE_TYPE, or "configmap") --home-dir='' Use specified dir to store werf cache files and dirs (default $WERF_HOME or ~/.werf) + --insecure-helm-dependencies=false + Allow insecure oci registries to be used in the .helm/Chart.yaml dependencies + configuration (default $WERF_INSECURE_HELM_DEPENDENCIES) --release='' Existing helm 2 release name which should be migrated to helm 3 (default $WERF_RELEASE). Option also sets target name for a new helm 3 release, use diff --git a/docs/documentation/_includes/reference/cli/werf_helm_show_all.md b/docs/documentation/_includes/reference/cli/werf_helm_show_all.md index 4a98aebc6c..8cb3e67057 100644 --- a/docs/documentation/_includes/reference/cli/werf_helm_show_all.md +++ b/docs/documentation/_includes/reference/cli/werf_helm_show_all.md @@ -5,7 +5,7 @@ {% endif %} This command inspects a chart (directory, file, or URL) and displays all its content -(values.yaml, Chart.yaml, README) +(values.yaml, Charts.yaml, README) {{ header }} Syntax diff --git a/docs/documentation/_includes/reference/cli/werf_helm_show_chart.md b/docs/documentation/_includes/reference/cli/werf_helm_show_chart.md index b6129c72a3..f139ada7fb 100644 --- a/docs/documentation/_includes/reference/cli/werf_helm_show_chart.md +++ b/docs/documentation/_includes/reference/cli/werf_helm_show_chart.md @@ -5,7 +5,7 @@ {% endif %} This command inspects a chart (directory, file, or URL) and displays the contents -of the Chart.yaml file +of the Charts.yaml file {{ header }} Syntax