diff --git a/cmd/werf/bundle/apply/apply.go b/cmd/werf/bundle/apply/apply.go index b798273dac..b9b6b3f3e0 100644 --- a/cmd/werf/bundle/apply/apply.go +++ b/cmd/werf/bundle/apply/apply.go @@ -6,6 +6,8 @@ import ( "path/filepath" "time" + "github.com/werf/werf/pkg/deploy/bundles" + "github.com/werf/werf/pkg/deploy/helm/chart_extender/helpers" "github.com/werf/werf/pkg/deploy/helm/command_helpers" @@ -142,13 +144,18 @@ func runApply() error { cmd_helm.Settings.Debug = *commonCmdData.LogDebug - registryClientHandle, err := common.NewHelmRegistryClientHandle(ctx, &commonCmdData) + helmRegistryClientHandle, err := common.NewHelmRegistryClientHandle(ctx, &commonCmdData) if err != nil { return fmt.Errorf("unable to create helm registry client: %s", err) } + bundlesRegistryClient, err := common.NewBundlesRegistryClient(ctx, &commonCmdData) + if err != nil { + return err + } + actionConfig := new(action.Configuration) - if err := helm.InitActionConfig(ctx, common.GetOndemandKubeInitializer(), *commonCmdData.Namespace, cmd_helm.Settings, registryClientHandle, actionConfig, helm.InitActionConfigOptions{ + if err := helm.InitActionConfig(ctx, common.GetOndemandKubeInitializer(), *commonCmdData.Namespace, cmd_helm.Settings, helmRegistryClientHandle, actionConfig, helm.InitActionConfigOptions{ StatusProgressPeriod: time.Duration(*commonCmdData.StatusProgressPeriodSeconds) * time.Second, HooksStatusProgressPeriod: time.Duration(*commonCmdData.HooksStatusProgressPeriodSeconds) * time.Second, KubeConfigOptions: kube.KubeConfigOptions{ @@ -161,34 +168,11 @@ func runApply() error { return err } - loader.GlobalLoadOptions = &loader.LoadOptions{} - - // FIXME: support semver-pattern - bundleRef := fmt.Sprintf("%s:%s", repoAddress, cmdData.Tag) - bundleTmpDir := filepath.Join(werf.GetServiceDir(), "tmp", "bundles", uuid.NewV4().String()) defer os.RemoveAll(bundleTmpDir) - if err := logboek.Context(ctx).LogProcess("Pulling bundle %q", bundleRef).DoError(func() error { - if cmd := cmd_helm.NewChartPullCmd(actionConfig, logboek.Context(ctx).OutStream()); cmd != nil { - if err := cmd.RunE(cmd, []string{bundleRef}); err != nil { - return fmt.Errorf("error saving bundle to the local chart helm cache: %s", err) - } - } - return nil - }); err != nil { - return err - } - - if err := logboek.Context(ctx).LogProcess("Exporting bundle %q", bundleRef).DoError(func() error { - if cmd := cmd_helm.NewChartExportCmd(actionConfig, logboek.Context(ctx).OutStream(), cmd_helm.ChartExportCmdOptions{Destination: bundleTmpDir}); cmd != nil { - if err := cmd.RunE(cmd, []string{bundleRef}); err != nil { - return fmt.Errorf("error pushing bundle %q: %s", bundleRef, err) - } - } - return nil - }); err != nil { - return err + if err := bundles.Pull(ctx, fmt.Sprintf("%s:%s", repoAddress, cmdData.Tag), bundleTmpDir, bundlesRegistryClient); err != nil { + return fmt.Errorf("unable to pull bundle: %s", err) } namespace := common.GetNamespace(&commonCmdData) @@ -208,7 +192,7 @@ func runApply() error { userExtraAnnotations["project.werf.io/env"] = *commonCmdData.Environment } - bundle, err := chart_extender.NewBundle(ctx, bundleTmpDir, cmd_helm.Settings, registryClientHandle, chart_extender.BundleOptions{ + bundle, err := chart_extender.NewBundle(ctx, bundleTmpDir, cmd_helm.Settings, helmRegistryClientHandle, chart_extender.BundleOptions{ ExtraAnnotations: userExtraAnnotations, ExtraLabels: userExtraLabels, }) diff --git a/cmd/werf/bundle/download/download.go b/cmd/werf/bundle/download/download.go index f477743516..9c348a44c0 100644 --- a/cmd/werf/bundle/download/download.go +++ b/cmd/werf/bundle/download/download.go @@ -4,18 +4,14 @@ import ( "fmt" "os" - "github.com/werf/werf/pkg/werf/global_warnings" + "github.com/werf/werf/pkg/deploy/bundles" - "github.com/werf/werf/pkg/deploy/helm" + "github.com/werf/werf/pkg/werf/global_warnings" cmd_helm "helm.sh/helm/v3/cmd/helm" - "helm.sh/helm/v3/pkg/action" - "helm.sh/helm/v3/pkg/chart/loader" "github.com/spf13/cobra" - "github.com/werf/logboek" - "github.com/werf/werf/cmd/werf/common" "github.com/werf/werf/pkg/werf" ) @@ -47,7 +43,7 @@ func NewCmd() *cobra.Command { common.LogVersion() return common.LogRunningTime(func() error { - return runApply() + return runDownload() }) }, } @@ -75,7 +71,7 @@ func NewCmd() *cobra.Command { return cmd } -func runApply() error { +func runDownload() error { ctx := common.BackgroundContext() if err := werf.Init(*commonCmdData.TmpDir, *commonCmdData.HomeDir); err != nil { @@ -93,42 +89,10 @@ func runApply() error { cmd_helm.Settings.Debug = *commonCmdData.LogDebug - registryClientHandle, err := common.NewHelmRegistryClientHandle(ctx, &commonCmdData) + bundlesRegistryClient, err := common.NewBundlesRegistryClient(ctx, &commonCmdData) if err != nil { - return fmt.Errorf("unable to create helm registry client: %s", err) - } - - actionConfig := new(action.Configuration) - if err := helm.InitActionConfig(ctx, nil, "", cmd_helm.Settings, registryClientHandle, actionConfig, helm.InitActionConfigOptions{}); err != nil { - return err - } - - loader.GlobalLoadOptions = &loader.LoadOptions{} - - // FIXME: support semver-pattern - bundleRef := fmt.Sprintf("%s:%s", repoAddress, cmdData.Tag) - - if err := logboek.Context(ctx).LogProcess("Pulling bundle %q", bundleRef).DoError(func() error { - if cmd := cmd_helm.NewChartPullCmd(actionConfig, logboek.Context(ctx).OutStream()); cmd != nil { - if err := cmd.RunE(cmd, []string{bundleRef}); err != nil { - return fmt.Errorf("error saving bundle to the local chart helm cache: %s", err) - } - } - return nil - }); err != nil { - return err - } - - if err := logboek.Context(ctx).LogProcess("Saving bundle into directory").DoError(func() error { - if cmd := cmd_helm.NewChartExportCmd(actionConfig, logboek.Context(ctx).OutStream(), cmd_helm.ChartExportCmdOptions{Destination: cmdData.Destination}); cmd != nil { - if err := cmd.RunE(cmd, []string{bundleRef}); err != nil { - return fmt.Errorf("error saving bundle to the directory: %s", err) - } - } - return nil - }); err != nil { return err } - return nil + return bundles.Pull(ctx, fmt.Sprintf("%s:%s", repoAddress, cmdData.Tag), cmdData.Destination, bundlesRegistryClient) } diff --git a/cmd/werf/bundle/export/export.go b/cmd/werf/bundle/export/export.go index ad9e60115c..4670a91c3c 100644 --- a/cmd/werf/bundle/export/export.go +++ b/cmd/werf/bundle/export/export.go @@ -4,6 +4,7 @@ import ( "context" "fmt" "os" + "time" "github.com/spf13/cobra" "github.com/werf/logboek" @@ -296,12 +297,12 @@ func runExport(ctx context.Context) error { logboek.LogOptionalLn() } - registryClientHandle, err := common.NewHelmRegistryClientHandle(ctx, &commonCmdData) + helmRegistryClientHandle, err := common.NewHelmRegistryClientHandle(ctx, &commonCmdData) if err != nil { return fmt.Errorf("unable to create helm registry client: %s", err) } - wc := chart_extender.NewWerfChart(ctx, giterminismManager, nil, chartDir, cmd_helm.Settings, registryClientHandle, chart_extender.WerfChartOptions{ + wc := chart_extender.NewWerfChart(ctx, giterminismManager, nil, chartDir, cmd_helm.Settings, helmRegistryClientHandle, chart_extender.WerfChartOptions{ ExtraAnnotations: userExtraAnnotations, ExtraLabels: userExtraLabels, }) @@ -338,10 +339,15 @@ func runExport(ctx context.Context) error { FileValues: common.GetSetFile(&commonCmdData), } + chartVersion := fmt.Sprintf("0.0.0-%d", time.Now().Unix()) + p := getter.All(cmd_helm.Settings) - if vals, err := valueOpts.MergeValues(p, wc); err != nil { + vals, err := valueOpts.MergeValues(p, wc) + if err != nil { return err - } else if _, err := wc.CreateNewBundle(ctx, cmdData.Destination, vals); err != nil { + } + + if _, err := wc.CreateNewBundle(ctx, cmdData.Destination, chartVersion, vals); err != nil { return fmt.Errorf("unable to create bundle: %s", err) } diff --git a/cmd/werf/bundle/publish/publish.go b/cmd/werf/bundle/publish/publish.go index 30dd1f34c3..5656d08b48 100644 --- a/cmd/werf/bundle/publish/publish.go +++ b/cmd/werf/bundle/publish/publish.go @@ -5,6 +5,9 @@ import ( "fmt" "os" "path/filepath" + "time" + + "github.com/Masterminds/semver" "helm.sh/helm/v3/pkg/getter" @@ -15,12 +18,10 @@ import ( "github.com/werf/werf/pkg/git_repo/gitdata" "github.com/werf/werf/pkg/werf/global_warnings" - "github.com/werf/werf/pkg/deploy/helm" - + "github.com/werf/werf/pkg/deploy/bundles" "github.com/werf/werf/pkg/deploy/helm/chart_extender" "github.com/werf/werf/pkg/deploy/helm/chart_extender/helpers" cmd_helm "helm.sh/helm/v3/cmd/helm" - "helm.sh/helm/v3/pkg/action" "helm.sh/helm/v3/pkg/chart" "helm.sh/helm/v3/pkg/chart/loader" "helm.sh/helm/v3/pkg/cli/values" @@ -320,12 +321,17 @@ func runPublish(ctx context.Context) error { logboek.LogOptionalLn() } - registryClientHandle, err := common.NewHelmRegistryClientHandle(ctx, &commonCmdData) + helmRegistryClientHandle, err := common.NewHelmRegistryClientHandle(ctx, &commonCmdData) if err != nil { - return fmt.Errorf("unable to create helm registry client: %s", err) + return err } - wc := chart_extender.NewWerfChart(ctx, giterminismManager, nil, chartDir, cmd_helm.Settings, registryClientHandle, chart_extender.WerfChartOptions{ + bundlesRegistryClient, err := common.NewBundlesRegistryClient(ctx, &commonCmdData) + if err != nil { + return err + } + + wc := chart_extender.NewWerfChart(ctx, giterminismManager, nil, chartDir, cmd_helm.Settings, helmRegistryClientHandle, chart_extender.WerfChartOptions{ ExtraAnnotations: userExtraAnnotations, ExtraLabels: userExtraLabels, }) @@ -362,49 +368,24 @@ func runPublish(ctx context.Context) error { FileValues: *commonCmdData.SetFile, } + chartVersion := cmdData.Tag + if _, err := semver.NewVersion(chartVersion); err != nil { + chartVersion = fmt.Sprintf("0.0.0-%d-%s", time.Now().Unix(), chartVersion) + } + bundleTmpDir := filepath.Join(werf.GetServiceDir(), "tmp", "bundles", uuid.NewV4().String()) defer os.RemoveAll(bundleTmpDir) p := getter.All(cmd_helm.Settings) - if vals, err := valueOpts.MergeValues(p, wc); err != nil { + vals, err := valueOpts.MergeValues(p, wc) + if err != nil { return err - } else if bundle, err := wc.CreateNewBundle(ctx, bundleTmpDir, vals); err != nil { - return fmt.Errorf("unable to create bundle: %s", err) - } else { - loader.GlobalLoadOptions = &loader.LoadOptions{} - - bundleRef := fmt.Sprintf("%s:%s", repoAddress, cmdData.Tag) - - if err := logboek.Context(ctx).LogProcess("Saving bundle to the local chart helm cache").DoError(func() error { - actionConfig := new(action.Configuration) - if err := helm.InitActionConfig(ctx, nil, "", cmd_helm.Settings, registryClientHandle, actionConfig, helm.InitActionConfigOptions{}); err != nil { - return err - } - - helmChartSaveCmd := cmd_helm.NewChartSaveCmd(actionConfig, logboek.Context(ctx).OutStream()) - if err := helmChartSaveCmd.RunE(helmChartSaveCmd, []string{bundle.Dir, bundleRef}); err != nil { - return fmt.Errorf("error saving bundle to the local chart helm cache: %s", err) - } - return nil - }); err != nil { - return err - } - - if err := logboek.Context(ctx).LogProcess("Pushing bundle %q", bundleRef).DoError(func() error { - actionConfig := new(action.Configuration) - if err := helm.InitActionConfig(ctx, nil, "", cmd_helm.Settings, registryClientHandle, actionConfig, helm.InitActionConfigOptions{}); err != nil { - return err - } + } - helmChartPushCmd := cmd_helm.NewChartPushCmd(actionConfig, logboek.Context(ctx).OutStream()) - if err := helmChartPushCmd.RunE(helmChartPushCmd, []string{bundleRef}); err != nil { - return fmt.Errorf("error pushing bundle %q: %s", bundleRef, err) - } - return nil - }); err != nil { - return err - } + bundle, err := wc.CreateNewBundle(ctx, bundleTmpDir, chartVersion, vals) + if err != nil { + return fmt.Errorf("unable to create bundle: %s", err) } - return nil + return bundles.Publish(ctx, bundle, fmt.Sprintf("%s:%s", repoAddress, cmdData.Tag), bundlesRegistryClient) } diff --git a/cmd/werf/common/helm.go b/cmd/werf/common/helm.go index c99207eb24..9d58b1b770 100644 --- a/cmd/werf/common/helm.go +++ b/cmd/werf/common/helm.go @@ -6,9 +6,9 @@ import ( "github.com/werf/kubedog/pkg/kube" "github.com/werf/logboek" + "github.com/werf/werf/pkg/deploy/bundles/registry" "github.com/werf/werf/pkg/deploy/helm" - cmd_helm "helm.sh/helm/v3/cmd/helm" helm_v3 "helm.sh/helm/v3/cmd/helm" "helm.sh/helm/v3/pkg/action" ) @@ -21,10 +21,22 @@ func NewHelmRegistryClientHandle(ctx context.Context, commonCmdData *CmdData) (* } } -func NewActionConfig(ctx context.Context, kubeInitializer helm.KubeInitializer, namespace string, commonCmdData *CmdData, registryClientHandle *helm_v3.RegistryClientHandle) (*action.Configuration, error) { +func NewBundlesRegistryClient(ctx context.Context, commonCmdData *CmdData) (*registry.Client, error) { + debug := logboek.Context(ctx).Debug().IsAccepted() + insecure := *commonCmdData.InsecureHelmDependencies + out := logboek.Context(ctx).OutStream() + + return registry.NewClient( + registry.ClientOptDebug(debug), + registry.ClientOptInsecure(insecure), + registry.ClientOptWriter(out), + ) +} + +func NewActionConfig(ctx context.Context, kubeInitializer helm.KubeInitializer, namespace string, commonCmdData *CmdData, registryClient *helm_v3.RegistryClientHandle) (*action.Configuration, error) { actionConfig := new(action.Configuration) - if err := helm.InitActionConfig(ctx, kubeInitializer, namespace, cmd_helm.Settings, registryClientHandle, actionConfig, helm.InitActionConfigOptions{ + if err := helm.InitActionConfig(ctx, kubeInitializer, namespace, helm_v3.Settings, registryClient, actionConfig, helm.InitActionConfigOptions{ StatusProgressPeriod: time.Duration(*commonCmdData.StatusProgressPeriodSeconds) * time.Second, HooksStatusProgressPeriod: time.Duration(*commonCmdData.HooksStatusProgressPeriodSeconds) * time.Second, KubeConfigOptions: kube.KubeConfigOptions{ diff --git a/cmd/werf/converge/converge.go b/cmd/werf/converge/converge.go index 3fc7a2c71c..8a0761f1aa 100644 --- a/cmd/werf/converge/converge.go +++ b/cmd/werf/converge/converge.go @@ -376,12 +376,12 @@ func run(ctx context.Context, containerRuntime container_runtime.ContainerRuntim lockManager = m } - registryClientHandle, err := common.NewHelmRegistryClientHandle(ctx, &commonCmdData) + helmRegistryClientHandle, err := common.NewHelmRegistryClientHandle(ctx, &commonCmdData) if err != nil { return fmt.Errorf("unable to create helm registry client: %s", err) } - wc := chart_extender.NewWerfChart(ctx, giterminismManager, secretsManager, chartDir, cmd_helm.Settings, registryClientHandle, chart_extender.WerfChartOptions{ + wc := chart_extender.NewWerfChart(ctx, giterminismManager, secretsManager, chartDir, cmd_helm.Settings, helmRegistryClientHandle, chart_extender.WerfChartOptions{ SecretValueFiles: common.GetSecretValues(&commonCmdData), ExtraAnnotations: userExtraAnnotations, ExtraLabels: userExtraLabels, @@ -423,17 +423,17 @@ func run(ctx context.Context, containerRuntime container_runtime.ContainerRuntim FileValues: common.GetSetFile(&commonCmdData), } - actionConfig, err := common.NewActionConfig(ctx, common.GetOndemandKubeInitializer(), namespace, &commonCmdData, registryClientHandle) + actionConfig, err := common.NewActionConfig(ctx, common.GetOndemandKubeInitializer(), namespace, &commonCmdData, helmRegistryClientHandle) if err != nil { return err } maintenanceHelper := createMaintenanceHelper(ctx, actionConfig, kubeConfigOptions) - if err := migrateHelm2ToHelm3(ctx, releaseName, namespace, maintenanceHelper, wc.ChainPostRenderer, valueOpts, filepath.Join(giterminismManager.ProjectDir(), chartDir), registryClientHandle); err != nil { + if err := migrateHelm2ToHelm3(ctx, releaseName, namespace, maintenanceHelper, wc.ChainPostRenderer, valueOpts, filepath.Join(giterminismManager.ProjectDir(), chartDir), helmRegistryClientHandle); err != nil { return err } - actionConfig, err = common.NewActionConfig(ctx, common.GetOndemandKubeInitializer(), namespace, &commonCmdData, registryClientHandle) + actionConfig, err = common.NewActionConfig(ctx, common.GetOndemandKubeInitializer(), namespace, &commonCmdData, helmRegistryClientHandle) if err != nil { return err } @@ -485,7 +485,7 @@ func createMaintenanceHelper(ctx context.Context, actionConfig *action.Configura return maintenance_helper.NewMaintenanceHelper(actionConfig, maintenanceOpts) } -func migrateHelm2ToHelm3(ctx context.Context, releaseName, namespace string, maintenanceHelper *maintenance_helper.MaintenanceHelper, chainPostRenderer func(postrender.PostRenderer) postrender.PostRenderer, valueOpts *values.Options, fullChartDir string, registryClientHandle *helm_v3.RegistryClientHandle) error { +func migrateHelm2ToHelm3(ctx context.Context, releaseName, namespace string, maintenanceHelper *maintenance_helper.MaintenanceHelper, chainPostRenderer func(postrender.PostRenderer) postrender.PostRenderer, valueOpts *values.Options, fullChartDir string, helmRegistryClientHandle *helm_v3.RegistryClientHandle) error { if helm2Exists, err := checkHelm2AvailableAndReleaseExists(ctx, releaseName, namespace, maintenanceHelper); err != nil { return fmt.Errorf("error checking availability of helm 2 and existence of helm 2 release %q: %s", releaseName, err) } else if !helm2Exists { @@ -512,7 +512,7 @@ func migrateHelm2ToHelm3(ctx context.Context, releaseName, namespace string, mai logboek.Context(ctx).Default().LogOptionalLn() if err := logboek.Context(ctx).LogProcess("Rendering helm 3 templates for the current project state").DoError(func() error { - actionConfig, err := common.NewActionConfig(ctx, common.GetOndemandKubeInitializer(), namespace, &commonCmdData, registryClientHandle) + actionConfig, err := common.NewActionConfig(ctx, common.GetOndemandKubeInitializer(), namespace, &commonCmdData, helmRegistryClientHandle) if err != nil { return err } diff --git a/cmd/werf/dismiss/dismiss.go b/cmd/werf/dismiss/dismiss.go index 3d41e100d3..0133901cf6 100644 --- a/cmd/werf/dismiss/dismiss.go +++ b/cmd/werf/dismiss/dismiss.go @@ -200,12 +200,12 @@ func runDismiss(ctx context.Context) error { return fmt.Errorf("getting helm chart dir failed: %s", err) } - registryClientHandle, err := common.NewHelmRegistryClientHandle(ctx, &commonCmdData) + helmRegistryClientHandle, err := common.NewHelmRegistryClientHandle(ctx, &commonCmdData) if err != nil { return fmt.Errorf("unable to create helm registry client: %s", err) } - wc := chart_extender.NewWerfChart(ctx, giterminismManager, nil, chartDir, cmd_helm.Settings, registryClientHandle, chart_extender.WerfChartOptions{}) + wc := chart_extender.NewWerfChart(ctx, giterminismManager, nil, chartDir, cmd_helm.Settings, helmRegistryClientHandle, chart_extender.WerfChartOptions{}) if err := wc.SetEnv(*commonCmdData.Environment); err != nil { return err @@ -215,7 +215,7 @@ func runDismiss(ctx context.Context) error { } actionConfig := new(action.Configuration) - if err := helm.InitActionConfig(ctx, common.GetOndemandKubeInitializer(), namespace, cmd_helm.Settings, registryClientHandle, actionConfig, helm.InitActionConfigOptions{ + if err := helm.InitActionConfig(ctx, common.GetOndemandKubeInitializer(), namespace, cmd_helm.Settings, helmRegistryClientHandle, actionConfig, helm.InitActionConfigOptions{ StatusProgressPeriod: time.Duration(*commonCmdData.StatusProgressPeriodSeconds) * time.Second, HooksStatusProgressPeriod: time.Duration(*commonCmdData.HooksStatusProgressPeriodSeconds) * time.Second, KubeConfigOptions: kube.KubeConfigOptions{ diff --git a/cmd/werf/helm/helm.go b/cmd/werf/helm/helm.go index 97dc399592..84a9ca6c31 100644 --- a/cmd/werf/helm/helm.go +++ b/cmd/werf/helm/helm.go @@ -94,7 +94,6 @@ func NewCmd() *cobra.Command { cmd_helm.NewTestCmd(actionConfig, os.Stdout), cmd_helm.NewVerifyCmd(os.Stdout), cmd_helm.NewVersionCmd(os.Stdout), - cmd_helm.NewChartCmd(actionConfig, os.Stdout), secretCmd(), NewGetAutogeneratedValuesCmd(), NewGetNamespaceCmd(), @@ -140,12 +139,12 @@ func NewCmd() *cobra.Command { common.SetupOndemandKubeInitializer(*_commonCmdData.KubeContext, *_commonCmdData.KubeConfig, *_commonCmdData.KubeConfigBase64, *_commonCmdData.KubeConfigPathMergeList) - registryClientHandle, err := common.NewHelmRegistryClientHandle(ctx, &_commonCmdData) + helmRegistryClientHandle, err := common.NewHelmRegistryClientHandle(ctx, &_commonCmdData) if err != nil { return fmt.Errorf("unable to create helm registry client: %s", err) } - helm.InitActionConfig(ctx, common.GetOndemandKubeInitializer(), namespace, cmd_helm.Settings, registryClientHandle, actionConfig, helm.InitActionConfigOptions{ + helm.InitActionConfig(ctx, common.GetOndemandKubeInitializer(), namespace, cmd_helm.Settings, helmRegistryClientHandle, actionConfig, helm.InitActionConfigOptions{ StatusProgressPeriod: time.Duration(*_commonCmdData.StatusProgressPeriodSeconds) * time.Second, HooksStatusProgressPeriod: time.Duration(*_commonCmdData.HooksStatusProgressPeriodSeconds) * time.Second, KubeConfigOptions: kube.KubeConfigOptions{ diff --git a/cmd/werf/helm/migrate2to3.go b/cmd/werf/helm/migrate2to3.go index bfd804c506..1492d33cd7 100644 --- a/cmd/werf/helm/migrate2to3.go +++ b/cmd/werf/helm/migrate2to3.go @@ -132,13 +132,13 @@ func runMigrate2To3(ctx context.Context) error { ConfigDataBase64: *migrate2To3CommonCmdData.KubeConfigBase64, } - registryClientHandler, err := common.NewHelmRegistryClientHandle(ctx, &migrate2To3CommonCmdData) + helmRegistryClientHandler, err := common.NewHelmRegistryClientHandle(ctx, &migrate2To3CommonCmdData) if err != nil { return fmt.Errorf("unable to create helm registry client: %s", err) } actionConfig := new(action.Configuration) - if err := helm.InitActionConfig(ctx, common.GetOndemandKubeInitializer(), targetNamespace, cmd_helm.Settings, registryClientHandler, actionConfig, helm.InitActionConfigOptions{KubeConfigOptions: kubeConfigOptions}); err != nil { + if err := helm.InitActionConfig(ctx, common.GetOndemandKubeInitializer(), targetNamespace, cmd_helm.Settings, helmRegistryClientHandler, actionConfig, helm.InitActionConfigOptions{KubeConfigOptions: kubeConfigOptions}); err != nil { return err } diff --git a/cmd/werf/render/render.go b/cmd/werf/render/render.go index c38a01d5fb..10d97d8693 100644 --- a/cmd/werf/render/render.go +++ b/cmd/werf/render/render.go @@ -321,12 +321,12 @@ func runRender(ctx context.Context) error { secretsManager := secrets_manager.NewSecretsManager(secrets_manager.SecretsManagerOptions{DisableSecretsDecryption: *commonCmdData.IgnoreSecretKey}) - registryClientHandler, err := common.NewHelmRegistryClientHandle(ctx, &commonCmdData) + helmRegistryClientHandler, err := common.NewHelmRegistryClientHandle(ctx, &commonCmdData) if err != nil { return fmt.Errorf("unable to create helm registry client: %s", err) } - wc := chart_extender.NewWerfChart(ctx, giterminismManager, secretsManager, chartDir, cmd_helm.Settings, registryClientHandler, chart_extender.WerfChartOptions{ + wc := chart_extender.NewWerfChart(ctx, giterminismManager, secretsManager, chartDir, cmd_helm.Settings, helmRegistryClientHandler, chart_extender.WerfChartOptions{ SecretValueFiles: common.GetSecretValues(&commonCmdData), ExtraAnnotations: userExtraAnnotations, ExtraLabels: userExtraLabels, @@ -359,7 +359,7 @@ func runRender(ctx context.Context) error { } actionConfig := new(action.Configuration) - if err := helm.InitActionConfig(ctx, nil, namespace, cmd_helm.Settings, registryClientHandler, actionConfig, helm.InitActionConfigOptions{}); err != nil { + if err := helm.InitActionConfig(ctx, nil, namespace, cmd_helm.Settings, helmRegistryClientHandler, actionConfig, helm.InitActionConfigOptions{}); err != nil { return err } diff --git a/go.mod b/go.mod index bf5eaec32b..5c151f61a7 100644 --- a/go.mod +++ b/go.mod @@ -22,11 +22,15 @@ require ( github.com/containers/common v0.44.2 github.com/containers/image/v5 v5.16.0 github.com/containers/storage v1.36.0 - github.com/docker/cli v20.10.5+incompatible + github.com/deislabs/oras v0.12.0 // indirect + github.com/djherbis/buffer v1.1.0 + github.com/djherbis/nio/v3 v3.0.1 + github.com/docker/cli v20.10.7+incompatible github.com/docker/distribution v2.7.1+incompatible github.com/docker/docker v20.10.8+incompatible github.com/docker/go v1.5.1-1 // indirect github.com/docker/go-connections v0.4.0 + github.com/docker/go-units v0.4.0 // indirect github.com/dustin/go-humanize v1.0.0 github.com/fluxcd/flagger v1.8.0 github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32 @@ -38,6 +42,7 @@ require ( github.com/google/go-containerregistry v0.5.1 github.com/google/uuid v1.2.0 github.com/gookit/color v1.3.7 + github.com/gosuri/uitable v0.0.4 // indirect github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed // indirect github.com/hashicorp/go-multierror v1.1.1 github.com/hashicorp/go-version v1.2.0 @@ -46,6 +51,7 @@ require ( github.com/jinzhu/gorm v1.9.12 // indirect github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 // indirect github.com/klauspost/pgzip v1.2.5 // indirect + github.com/markbates/pkger v0.17.1 // indirect github.com/minio/minio v0.0.0-20210311070216-f92b7a562103 github.com/mitchellh/copystructure v1.1.1 github.com/moby/buildkit v0.8.2 @@ -73,7 +79,7 @@ require ( github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect go.mongodb.org/mongo-driver v1.5.1 // indirect golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97 - golang.org/x/net v0.0.0-20210428140749-89ef3d95e781 + golang.org/x/net v0.0.0-20210520170846-37e1c6afe023 gopkg.in/dancannon/gorethink.v3 v3.0.5 // indirect gopkg.in/errgo.v2 v2.1.0 gopkg.in/fatih/pool.v2 v2.0.0 // indirect @@ -83,14 +89,14 @@ require ( gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b helm.sh/helm/v3 v3.6.3 - k8s.io/api v0.21.0 - k8s.io/apimachinery v0.21.0 - k8s.io/cli-runtime v0.21.0 - k8s.io/client-go v0.21.0 + k8s.io/api v0.22.1 + k8s.io/apimachinery v0.22.1 + k8s.io/cli-runtime v0.22.1 + k8s.io/client-go v0.22.1 k8s.io/helm v2.17.0+incompatible k8s.io/klog v1.0.0 - k8s.io/klog/v2 v2.8.0 - k8s.io/kubectl v0.21.0 + k8s.io/klog/v2 v2.9.0 + k8s.io/kubectl v0.22.1 mvdan.cc/xurls v1.1.0 rsc.io/letsencrypt v0.0.3 // indirect sigs.k8s.io/yaml v1.2.1-0.20210128145534-11e43d4a8b92 @@ -100,6 +106,6 @@ replace github.com/jaguilar/vt100 => github.com/tonistiigi/vt100 v0.0.0-20190402 replace k8s.io/helm => github.com/werf/helm v0.0.0-20210202111118-81e74d46da0f -replace helm.sh/helm/v3 => github.com/werf/helm/v3 v3.0.0-20211026074935-16d6048b0f73 - replace github.com/deislabs/oras => github.com/werf/third-party-oras v0.9.1-0.20210927171747-6d045506f4c8 + +replace helm.sh/helm/v3 => github.com/werf/helm/v3 v3.0.0-20211029164334-9da46b8bb260 diff --git a/go.sum b/go.sum index 3d66a70ff3..06a1ac1bad 100644 --- a/go.sum +++ b/go.sum @@ -75,6 +75,7 @@ github.com/Azure/azure-service-bus-go v0.9.1/go.mod h1:yzBx6/BUGfjfeqbRZny9AQIbI github.com/Azure/azure-storage-blob-go v0.8.0/go.mod h1:lPI3aLPpuLTeUwh1sViKXFxwl2B6teiRqI0deQUvsw0= github.com/Azure/azure-storage-blob-go v0.10.0/go.mod h1:ep1edmW+kNQx4UfWM9heESNmQdijykocJ0YOxmMX8SE= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= +github.com/Azure/go-ansiterm v0.0.0-20210608223527-2377c96fe795/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Azure/go-autorest v10.8.1+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= @@ -91,6 +92,8 @@ github.com/Azure/go-autorest/autorest v0.10.2/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUd github.com/Azure/go-autorest/autorest v0.11.1/go.mod h1:JFgpikqFJ/MleTTxwepExTKnFUKKszPS8UavbQYUMuw= github.com/Azure/go-autorest/autorest v0.11.12 h1:gI8ytXbxMfI+IVbI9mP2JGCTXIuhHLgRlvQ9X4PsnHE= github.com/Azure/go-autorest/autorest v0.11.12/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= +github.com/Azure/go-autorest/autorest v0.11.18 h1:90Y4srNYrwOtAgVo3ndrQkTYn6kf1Eg/AjTFJ8Is2aM= +github.com/Azure/go-autorest/autorest v0.11.18/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= github.com/Azure/go-autorest/autorest/adal v0.8.1/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= @@ -100,6 +103,8 @@ github.com/Azure/go-autorest/autorest/adal v0.9.0/go.mod h1:/c022QCutn2P7uY+/oQW github.com/Azure/go-autorest/autorest/adal v0.9.1/go.mod h1:/c022QCutn2P7uY+/oQWWNcK9YU+MH96NgK+jErpbcg= github.com/Azure/go-autorest/autorest/adal v0.9.5 h1:Y3bBUV4rTuxenJJs41HU3qmqsb+auo+a3Lz+PlJPpL0= github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= +github.com/Azure/go-autorest/autorest/adal v0.9.13 h1:Mp5hbtOePIzM8pJVRa3YLrWWmZtoxRXqUEzCfJt3+/Q= +github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= github.com/Azure/go-autorest/autorest/azure/auth v0.4.2/go.mod h1:90gmfKdlmKgfjUpnCEpOJzsUEjrWDSLwHIG73tSXddM= github.com/Azure/go-autorest/autorest/azure/cli v0.3.1/go.mod h1:ZG5p860J94/0kI9mNJVoIoLgXcirM2gF5i2kWloofxw= github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= @@ -119,6 +124,8 @@ github.com/Azure/go-autorest/autorest/validation v0.2.0/go.mod h1:3EEqHnBxQGHXRY github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= github.com/Azure/go-autorest/logger v0.2.0 h1:e4RVHVZKC5p6UANLJHkM4OfR1UKZPj8Wt8Pcx+3oqrE= github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= +github.com/Azure/go-autorest/logger v0.2.1 h1:IG7i4p/mDa2Ce4TRyAO8IHnVhAVF3RFU+ZtXWSmf4Tg= +github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo= github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= @@ -152,6 +159,8 @@ github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030I github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= github.com/Masterminds/sprig v2.20.0+incompatible h1:dJTKKuUkYW3RMFdQFXPU/s6hg10RgctmTjRcbZ98Ap8= github.com/Masterminds/sprig v2.20.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= +github.com/Masterminds/sprig v2.22.0+incompatible h1:z4yfnGrZ7netVz+0EDJ0Wi+5VZCSYp4Z0m2dk6cEM60= +github.com/Masterminds/sprig v2.22.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= github.com/Masterminds/sprig/v3 v3.2.2 h1:17jRggJu518dr3QaafizSXOjKYp94wKfABxUmyxvxX8= github.com/Masterminds/sprig/v3 v3.2.2/go.mod h1:UoaO7Yp8KlPnJIYWTFkMaqPUYKTfGFPhxNuwnnxkKlk= github.com/Masterminds/squirrel v1.5.0 h1:JukIZisrUXadA9pl3rMkjhiamxiB0cXiu+HGp/Y8cY8= @@ -268,6 +277,7 @@ github.com/aws/aws-sdk-go v1.25.11/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpi github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.27.1/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.31.6/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= +github.com/aws/aws-sdk-go v1.34.9/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= github.com/aws/aws-sdk-go v1.34.28/go.mod h1:H7NKnBqNVzoTJpGfLrQkkD+ytBA93eiDYi/+8rV9s48= github.com/aws/aws-sdk-go v1.35.20/go.mod h1:tlPOdRjfxPBpNIwqDj61rmsnA85v9jc0Ps9+muhnW+k= github.com/aws/aws-sdk-go v1.37.32 h1:gLEASuX1phzqb00APUZU/xVIqf13IoA250RlgQ9rz28= @@ -276,6 +286,7 @@ github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZw github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59/go.mod h1:q/89r3U2H7sSsE2t6Kca0lfwTK8JdoNGS/yzM/4iH5I= github.com/bcicen/jstream v1.0.1/go.mod h1:9ielPxqFry7Y4Tg3j4BfjPocfJ3TbsRtXOAYXYmRuAQ= github.com/beevik/ntp v0.3.0/go.mod h1:hIHWr+l3+/clUnF44zdK+CWW7fO8dR5cIylAQ76NRpg= +github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= @@ -307,6 +318,7 @@ github.com/bombsimon/wsl/v3 v3.1.0/go.mod h1:st10JtZYLE4D5sC7b8xV4zTKZwAQjCH/Hy2 github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBTaaSFSlLx/70C2HPIMNZpVV8+vt/A+FMnYP11g= github.com/bshuster-repo/logrus-logstash-hook v0.4.1 h1:pgAtgj+A31JBVtEHu2uHuEx0n+2ukqUJnS2vVe5pQNA= github.com/bshuster-repo/logrus-logstash-hook v0.4.1/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk= +github.com/bshuster-repo/logrus-logstash-hook v1.0.0/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk= github.com/buger/jsonparser v0.0.0-20180808090653-f4dd9f5a6b44/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s= github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= github.com/bugsnag/bugsnag-go v1.5.3 h1:yeRUT3mUE13jL1tGwvoQsKdVbAsQx9AJ+fqahKveP04= @@ -324,6 +336,8 @@ github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QH github.com/census-instrumentation/opencensus-proto v0.2.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/certifi/gocertifi v0.0.0-20180118203423-deb3ae2ef261/go.mod h1:GJKEexRPVJrBSOjoqN5VNOIKJ5Q3RViH6eu3puDRwx4= +github.com/certifi/gocertifi v0.0.0-20191021191039-0944d244cd40/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= +github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= @@ -356,6 +370,9 @@ github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGX github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= +github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5/go.mod h1:h6jFvWxBdQXxjopDMZyH2UVceIRfR84bdzbkoKrsWNo= +github.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoCr5oaCLELYA= +github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= github.com/codahale/hdrhistogram v0.0.0-20160425231609-f8ad88b59a58/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/colinmarc/hdfs/v2 v2.2.0/go.mod h1:Wss6n3mtaZyRwWaqtSH+6ge01qT0rw9dJJmvoUnIQ/E= @@ -399,6 +416,7 @@ github.com/containerd/containerd v1.5.0-beta.3/go.mod h1:/wr9AVtEM7x9c+n0+stptlo github.com/containerd/containerd v1.5.0-beta.4/go.mod h1:GmdgZd2zA2GYIBZ0w09ZvgqEq8EfBp/m3lcVZIvPHhI= github.com/containerd/containerd v1.5.0-rc.0/go.mod h1:V/IXoMqNGgBlabz3tHD2TWDoTJseu1FGOKuoA4nNb2s= github.com/containerd/containerd v1.5.1/go.mod h1:0DOxVqwDy2iZvrZp2JUx/E+hS0UNTVn7dJnIOwtYR4g= +github.com/containerd/containerd v1.5.2/go.mod h1:0DOxVqwDy2iZvrZp2JUx/E+hS0UNTVn7dJnIOwtYR4g= github.com/containerd/containerd v1.5.5 h1:q1gxsZsGZ8ddVe98yO6pR21b5xQSMiR61lD0W96pgQo= github.com/containerd/containerd v1.5.5/go.mod h1:oSTh0QpT1w6jYcGmbiSbxv9OSQYaa88mPyWIuU79zyo= github.com/containerd/containerd v1.5.7 h1:rQyoYtj4KddB3bxG6SAqd4+08gePNyJjRqvOIfV3rkM= @@ -530,6 +548,7 @@ github.com/dchest/siphash v1.2.1/go.mod h1:q+IRvb2gOSrUnYoPqHiyHXS0FOBBOdl6tONBl github.com/denisenkom/go-mssqldb v0.0.0-20191001013358-cfbb681360f0/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= github.com/denisenkom/go-mssqldb v0.0.0-20191124224453-732737034ffd h1:83Wprp6ROGeiHFAP8WJdI2RoxALQYgdllERc3N5N2DM= github.com/denisenkom/go-mssqldb v0.0.0-20191124224453-732737034ffd/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= +github.com/denisenkom/go-mssqldb v0.9.0/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= github.com/denverdino/aliyungo v0.0.0-20190125010748-a747050bb1ba/go.mod h1:dV8lFg6daOBZbT6/BDGIz6Y3WFGn8juu6G+CQ6LHtl0= github.com/devigned/tab v0.1.1/go.mod h1:XG9mPq0dFghrYvoBF3xdRrJzSTX1b7IQrvaL9mzjeJY= github.com/dgrijalva/jwt-go v0.0.0-20170104182250-a601269ab70c/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= @@ -538,13 +557,21 @@ github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8 github.com/dimchansky/utfbom v1.1.0/go.mod h1:rO41eb7gLfo8SF1jd9F8HplJm1Fewwi4mQvIirEdv+8= github.com/disiqueira/gotree/v3 v3.0.2 h1:ik5iuLQQoufZBNPY518dXhiO5056hyNBIK9lWhkNRq8= github.com/disiqueira/gotree/v3 v3.0.2/go.mod h1:ZuyjE4+mUQZlbpkI24AmruZKhg3VHEgPLDY8Qk+uUu8= +github.com/distribution/distribution/v3 v3.0.0-20210804104954-38ab4c606ee3 h1:rEK0juuU5idazw//KzUcL3yYwUU3DIe2OnfJwjDBqno= +github.com/distribution/distribution/v3 v3.0.0-20210804104954-38ab4c606ee3/go.mod h1:gt38b7cvVKazi5XkHvINNytZXgTEntyhtyM3HQz46Nk= github.com/djherbis/atime v1.0.0/go.mod h1:5W+KBIuTwVGcqjIfaTwt+KSYX1o6uep8dtevevQP/f8= +github.com/djherbis/buffer v1.1.0 h1:uGQ+DZDAMlfC2z3khbBtLcAHC0wyoNrX9lpOml3g3fg= +github.com/djherbis/buffer v1.1.0/go.mod h1:VwN8VdFkMY0DCALdY8o00d3IZ6Amz/UNVMWcSaJT44o= +github.com/djherbis/nio/v3 v3.0.1 h1:6wxhnuppteMa6RHA4L81Dq7ThkZH8SwnDzXDYy95vB4= +github.com/djherbis/nio/v3 v3.0.1/go.mod h1:Ng4h80pbZFMla1yKzm61cF0tqqilXZYrogmWgZxOcmg= github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= github.com/docker/cli v0.0.0-20190925022749-754388324470/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/cli v0.0.0-20191017083524-a8ff7f821017/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/cli v20.10.0-beta1.0.20201029214301-1d20b15adc38+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/cli v20.10.5+incompatible h1:bjflayQbWg+xOkF2WPEAOi4Y7zWhR7ptoPhV/VqLVDE= github.com/docker/cli v20.10.5+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/docker/cli v20.10.7+incompatible h1:pv/3NqibQKphWZiAskMzdz8w0PRbtTaEB+f6NwdU7Is= +github.com/docker/cli v20.10.7+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/distribution v0.0.0-20190905152932-14b96e55d84c/go.mod h1:0+TTO4EOBfRPhZXAeF1Vu+W3hHZ8eLp8PgKVZlcvtFY= github.com/docker/distribution v2.6.0-rc.1.0.20180327202408-83389a148052+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/distribution v2.7.1-0.20190205005809-0d3efadf0154+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= @@ -615,6 +642,8 @@ github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLi github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.9.0+incompatible h1:kLcOMZeuLAJvL2BPWLMIj5oaZQobrkAqrL+WFZwQses= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch v4.11.0+incompatible h1:glyUF9yIYtMHzn8xaKw5rMhdWcwsYV8dZHIq5567/xs= +github.com/evanphx/json-patch v4.11.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d h1:105gxyaGwCFad8crR9dcMQWvV9Hvulu6hwUh4tWPJnM= github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d/go.mod h1:ZZMPRZwes7CROmyNKgQzC3XPs6L/G2EJLHddWejkmf4= github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc= @@ -632,6 +661,8 @@ github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568 h1:BHsljHzVlRcyQhjr github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/form3tech-oss/jwt-go v3.2.2+incompatible h1:TcekIExNqud5crz4xD2pavyTgWiPvpYe4Xau31I0PRk= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= +github.com/form3tech-oss/jwt-go v3.2.3+incompatible h1:7ZaBxOI7TMoYBfyA3cQHErNNyAWIKUMIwqxEtgHOs5c= +github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/fortytw2/leaktest v1.2.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= @@ -649,6 +680,7 @@ github.com/fvbommel/sortorder v1.0.1/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui72 github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7 h1:LofdAjjjqCSXMwLGgOgnE+rdPuvX9DxCqaHwKy7i/ko= github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY= github.com/getsentry/raven-go v0.0.0-20180121060056-563b81fc02b7/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= +github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32 h1:Mn26/9ZMNWSw9C9ERFA1PUxfmGpolnw2v0bKOREu5ew= @@ -684,6 +716,7 @@ github.com/go-ini/ini v1.25.4/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3I github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= +github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-ldap/ldap v3.0.2+incompatible/go.mod h1:qfd9rJvER9Q0/D/Sqn1DfHRoBp40uXYvFoEVrNEPqRc= github.com/go-ldap/ldap/v3 v3.2.4/go.mod h1:iYS1MdmrmceOJ1QOTnRXrIs7i3kloqtmGQjRvjKpyMg= github.com/go-lintpack/lintpack v0.5.2/go.mod h1:NwZuYi2nUHho8XEIZ6SIxihrnPoqBTDqfpXvXAN0sXM= @@ -713,12 +746,16 @@ github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwds github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.3 h1:gihV7YNZK1iK6Tgwwsxo2rJbD1GTbdm72325Bq8FI3w= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= +github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= github.com/go-openapi/jsonreference v0.19.3 h1:5cxNfTy0UVC3X8JL5ymxzyoUZmo8iZb+jeTWn7tUa8o= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= +github.com/go-openapi/jsonreference v0.19.5 h1:1WJP/wi4OjB4iV8KVbH73rQaoialJrqv8gitZLxGLtM= +github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= github.com/go-openapi/loads v0.18.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= @@ -748,6 +785,8 @@ github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/ github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5 h1:lTz6Ys4CmqqCQmZPBlbQENR1/GucA2bzYTE12Pw4tFY= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.14 h1:gm3vOOXfiuw5i9p5N9xJvfjvuofpyvLA9Wr6QfK5Fng= +github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= github.com/go-openapi/validate v0.19.5/go.mod h1:8DJv2CVJQ6kGNpFW6eV9N3JviE1C85nY1c2z52x1Gk4= @@ -800,16 +839,19 @@ github.com/gobuffalo/here v0.6.0/go.mod h1:wAG085dHOYqUpf+Ap+WOdrPTp5IYcDAs/x7PL github.com/gobuffalo/logger v0.0.0-20190315122211-86e12af44bc2/go.mod h1:QdxcLw541hSGtBnhUc4gaNIXRjiDppFGaDqzbrBd3v8= github.com/gobuffalo/logger v1.0.1 h1:ZEgyRGgAm4ZAhAO45YXMs5Fp+bzGLESFewzAVBMKuTg= github.com/gobuffalo/logger v1.0.1/go.mod h1:2zbswyIUa45I+c+FLXuWl9zSWEiVuthsk8ze5s8JvPs= +github.com/gobuffalo/logger v1.0.3/go.mod h1:SoeejUwldiS7ZsyCBphOGURmWdwUFXs0J7TCjEhjKxM= github.com/gobuffalo/mapi v1.0.1/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= github.com/gobuffalo/mapi v1.0.2/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= github.com/gobuffalo/packd v0.0.0-20190315124812-a385830c7fc0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= github.com/gobuffalo/packd v0.1.0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= github.com/gobuffalo/packd v0.3.0 h1:eMwymTkA1uXsqxS0Tpoop3Lc0u3kTfiMBE6nKtQU4g4= github.com/gobuffalo/packd v0.3.0/go.mod h1:zC7QkmNkYVGKPw4tHpBQ+ml7W/3tIebgeo1b36chA3Q= +github.com/gobuffalo/packd v1.0.0/go.mod h1:6VTc4htmJRFB7u1m/4LeMTWjFoYrUiBkU9Fdec9hrhI= github.com/gobuffalo/packr/v2 v2.0.9/go.mod h1:emmyGweYTm6Kdper+iywB6YK5YzuKchGtJQZ0Odn4pQ= github.com/gobuffalo/packr/v2 v2.2.0/go.mod h1:CaAwI0GPIAv+5wKLtv8Afwl+Cm78K/I/VCm/3ptBN+0= github.com/gobuffalo/packr/v2 v2.7.1 h1:n3CIW5T17T8v4GGK5sWXLVWJhCz7b5aNLSxW6gYim4o= github.com/gobuffalo/packr/v2 v2.7.1/go.mod h1:qYEvAazPaVxy7Y7KR0W8qYEE+RymX74kETFqjFoFlOc= +github.com/gobuffalo/packr/v2 v2.8.1/go.mod h1:c/PLlOuTU+p3SybaJATW3H6lX/iK7xEz5OeMf+NnJpg= github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= @@ -819,6 +861,7 @@ github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6 github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godror/godror v0.13.3/go.mod h1:2ouUT4kdhUBk7TAkHWD4SN0CdI0pgEQbo8FVHhbSKWg= +github.com/godror/godror v0.24.2/go.mod h1:wZv/9vPiUib6tkoDl+AZ/QLf5YZgMravZ7jxH2eQWAE= github.com/gofrs/flock v0.0.0-20190320160742-5135e617513b/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gofrs/flock v0.7.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gofrs/flock v0.7.3/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= @@ -849,6 +892,8 @@ github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4er github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= @@ -903,11 +948,14 @@ github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4/go.mod h1:Izgrg github.com/golangplus/bytes v0.0.0-20160111154220-45c989fe5450/go.mod h1:Bk6SMAONeMXrxql8uvOKuAZSu8aM5RUGv+1C6IJaEho= github.com/golangplus/fmt v0.0.0-20150411045040-2a5d6d7d2995/go.mod h1:lJgMEyOkYFkPcDKwRXegd+iM6E7matEszMG5HhwytU8= github.com/golangplus/testing v0.0.0-20180327235837-af21d9c3145e/go.mod h1:0AA//k/eakGydO4jKRoRL2j92ZKSzTgj9tclaCrvXHk= +github.com/gomodule/redigo v1.8.2/go.mod h1:P9dn9mFrCBvWhGE1wpxx6fgq7BAeLBk+UUUzlpkBYO0= github.com/gomodule/redigo v1.8.3/go.mod h1:P9dn9mFrCBvWhGE1wpxx6fgq7BAeLBk+UUUzlpkBYO0= github.com/google/btree v0.0.0-20180124185431-e89373fe6b4a/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= +github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= github.com/google/certificate-transparency-go v1.0.21 h1:Yf1aXowfZ2nuboBsg7iYGLmwsOARdV86pfH3g95wXmE= github.com/google/certificate-transparency-go v1.0.21/go.mod h1:QeJfpSbVSfYc7RgB3gJFj9cbuQMMchQxrWXz8Ruopmg= github.com/google/crfs v0.0.0-20191108021818-71d77da419c9/go.mod h1:etGhoOqfwPkooV6aqoX3eBGQOJblqdoc9XvWOeuxpPw= @@ -976,6 +1024,9 @@ github.com/googleapis/gnostic v0.1.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTV github.com/googleapis/gnostic v0.2.2/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.4.1 h1:DLJCy1n/vrD4HPjOvYcT8aYQXpPIzoRZONaYwyycI+I= github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= +github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= +github.com/googleapis/gnostic v0.5.5 h1:9fHAtK0uDfpveeqqo1hkEZJcFvYXAiCN3UutL8F9xHw= +github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA= github.com/gookit/color v1.2.4/go.mod h1:AhIE+pS6D4Ql0SQWbBeXPHw7gY0/sjHoA4s/n1KB7xg= github.com/gookit/color v1.3.5/go.mod h1:GqqLKF1le3EfrbHbYsYa5WdLqfc/PHMdMRbt6tMnqIc= github.com/gookit/color v1.3.7 h1:wtJz526qll4+TxVcUUaMJOzrXDCiPr6jlyB5VSOBd2U= @@ -1015,6 +1066,8 @@ github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmg github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.2.0 h1:0IKlLyQ3Hs9nDaiK5cSHAGmcQEIC8l2Ts1u6x5Dfrqg= github.com/grpc-ecosystem/go-grpc-middleware v1.2.0/go.mod h1:mJzapYve32yjrKlk9GbyCZHuPgZsrbyIbyKhSzOpg6s= +github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= +github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.5.0/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= github.com/grpc-ecosystem/grpc-gateway v1.6.2/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= @@ -1155,6 +1208,7 @@ github.com/joefitzgerald/rainbow-reporter v0.1.0/go.mod h1:481CNgqmVHQZzdIbN52Cu github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc= github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/jpillora/backoff v0.0.0-20180909062703-3050d21c67d7/go.mod h1:2iMrUgbbvHEiQClaW2NsSzMyGHqN+rDFqY705q49KG0= @@ -1182,6 +1236,7 @@ github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 h1:iQTw/8FWTuc7uia github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8= github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4= github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= +github.com/karrick/godirwalk v1.15.8/go.mod h1:j4mkqPuvaLI8mp1DroR3P6ad7cyYd4c1qeJ3RV7ULlk= github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd h1:Coekwdh0v2wtGp9Gmz1Ze3eVRAWJMLokvN3QjdzCHLY= github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351 h1:DowS9hvgyYSX4TO5NpyC606/Z4SxnNYbT+WX27or6Ck= @@ -1219,6 +1274,7 @@ github.com/klauspost/reedsolomon v1.9.11/go.mod h1:nLvuzNvy1ZDNQW30IuMc2ZWCbiqrJ github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kortschak/utter v1.0.1/go.mod h1:vSmSjbyrlKjjsL71193LmzBOKgwePk9DH6uFaWHIInc= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= @@ -1271,7 +1327,9 @@ github.com/manifoldco/promptui v0.8.0 h1:R95mMF+McvXZQ7j1g8ucVZE1gLP3Sv6j9vlF9ky github.com/manifoldco/promptui v0.8.0/go.mod h1:n4zTdgP0vr0S3w7/O/g98U+e0gwLScEXGwov2nIKuGQ= github.com/maorfr/helm-plugin-utils v0.0.0-20200827170302-51b70049c73f/go.mod h1:2kexG48txGH8ZZfckCcl006XNZHFHjkQLjzOi/+U9dM= github.com/maratori/testpackage v1.0.1/go.mod h1:ddKdw+XG0Phzhx8BFDTKgpWP4i7MpApTE5fXSKAqwDU= +github.com/markbates/errx v1.1.0/go.mod h1:PLa46Oex9KNbVDZhKel8v1OT7hD5JZ2eI7AHhA0wswc= github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= +github.com/markbates/oncer v1.0.0/go.mod h1:Z59JA581E9GP6w96jai+TGqafHPW+cPfRxz2aSZ0mcI= github.com/markbates/pkger v0.17.1/go.mod h1:0JoVlrol20BSywW79rN3kdFFsE5xYM+rSCQDXbLhiuI= github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= github.com/marstr/guid v1.1.0/go.mod h1:74gB1z2wpxxInTG6yaqA7KrtM0NZ+RbrcqDvYHefzho= @@ -1296,10 +1354,12 @@ github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOA github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-oci8 v0.0.7/go.mod h1:wjDx6Xm9q7dFtHJvIlrI99JytznLw5wQ4R+9mNXJwGI= +github.com/mattn/go-oci8 v0.1.1/go.mod h1:wjDx6Xm9q7dFtHJvIlrI99JytznLw5wQ4R+9mNXJwGI= github.com/mattn/go-runewidth v0.0.1/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= +github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-shellwords v1.0.3/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= @@ -1339,6 +1399,7 @@ github.com/minio/sio v0.2.1/go.mod h1:8b0yPp2avGThviy/+OCJBI6OMpvxoUuiLvE6F1lebh github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible h1:aKW/4cBs+yK6gpqU3K/oIwk9Q/XICqd3zOX/UFuvqmk= github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible/go.mod h1:8AuVvqP/mXw1px98n46wfvcGfQ4ci2FwoAjKYxuo3Z4= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/cli v1.1.2/go.mod h1:6iaV0fGdElS6dPBx0EApTxHrcWvmJphyh2n8YBLPPZ4= github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= github.com/mitchellh/copystructure v1.1.1 h1:Bp6x9R1Wn16SIz3OfeDr0b7RnCG2OB66Y7PQyC/cvq4= github.com/mitchellh/copystructure v1.1.1/go.mod h1:EBArHfARyrSWO/+Wyr9zwEkc6XMFB9XyNgFNmRkZZU4= @@ -1383,6 +1444,7 @@ github.com/moby/sys/symlink v0.1.0/go.mod h1:GGDODQmbFOjFsXvfLVn3+ZRxkch54RkSiGq github.com/moby/term v0.0.0-20200312100748-672ec06f55cd/go.mod h1:DdlQx2hp0Ss5/fLikoLlEeIYiATotOjgB//nb973jeo= github.com/moby/term v0.0.0-20200915141129-7f0af18e79f2/go.mod h1:TjQg8pa4iejrUrjiz0MCtMV38jdMNW4doKSiBrEvCQQ= github.com/moby/term v0.0.0-20201216013528-df9cb8a40635/go.mod h1:FBS0z0QWA44HXygs7VXDUOGoN/1TV3RuWkLO04am3wc= +github.com/moby/term v0.0.0-20210610120745-9d4ed1856297/go.mod h1:vgPCkQMyxTZ7IDy8SXRufE172gr8+K/JE/7hHFxHW3A= github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 h1:dcztxKSvZ4Id8iPpHERQBbIJfabdt4wUm5qy3wOL2Zc= github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -1451,6 +1513,7 @@ github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:v github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/olekukonko/tablewriter v0.0.2/go.mod h1:rSAaSIOAGT9odnlyGlUfAJaoc5w2fSBUmeGDbRWPxyQ= github.com/olekukonko/tablewriter v0.0.4/go.mod h1:zq6QwlOf5SlnkVbMSr5EoBv3636FWnp+qbPhuoO21uA= +github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/olivere/elastic/v7 v7.0.22/go.mod h1:VDexNy9NjmtAkrjNoI7tImv7FR4tf5zUA3ickqu5Pc8= github.com/onsi/ginkgo v0.0.0-20151202141238-7f8ab55aaf3b/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -1462,6 +1525,7 @@ github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+ github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/gomega v0.0.0-20151007035656-2152b45fa28a/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= @@ -1588,6 +1652,8 @@ github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP github.com/prometheus/client_golang v1.8.0/go.mod h1:O9VU6huf47PktckDQfMTX0Y8tY0/7TSWwj+ITvv0TnM= github.com/prometheus/client_golang v1.9.0 h1:Rrch9mh17XcxvEu9D9DEpb4isxjGBtcevQjKvxPRQIU= github.com/prometheus/client_golang v1.9.0/go.mod h1:FqZLKOZnGdFAhOK4nqGHa7D66IdsO+O441Eve7ptJDU= +github.com/prometheus/client_golang v1.11.0 h1:HNkLOAEQMIDv/K+04rukrLx6ch7msSRwf3/SASFAGtQ= +github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_model v0.0.0-20171117100541-99fa1f4be8e5/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= @@ -1609,6 +1675,8 @@ github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB8 github.com/prometheus/common v0.14.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= github.com/prometheus/common v0.15.0 h1:4fgOnadei3EZvgRwxJ7RMpG1k1pOZth5Pc13tyspaKM= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= +github.com/prometheus/common v0.26.0 h1:iMAkS2TDoNWnKM+Kopnx/8tnEStIfpYA0ur0xQzzhMQ= +github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/procfs v0.0.0-20180125133057-cb4147076ac7/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= @@ -1650,6 +1718,8 @@ github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= github.com/rubenv/sql-migrate v0.0.0-20190212093014-1007f53448d7/go.mod h1:WS0rl9eEliYI8DPnr3TOwz4439pay+qNgzJoVya/DmY= github.com/rubenv/sql-migrate v0.0.0-20200616145509-8d140a17f351 h1:HXr/qUllAWv9riaI4zh2eXWKmCSDqVS/XH1MRHLKRwk= github.com/rubenv/sql-migrate v0.0.0-20200616145509-8d140a17f351/go.mod h1:DCgfY80j8GYL7MLEfvcpSFvjD0L5yZq/aZUJmhZklyg= +github.com/rubenv/sql-migrate v0.0.0-20210614095031-55d5740dbbcc h1:BD7uZqkN8CpjJtN/tScAKiccBikU4dlqe/gNrkRaPY4= +github.com/rubenv/sql-migrate v0.0.0-20210614095031-55d5740dbbcc/go.mod h1:HFLT6i9iR4QBOF5rdCyjddC9t59ArqWJV2xx+jwcCMo= github.com/rubiojr/go-vhd v0.0.0-20160810183302-0bfd3b39853c/go.mod h1:DM5xW0nvfNNm2uytzsvhI3OnX8uzaRAg8UX/CnDqbto= github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= @@ -1711,6 +1781,7 @@ github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9 github.com/smartystreets/gunit v1.0.0/go.mod h1:qwPWnhz6pn0NnRBP++URONOVyNkPyr4SauJk4cUOwJs= github.com/smartystreets/gunit v1.4.2/go.mod h1:ZjM1ozSIMJlAz/ay4SG8PeKF00ckUp+zMHZXV9/bvak= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= github.com/sourcegraph/go-diff v0.5.1/go.mod h1:j2dHj3m8aZgQO8lMTcTnBcXkRRRqi34cd2MNlA9u1mE= github.com/sourcegraph/go-diff v0.5.3/go.mod h1:v9JDtjCE4HHHCZGId75rg8gkKKa98RVjBcBGsVmMmak= @@ -1727,6 +1798,7 @@ github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkU github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= +github.com/spf13/cobra v0.0.6/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= @@ -1749,6 +1821,7 @@ github.com/spf13/viper v1.8.1 h1:Kq1fyeebqsBfbjZj4EL7gj2IO0mMaiyjYUWcUsl2O44= github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= github.com/stefanberger/go-pkcs11uri v0.0.0-20201008174630-78d3cae3a980 h1:lIOOHPEbXzO3vnmx2gok1Tfs31Q8GQqKLc8vVqyQq/I= github.com/stefanberger/go-pkcs11uri v0.0.0-20201008174630-78d3cae3a980/go.mod h1:AO3tvPzVZ/ayst6UlUKUv6rcPQInYe3IknH3jYhAKu8= +github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v1.0.0/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= @@ -1799,6 +1872,7 @@ github.com/tj/go-kinesis v0.0.0-20171128231115-08b17f58cb1b/go.mod h1:/yhzCV0xPf github.com/tj/go-spin v1.1.0/go.mod h1:Mg1mzmePZm4dva8Qz60H2lHwmJ2loum4VIrLgVnKwh4= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tommy-muehle/go-mnd v1.1.1/go.mod h1:dSUh0FtTP8VhvkL1S+gUR1OKd9ZnSaozuI6r3m6wOig= github.com/tommy-muehle/go-mnd v1.3.1-0.20200224220436-e6f9a994e8fa/go.mod h1:dSUh0FtTP8VhvkL1S+gUR1OKd9ZnSaozuI6r3m6wOig= github.com/tonistiigi/fsutil v0.0.0-20201103201449-0834f99b7b85 h1:014iQD8i8EabPWK2XgUuOTxg5s2nhfDmq6GupskfUO8= @@ -1856,6 +1930,8 @@ github.com/werf/helm/v3 v3.0.0-20210831144243-7dcadcc35336 h1:jNpooQx5IR/oFGDqLA github.com/werf/helm/v3 v3.0.0-20210831144243-7dcadcc35336/go.mod h1:mIIus8EOqj+obtycw3sidsR4ORr2aFDmXMSI3k+oeVY= github.com/werf/helm/v3 v3.0.0-20211026074935-16d6048b0f73 h1:ZEzBUf6e0Qbg7oKG0cvEgPf6C6qLZpCk8uf/QgfyrjA= github.com/werf/helm/v3 v3.0.0-20211026074935-16d6048b0f73/go.mod h1:mIIus8EOqj+obtycw3sidsR4ORr2aFDmXMSI3k+oeVY= +github.com/werf/helm/v3 v3.0.0-20211029164334-9da46b8bb260 h1:cuUWardFsAoldMCewseHtyTTbuzV2lPjfjUxPFxRmPQ= +github.com/werf/helm/v3 v3.0.0-20211029164334-9da46b8bb260/go.mod h1:3eOeBD3Z+O/ELiuu19zynZSN8jP1ErXLuyP21SZeMq8= github.com/werf/kubedog v0.6.3-0.20210917123541-e7a881ef7261 h1:EygQrvgiNi9QqnhHETAf1XnERiILQ0cZYju2TV69tdM= github.com/werf/kubedog v0.6.3-0.20210917123541-e7a881ef7261/go.mod h1:QQZtZEKQf9HMKjMkbkrrwX9VDf5XKsn4TVmbWjsHn7M= github.com/werf/kubedog v0.6.3-0.20211012155517-f9f20ac58fad h1:teC4uNgoT7KQx+EIHNS/jijWGkg/EJruU9p3vf3gGhw= @@ -1929,6 +2005,10 @@ go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489/go.mod h1:yVHk9ub3C go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= +go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lLS/oTh0= +go.etcd.io/etcd/pkg/v3 v3.5.0/go.mod h1:UzJGatBQ1lXChBkQF0AuAtkRQMYnHubxAEYIrC3MSsE= +go.etcd.io/etcd/raft/v3 v3.5.0/go.mod h1:UFOHSIvO/nKwd4lhkwabrTD3cqW5yVyYYf/KlD00Szc= +go.etcd.io/etcd/server/v3 v3.5.0/go.mod h1:3Ah5ruV+M+7RZr0+Y/5mNLwC+eQlni+mQmOVdCRJoS4= go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.1.2 h1:jxcFYjlkl8xaERsgLo+RNquI0epW6zuy/ZRQs6jnrFA= @@ -1951,6 +2031,18 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.opentelemetry.io/contrib v0.20.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUzl5H4LY0Kc= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0/go.mod h1:oVGt1LRbBOBq1A5BQLlUg9UaU/54aiHw8cgjV3aWZ/E= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0/go.mod h1:2AboqHi0CiIZU0qwhtUfCYD1GeUzvvIXWNkhDt7ZMG4= +go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzoxm/dooo= +go.opentelemetry.io/otel/exporters/otlp v0.20.0/go.mod h1:YIieizyaN77rtLJra0buKiNBOm9XQfkPEKBeuhoMwAM= +go.opentelemetry.io/otel/metric v0.20.0/go.mod h1:598I5tYlH1vzBjn+BTuhzTCSb/9debfNp6R3s7Pr1eU= +go.opentelemetry.io/otel/oteltest v0.20.0/go.mod h1:L7bgKf9ZB7qCwT9Up7i9/pn0PWIa9FqQ2IQ8LoxiGnw= +go.opentelemetry.io/otel/sdk v0.20.0/go.mod h1:g/IcepuwNsoiX5Byy2nNV0ySUF1em498m7hBWC279Yc= +go.opentelemetry.io/otel/sdk/export/metric v0.20.0/go.mod h1:h7RBNMsDJ5pmI1zExLi+bJK+Dr8NQCh0qGhm1KDnNlE= +go.opentelemetry.io/otel/sdk/metric v0.20.0/go.mod h1:knxiS8Xd4E/N+ZqKmUPf3gTTZ4/0TjTXukfxjzSTpHE= +go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw= +go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 h1:+FNtrFTmVw0YZGpBGX56XDee331t6JAXeK2bcyhLOOc= go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5/go.mod h1:nmDLcffg48OtT/PSW0Hg7FvpRQsQh5OSqIylirxKC7o= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= @@ -1958,6 +2050,7 @@ go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= @@ -1995,9 +2088,11 @@ golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191002192127-34f69633bfdc/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191122220453-ac88ee75c92c/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20191205180655-e7c4368fe9dd/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200117160349-530e935923ad/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200128174031-69ecbb4d6d5d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -2015,6 +2110,7 @@ golang.org/x/crypto v0.0.0-20201124201722-c8d3bf9c5392/go.mod h1:jdWPYTVW3xRLrWP golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97 h1:/UOmuWzQfxxo9UtlXMwuQU8CMgg1eZXqTRwkSQJWKOI= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -2114,6 +2210,7 @@ golang.org/x/net v0.0.0-20201006153459-a7d1128ccaa0/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20201216054612-986b41b23924/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= @@ -2125,6 +2222,8 @@ golang.org/x/net v0.0.0-20210326060303-6b1517762897/go.mod h1:uSPa2vr4CLtc/ILN5o golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781 h1:DzZ89McO9/gWPsQXS/FVKAlG02ZjaQ6AlZRBimEYOd0= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= +golang.org/x/net v0.0.0-20210520170846-37e1c6afe023 h1:ADo5wSpq2gqaCGQWzk7S5vd//0iyyLeAratkEoG5dLE= +golang.org/x/net v0.0.0-20210520170846-37e1c6afe023/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/oauth2 v0.0.0-20180724155351-3d292e4d0cdc/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -2233,6 +2332,7 @@ golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -2274,6 +2374,7 @@ golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210426230700-d19ff857e887/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210502180810-71e4cd670f79/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -2303,6 +2404,8 @@ golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba h1:O8mE0/t419eoIwhTFpKVkHiTs/Igowgfkj25AcZrtiE= golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac h1:7zkz7BUtwNFFqcowJ+RIgu2MaV/MapERkDIy+mwPyjs= +golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -2373,6 +2476,7 @@ golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200308013534-11ec41452d41/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200324003944-a576cf524670/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= @@ -2485,6 +2589,7 @@ google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= @@ -2496,6 +2601,7 @@ google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= @@ -2537,6 +2643,7 @@ google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA5 google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.38.0 h1:/9BgsAsa5nWe26HqOlvlgJnqBuktYOLCgjCPqsa56W0= google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= @@ -2650,9 +2757,13 @@ k8s.io/api v0.20.4/go.mod h1:++lNL1AJMkDymriNniQsWRkMDzRaX2Y/POTUi8yvqYQ= k8s.io/api v0.20.6/go.mod h1:X9e8Qag6JV/bL5G6bU8sdVRltWKmdHsFUGS3eVndqE8= k8s.io/api v0.21.0 h1:gu5iGF4V6tfVCQ/R+8Hc0h7H1JuEhzyEi9S4R5LM8+Y= k8s.io/api v0.21.0/go.mod h1:+YbrhBBGgsxbF6o6Kj4KJPJnBmAKuXDeS3E18bgHNVU= +k8s.io/api v0.22.1 h1:ISu3tD/jRhYfSW8jI/Q1e+lRxkR7w9UwQEZ7FgslrwY= +k8s.io/api v0.22.1/go.mod h1:bh13rkTp3F1XEaLGykbyRD2QaTTzPm0e/BMd8ptFONY= k8s.io/apiextensions-apiserver v0.18.6/go.mod h1:lv89S7fUysXjLZO7ke783xOwVTm6lKizADfvUM/SS/M= k8s.io/apiextensions-apiserver v0.21.0 h1:Nd4uBuweg6ImzbxkC1W7xUNZcCV/8Vt10iTdTIVF3hw= k8s.io/apiextensions-apiserver v0.21.0/go.mod h1:gsQGNtGkc/YoDG9loKI0V+oLZM4ljRPjc/sql5tmvzc= +k8s.io/apiextensions-apiserver v0.22.1 h1:YSJYzlFNFSfUle+yeEXX0lSQyLEoxoPJySRupepb0gE= +k8s.io/apiextensions-apiserver v0.22.1/go.mod h1:HeGmorjtRmRLE+Q8dJu6AYRoZccvCMsghwS8XTUYb2c= k8s.io/apimachinery v0.0.0-20180904193909-def12e63c512/go.mod h1:ccL7Eh7zubPUSh9A3USN90/OzHNSVN6zxzde07TDCL0= k8s.io/apimachinery v0.0.0-20191004115801-a2eda9f80ab8/go.mod h1:llRdnznGEAqC3DcNm6yEj472xaFVfLM7hnYofMb12tQ= k8s.io/apimachinery v0.17.4/go.mod h1:gxLnyZcGNdZTCLnq3fgzyg2A5BVCHTNDFrw8AmuJ+0g= @@ -2665,6 +2776,8 @@ k8s.io/apimachinery v0.20.4/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRp k8s.io/apimachinery v0.20.6/go.mod h1:ejZXtW1Ra6V1O5H8xPBGz+T3+4gfkTCeExAHKU57MAc= k8s.io/apimachinery v0.21.0 h1:3Fx+41if+IRavNcKOz09FwEXDBG6ORh6iMsTSelhkMA= k8s.io/apimachinery v0.21.0/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= +k8s.io/apimachinery v0.22.1 h1:DTARnyzmdHMz7bFWFDDm22AM4pLWTQECMpRTFu2d2OM= +k8s.io/apimachinery v0.22.1/go.mod h1:O3oNtNadZdeOMxHFVxOreoznohCpy0z6mocxbZr7oJ0= k8s.io/apiserver v0.17.4/go.mod h1:5ZDQ6Xr5MNBxyi3iUZXS84QOhZl+W7Oq2us/29c0j9I= k8s.io/apiserver v0.18.6/go.mod h1:Zt2XvTHuaZjBz6EFYzpp+X4hTmgWGy8AthNVnTdm3Wg= k8s.io/apiserver v0.20.1/go.mod h1:ro5QHeQkgMS7ZGpvf4tSMx6bBOgPfE+f52KwvXfScaU= @@ -2672,10 +2785,14 @@ k8s.io/apiserver v0.20.4/go.mod h1:Mc80thBKOyy7tbvFtB4kJv1kbdD0eIH8k8vianJcbFM= k8s.io/apiserver v0.20.6/go.mod h1:QIJXNt6i6JB+0YQRNcS0hdRHJlMhflFmsBDeSgT1r8Q= k8s.io/apiserver v0.21.0 h1:1hWMfsz+cXxB77k6/y0XxWxwl6l9OF26PC9QneUVn1Q= k8s.io/apiserver v0.21.0/go.mod h1:w2YSn4/WIwYuxG5zJmcqtRdtqgW/J2JRgFAqps3bBpg= +k8s.io/apiserver v0.22.1 h1:Ul9Iv8OMB2s45h2tl5XWPpAZo1VPIJ/6N+MESeed7L8= +k8s.io/apiserver v0.22.1/go.mod h1:2mcM6dzSt+XndzVQJX21Gx0/Klo7Aen7i0Ai6tIa400= k8s.io/cli-runtime v0.18.6/go.mod h1:+G/WTNqHgUv636e5y7rhOQ7epUbRXnwmPnhOhD6t9uM= k8s.io/cli-runtime v0.20.2/go.mod h1:FjH6uIZZZP3XmwrXWeeYCbgxcrD6YXxoAykBaWH0VdM= k8s.io/cli-runtime v0.21.0 h1:/V2Kkxtf6x5NI2z+Sd/mIrq4FQyQ8jzZAUD6N5RnN7Y= k8s.io/cli-runtime v0.21.0/go.mod h1:XoaHP93mGPF37MkLbjGVYqg3S1MnsFdKtiA/RZzzxOo= +k8s.io/cli-runtime v0.22.1 h1:WIueieKvT+IiSVSFosRLI6rkM0tyBGEGH1WUEztVjho= +k8s.io/cli-runtime v0.22.1/go.mod h1:YqwGrlXeEk15Yn3em2xzr435UGwbrCw5x+COQoTYfoo= k8s.io/client-go v0.0.0-20180910083459-2cefa64ff137/go.mod h1:7vJpHMYJwNQCWgzmNV+VYUl1zCObLyodBc8nIyt8L5s= k8s.io/client-go v0.0.0-20191016111102-bec269661e48/go.mod h1:hrwktSwYGI4JK+TJA3dMaFyyvHVi/aLarVHpbs8bgCU= k8s.io/client-go v0.17.4/go.mod h1:ouF6o5pz3is8qU0/qYL2RnoxOPqgfuidYLowytyLJmc= @@ -2687,12 +2804,15 @@ k8s.io/client-go v0.20.4/go.mod h1:LiMv25ND1gLUdBeYxBIwKpkSC5IsozMMmOOeSJboP+k= k8s.io/client-go v0.20.6/go.mod h1:nNQMnOvEUEsOzRRFIIkdmYOjAZrC8bgq0ExboWSU1I0= k8s.io/client-go v0.21.0 h1:n0zzzJsAQmJngpC0IhgFcApZyoGXPrDIAD601HD09ag= k8s.io/client-go v0.21.0/go.mod h1:nNBytTF9qPFDEhoqgEPaarobC8QPae13bElIVHzIglA= +k8s.io/client-go v0.22.1 h1:jW0ZSHi8wW260FvcXHkIa0NLxFBQszTlhiAVsU5mopw= +k8s.io/client-go v0.22.1/go.mod h1:BquC5A4UOo4qVDUtoc04/+Nxp1MeHcVc1HJm1KmG8kk= k8s.io/cloud-provider v0.17.4/go.mod h1:XEjKDzfD+b9MTLXQFlDGkk6Ho8SGMpaU8Uugx/KNK9U= k8s.io/code-generator v0.17.2/go.mod h1:DVmfPQgxQENqDIzVR2ddLXMH34qeszkKSdH/N+s+38s= k8s.io/code-generator v0.18.6/go.mod h1:TgNEVx9hCyPGpdtCWA34olQYLkh3ok9ar7XfSsr8b6c= k8s.io/code-generator v0.19.7/go.mod h1:lwEq3YnLYb/7uVXLorOJfxg+cUu2oihFhHZ0n9NIla0= k8s.io/code-generator v0.20.4/go.mod h1:UsqdF+VX4PU2g46NC2JRs4gc+IfrctnwHb76RNbWHJg= k8s.io/code-generator v0.21.0/go.mod h1:hUlps5+9QaTrKx+jiM4rmq7YmH8wPOIko64uZCHDh6Q= +k8s.io/code-generator v0.22.1/go.mod h1:eV77Y09IopzeXOJzndrDyCI88UBok2h6WxAlBwpxa+o= k8s.io/component-base v0.17.4/go.mod h1:5BRqHMbbQPm2kKu35v3G+CpVq4K0RJKC7TRioF0I9lE= k8s.io/component-base v0.18.6/go.mod h1:knSVsibPR5K6EW2XOjEHik6sdU5nCvKMrzMt2D4In14= k8s.io/component-base v0.20.1/go.mod h1:guxkoJnNoh8LNrbtiQOlyp2Y2XFCZQmrcg2n/DeYNLk= @@ -2700,7 +2820,10 @@ k8s.io/component-base v0.20.4/go.mod h1:t4p9EdiagbVCJKrQ1RsA5/V4rFQNDfRlevJajlGw k8s.io/component-base v0.20.6/go.mod h1:6f1MPBAeI+mvuts3sIdtpjljHWBQ2cIy38oBIWMYnrM= k8s.io/component-base v0.21.0 h1:tLLGp4BBjQaCpS/KiuWh7m2xqvAdsxLm4ATxHSe5Zpg= k8s.io/component-base v0.21.0/go.mod h1:qvtjz6X0USWXbgmbfXR+Agik4RZ3jv2Bgr5QnZzdPYw= +k8s.io/component-base v0.22.1 h1:SFqIXsEN3v3Kkr1bS6rstrs1wd45StJqbtgbQ4nRQdo= +k8s.io/component-base v0.22.1/go.mod h1:0D+Bl8rrnsPN9v0dyYvkqFfBeAd4u7n77ze+p8CMiPo= k8s.io/component-helpers v0.21.0/go.mod h1:tezqefP7lxfvJyR+0a+6QtVrkZ/wIkyMLK4WcQ3Cj8U= +k8s.io/component-helpers v0.22.1/go.mod h1:QvBcDbX+qU5I2tMZABBF5fRwAlQwiv771IGBHK9WYh4= k8s.io/cri-api v0.17.3/go.mod h1:X1sbHmuXhwaHs9xxYffLqJogVsnI+f6cPRcgPel7ywM= k8s.io/cri-api v0.20.1/go.mod h1:2JRbKt+BFLTjtrILYVqQK5jqhI+XNdF6UiGMgczeBCI= k8s.io/cri-api v0.20.4/go.mod h1:2JRbKt+BFLTjtrILYVqQK5jqhI+XNdF6UiGMgczeBCI= @@ -2723,6 +2846,8 @@ k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.8.0 h1:Q3gmuM9hKEjefWFFYF0Mat+YyFJvsUyYuwyNNJ5C9Ts= k8s.io/klog/v2 v2.8.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= +k8s.io/klog/v2 v2.9.0 h1:D7HV+n1V57XeZ0m6tdRkfknthUaM06VFbWldOFh8kzM= +k8s.io/klog/v2 v2.9.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= k8s.io/kube-openapi v0.0.0-20180731170545-e3762e86a74c/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc= k8s.io/kube-openapi v0.0.0-20190816220812-743ec37842bf/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= @@ -2731,14 +2856,19 @@ k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM= k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7 h1:vEx13qjvaZ4yfObSSXW7BrMc/KQBBT/Jyee8XtLf4x0= k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iLV8FpR2uDvrFyomxbtb1KivDbvPTE= +k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e h1:KLHHjkdQFomZy8+06csTWZ0m1343QqxZhR2LJ1OxCYM= +k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw= k8s.io/kubectl v0.18.6/go.mod h1:3TLzFOrF9h4mlRPAvdNkDbs5NWspN4e0EnPnEB41CGo= k8s.io/kubectl v0.21.0 h1:WZXlnG/yjcE4LWO2g6ULjFxtzK6H1TKzsfaBFuVIhNg= k8s.io/kubectl v0.21.0/go.mod h1:EU37NukZRXn1TpAkMUoy8Z/B2u6wjHDS4aInsDzVvks= +k8s.io/kubectl v0.22.1 h1:kpXO+ajPNTzAVLDM9pAzCsWH9MtCMr92zpcvXMt7P6E= +k8s.io/kubectl v0.22.1/go.mod h1:mjAOgEbMNMtZWxnfM6jd+nPjPsaoLqO5xanc78WcSbw= k8s.io/kubernetes v1.11.10/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= k8s.io/legacy-cloud-providers v0.17.4/go.mod h1:FikRNoD64ECjkxO36gkDgJeiQWwyZTuBkhu+yxOc1Js= k8s.io/metrics v0.18.6/go.mod h1:iAwGeabusQNO3duHDM7BBExTUB8L+iq8PM7N9EtQw6g= k8s.io/metrics v0.21.0/go.mod h1:L3Ji9EGPP1YBbfm9sPfEXSpnj8i24bfQbAFAsW0NueQ= +k8s.io/metrics v0.22.1/go.mod h1:i/ZNap89UkV1gLa26dn7fhKAdheJaKy+moOqJbiif7E= k8s.io/utils v0.0.0-20190801114015-581e00157fb1/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= @@ -2746,6 +2876,8 @@ k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/ k8s.io/utils v0.0.0-20200731180307-f00132d28269/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20201110183641-67b214c5f920 h1:CbnUZsM497iRC5QMVkHwyl8s2tB3g7yaSHkYPkpgelw= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20210707171843-4b05e18ac7d9 h1:imL9YgXQ9p7xmPzHFm/vVd/cF78jad+n4wK1ABwYtMM= +k8s.io/utils v0.0.0-20210707171843-4b05e18ac7d9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw= modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk= modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k= @@ -2757,6 +2889,8 @@ mvdan.cc/unparam v0.0.0-20190720180237-d51796306d8f/go.mod h1:4G1h5nDURzA3bwVMZI mvdan.cc/unparam v0.0.0-20200501210554-b37ab49443f7/go.mod h1:HGC5lll35J70Y5v7vCGb9oLhHoScFwkHDJm/05RdSTc= mvdan.cc/xurls v1.1.0 h1:kj0j2lonKseISJCiq1Tfk+iTv65dDGCl0rTbanXJGGc= mvdan.cc/xurls v1.1.0/go.mod h1:TNWuhvo+IqbUCmtUIb/3LJSQdrzel8loVpgFm0HikbI= +oras.land/oras-go v0.4.0 h1:u6+7D+raZDYHwlz/uOwNANiRmyYDSSMW7A9E1xXycUQ= +oras.land/oras-go v0.4.0/go.mod h1:VJcU+VE4rkclUbum5C0O7deEZbBYnsnpbGSACwTjOcg= pack.ag/amqp v0.11.2/go.mod h1:4/cbmt4EJXSKlG6LCfWHoqmN0uFdy5i/+YFz+fTfhV4= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/letsencrypt v0.0.3 h1:H7xDfhkaFFSYEJlKeq38RwX2jYcnTeHuDQyT+mMNMwM= @@ -2767,14 +2901,21 @@ rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.7/go.mod h1:PHgbrJT7lCHcxMU+mDHEm+nx46H4zuuHZkDP6icnhu0= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.14/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.15/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.22/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= sigs.k8s.io/kustomize v2.0.3+incompatible h1:JUufWFNlI44MdtnjUqVnvh29rR37PQFzPbLXqhyOyX0= sigs.k8s.io/kustomize v2.0.3+incompatible/go.mod h1:MkjgH3RdOWrievjo6c9T245dYlB5QeXV4WCbnt/PEpU= sigs.k8s.io/kustomize/api v0.8.5 h1:bfCXGXDAbFbb/Jv5AhMj2BB8a5VAJuuQ5/KU69WtDjQ= sigs.k8s.io/kustomize/api v0.8.5/go.mod h1:M377apnKT5ZHJS++6H4rQoCHmWtt6qTpp3mbe7p6OLY= +sigs.k8s.io/kustomize/api v0.8.11 h1:LzQzlq6Z023b+mBtc6v72N2mSHYmN8x7ssgbf/hv0H8= +sigs.k8s.io/kustomize/api v0.8.11/go.mod h1:a77Ls36JdfCWojpUqR6m60pdGY1AYFix4AH83nJtY1g= sigs.k8s.io/kustomize/cmd/config v0.9.7/go.mod h1:MvXCpHs77cfyxRmCNUQjIqCmZyYsbn5PyQpWiq44nW0= +sigs.k8s.io/kustomize/cmd/config v0.9.13/go.mod h1:7547FLF8W/lTaDf0BDqFTbZxM9zqwEJqCKN9sSR0xSs= sigs.k8s.io/kustomize/kustomize/v4 v4.0.5/go.mod h1:C7rYla7sI8EnxHE/xEhRBSHMNfcL91fx0uKmUlUhrBk= +sigs.k8s.io/kustomize/kustomize/v4 v4.2.0/go.mod h1:MOkR6fmhwG7hEDRXBYELTi5GSFcLwfqwzTRHW3kv5go= sigs.k8s.io/kustomize/kyaml v0.10.15 h1:dSLgG78KyaxN4HylPXdK+7zB3k7sW6q3IcCmcfKA+aI= sigs.k8s.io/kustomize/kyaml v0.10.15/go.mod h1:mlQFagmkm1P+W4lZJbJ/yaxMd8PqMRSC4cPcfUVt5Hg= +sigs.k8s.io/kustomize/kyaml v0.11.0 h1:9KhiCPKaVyuPcgOLJXkvytOvjMJLoxpjodiycb4gHsA= +sigs.k8s.io/kustomize/kyaml v0.11.0/go.mod h1:GNMwjim4Ypgp/MueD3zXHLRJEjz7RvtPae0AwlvEMFM= sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI= sigs.k8s.io/structured-merge-diff v1.0.1-0.20191108220359-b1b620dd3f06 h1:zD2IemQ4LmOcAumeiyDWXKUI2SO0NYDe3H6QGvPOVgU= sigs.k8s.io/structured-merge-diff v1.0.1-0.20191108220359-b1b620dd3f06/go.mod h1:/ULNhyfzRopfcjskuui0cTITekDduZ7ycKN3oUT9R18= @@ -2785,6 +2926,8 @@ sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK sigs.k8s.io/structured-merge-diff/v4 v4.0.3/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.1.0 h1:C4r9BgJ98vrKnnVCjwCSXcWjWe0NKcUQkmzDXZXGwH8= sigs.k8s.io/structured-merge-diff/v4 v4.1.0/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= +sigs.k8s.io/structured-merge-diff/v4 v4.1.2 h1:Hr/htKFmJEbtMgS/UD0N+gtgctAqz81t3nu+sPzynno= +sigs.k8s.io/structured-merge-diff/v4 v4.1.2/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.2.1-0.20210128145534-11e43d4a8b92 h1:+1N7jh6zMJeFMCYKdF265qwz9fPFEPii8YXqcLZ77sU= diff --git a/integration/suites/bundles/bundles_test.go b/integration/suites/bundles/bundles_test.go index f0b886f0a3..cfc6f1cc97 100644 --- a/integration/suites/bundles/bundles_test.go +++ b/integration/suites/bundles/bundles_test.go @@ -50,8 +50,6 @@ var _ = Describe("Bundles", func() { switch implementationName { case "dockerhub": Skip("Skip due to the unresolved issue: https://github.com/werf/werf/issues/3184") - case "github": - Skip("Skip due to the unresolved issue: https://github.com/werf/werf/issues/3188") case "quay": Skip("Skip due to the unresolved issue: https://github.com/werf/werf/issues/3182") } diff --git a/pkg/deploy/bundles/publish.go b/pkg/deploy/bundles/publish.go new file mode 100644 index 0000000000..91c8dcaa74 --- /dev/null +++ b/pkg/deploy/bundles/publish.go @@ -0,0 +1,49 @@ +package bundles + +import ( + "context" + "fmt" + "path/filepath" + + "github.com/werf/logboek" + "helm.sh/helm/v3/pkg/chart/loader" + + "github.com/werf/werf/pkg/deploy/bundles/registry" + "github.com/werf/werf/pkg/deploy/helm/chart_extender" +) + +func Publish(ctx context.Context, bundle *chart_extender.Bundle, bundleRef string, bundlesRegistryClient *registry.Client) error { + r, err := registry.ParseReference(bundleRef) + if err != nil { + return fmt.Errorf("error parsing bundle ref %q: %s", bundleRef, err) + } + + loader.GlobalLoadOptions = &loader.LoadOptions{} + + if err := logboek.Context(ctx).LogProcess("Saving bundle to the local chart helm cache").DoError(func() error { + path, err := filepath.Abs(bundle.Dir) + if err != nil { + return err + } + + ch, err := loader.Load(path) + if err != nil { + return fmt.Errorf("error loading chart %q: %s", path, err) + } + + if err := bundlesRegistryClient.SaveChart(ch, r); err != nil { + return fmt.Errorf("unable to save bundle to the local chart helm cache: %s", err) + } + return nil + }); err != nil { + return err + } + + if err := logboek.Context(ctx).LogProcess("Pushing bundle %q", bundleRef).DoError(func() error { + return bundlesRegistryClient.PushChart(r) + }); err != nil { + return err + } + + return nil +} diff --git a/pkg/deploy/bundles/pull.go b/pkg/deploy/bundles/pull.go new file mode 100644 index 0000000000..db8e738235 --- /dev/null +++ b/pkg/deploy/bundles/pull.go @@ -0,0 +1,50 @@ +package bundles + +import ( + "context" + "fmt" + + "helm.sh/helm/v3/pkg/chartutil" + + "github.com/werf/werf/pkg/deploy/bundles/registry" + + "github.com/werf/logboek" +) + +func Pull(ctx context.Context, bundleRef string, destDir string, bundlesRegistryClient *registry.Client) error { + r, err := registry.ParseReference(bundleRef) + if err != nil { + return err + } + + if err := logboek.Context(ctx).LogProcess("Pulling bundle %q", bundleRef).DoError(func() error { + return bundlesRegistryClient.PullChartToCache(r) + }); err != nil { + return err + } + + if err := logboek.Context(ctx).LogProcess("Exporting bundle %q", bundleRef).DoError(func() error { + ch, err := bundlesRegistryClient.LoadChart(r) + if err != nil { + return fmt.Errorf("unable to load pulled chart: %s", err) + } + + if destDir == "" { + err = chartutil.SaveDir(ch, "") + if err != nil { + return err + } + } else { + err = chartutil.SaveIntoDir(ch, destDir) + if err != nil { + return fmt.Errorf("unable to save chart into local destination directory %q: %s", destDir, err) + } + } + + return nil + }); err != nil { + return err + } + + return nil +} diff --git a/pkg/deploy/bundles/registry/authorizer.go b/pkg/deploy/bundles/registry/authorizer.go new file mode 100644 index 0000000000..918a999bad --- /dev/null +++ b/pkg/deploy/bundles/registry/authorizer.go @@ -0,0 +1,28 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package registry // import "helm.sh/helm/v3/internal/experimental/registry" + +import ( + "github.com/deislabs/oras/pkg/auth" +) + +type ( + // Authorizer handles registry auth operations + Authorizer struct { + auth.Client + } +) diff --git a/pkg/deploy/bundles/registry/cache.go b/pkg/deploy/bundles/registry/cache.go new file mode 100644 index 0000000000..5aca636680 --- /dev/null +++ b/pkg/deploy/bundles/registry/cache.go @@ -0,0 +1,368 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package registry // import "helm.sh/helm/v3/internal/experimental/registry" + +import ( + "bytes" + "encoding/json" + "fmt" + "io" + "io/ioutil" + "os" + "path/filepath" + "time" + + "github.com/containerd/containerd/content" + "github.com/containerd/containerd/errdefs" + orascontent "github.com/deislabs/oras/pkg/content" + digest "github.com/opencontainers/go-digest" + specs "github.com/opencontainers/image-spec/specs-go" + ocispec "github.com/opencontainers/image-spec/specs-go/v1" + "github.com/pkg/errors" + + "helm.sh/helm/v3/pkg/chart" + "helm.sh/helm/v3/pkg/chart/loader" + "helm.sh/helm/v3/pkg/chartutil" +) + +const ( + // CacheRootDir is the root directory for a cache + CacheRootDir = "cache" +) + +type ( + // Cache handles local/in-memory storage of Helm charts, compliant with OCI Layout + Cache struct { + debug bool + out io.Writer + rootDir string + ociStore *orascontent.OCIStore + memoryStore *orascontent.Memorystore + } + + // CacheRefSummary contains as much info as available describing a chart reference in cache + // Note: fields here are sorted by the order in which they are set in FetchReference method + CacheRefSummary struct { + Name string + Repo string + Tag string + Exists bool + Manifest *ocispec.Descriptor + Config *ocispec.Descriptor + ContentLayer *ocispec.Descriptor + Size int64 + Digest digest.Digest + CreatedAt time.Time + Chart *chart.Chart + } +) + +// NewCache returns a new OCI Layout-compliant cache with config +func NewCache(opts ...CacheOption) (*Cache, error) { + cache := &Cache{ + out: ioutil.Discard, + } + for _, opt := range opts { + opt(cache) + } + // validate + if cache.rootDir == "" { + return nil, errors.New("must set cache root dir on initialization") + } + return cache, nil +} + +// FetchReference retrieves a chart ref from cache +func (cache *Cache) FetchReference(ref *Reference) (*CacheRefSummary, error) { + if err := cache.init(); err != nil { + return nil, err + } + r := CacheRefSummary{ + Name: ref.FullName(), + Repo: ref.Repo, + Tag: ref.Tag, + } + for _, desc := range cache.ociStore.ListReferences() { + if desc.Annotations[ocispec.AnnotationRefName] == r.Name { + r.Exists = true + manifestBytes, err := cache.fetchBlob(&desc) + if err != nil { + return &r, err + } + var manifest ocispec.Manifest + err = json.Unmarshal(manifestBytes, &manifest) + if err != nil { + return &r, err + } + r.Manifest = &desc + r.Config = &manifest.Config + numLayers := len(manifest.Layers) + if numLayers != 1 { + return &r, errors.New( + fmt.Sprintf("manifest does not contain exactly 1 layer (total: %d)", numLayers)) + } + var contentLayer *ocispec.Descriptor + for _, layer := range manifest.Layers { + switch layer.MediaType { + case HelmChartContentLayerMediaType: + contentLayer = &layer + } + } + if contentLayer == nil { + return &r, errors.New( + fmt.Sprintf("manifest does not contain a layer with mediatype %s", HelmChartContentLayerMediaType)) + } + if contentLayer.Size == 0 { + return &r, errors.New( + fmt.Sprintf("manifest layer with mediatype %s is of size 0", HelmChartContentLayerMediaType)) + } + r.ContentLayer = contentLayer + info, err := cache.ociStore.Info(ctx(cache.out, cache.debug), contentLayer.Digest) + if err != nil { + return &r, err + } + r.Size = info.Size + r.Digest = info.Digest + r.CreatedAt = info.CreatedAt + contentBytes, err := cache.fetchBlob(contentLayer) + if err != nil { + return &r, err + } + ch, err := loader.LoadArchive(bytes.NewBuffer(contentBytes)) + if err != nil { + return &r, err + } + r.Chart = ch + } + } + return &r, nil +} + +// StoreReference stores a chart ref in cache +func (cache *Cache) StoreReference(ref *Reference, ch *chart.Chart) (*CacheRefSummary, error) { + if err := cache.init(); err != nil { + return nil, err + } + r := CacheRefSummary{ + Name: ref.FullName(), + Repo: ref.Repo, + Tag: ref.Tag, + Chart: ch, + } + existing, _ := cache.FetchReference(ref) + r.Exists = existing.Exists + config, _, err := cache.saveChartConfig(ch) + if err != nil { + return &r, err + } + r.Config = config + contentLayer, _, err := cache.saveChartContentLayer(ch) + if err != nil { + return &r, err + } + r.ContentLayer = contentLayer + info, err := cache.ociStore.Info(ctx(cache.out, cache.debug), contentLayer.Digest) + if err != nil { + return &r, err + } + r.Size = info.Size + r.Digest = info.Digest + r.CreatedAt = info.CreatedAt + manifest, _, err := cache.saveChartManifest(config, contentLayer) + if err != nil { + return &r, err + } + r.Manifest = manifest + return &r, nil +} + +// DeleteReference deletes a chart ref from cache +// TODO: garbage collection, only manifest removed +func (cache *Cache) DeleteReference(ref *Reference) (*CacheRefSummary, error) { + if err := cache.init(); err != nil { + return nil, err + } + r, err := cache.FetchReference(ref) + if err != nil || !r.Exists { + return r, err + } + cache.ociStore.DeleteReference(r.Name) + err = cache.ociStore.SaveIndex() + return r, err +} + +// ListReferences lists all chart refs in a cache +func (cache *Cache) ListReferences() ([]*CacheRefSummary, error) { + if err := cache.init(); err != nil { + return nil, err + } + var rr []*CacheRefSummary + for _, desc := range cache.ociStore.ListReferences() { + name := desc.Annotations[ocispec.AnnotationRefName] + if name == "" { + if cache.debug { + fmt.Fprintf(cache.out, "warning: found manifest without name: %s", desc.Digest.Hex()) + } + continue + } + ref, err := ParseReference(name) + if err != nil { + return rr, err + } + r, err := cache.FetchReference(ref) + if err != nil { + return rr, err + } + rr = append(rr, r) + } + return rr, nil +} + +// AddManifest provides a manifest to the cache index.json +func (cache *Cache) AddManifest(ref *Reference, manifest *ocispec.Descriptor) error { + if err := cache.init(); err != nil { + return err + } + cache.ociStore.AddReference(ref.FullName(), *manifest) + err := cache.ociStore.SaveIndex() + return err +} + +// Provider provides a valid containerd Provider +func (cache *Cache) Provider() content.Provider { + return content.Provider(cache.ociStore) +} + +// Ingester provides a valid containerd Ingester +func (cache *Cache) Ingester() content.Ingester { + return content.Ingester(cache.ociStore) +} + +// ProvideIngester provides a valid oras ProvideIngester +func (cache *Cache) ProvideIngester() orascontent.ProvideIngester { + return orascontent.ProvideIngester(cache.ociStore) +} + +// init creates files needed necessary for OCI layout store +func (cache *Cache) init() error { + if cache.ociStore == nil { + ociStore, err := orascontent.NewOCIStore(cache.rootDir) + if err != nil { + return err + } + cache.ociStore = ociStore + cache.memoryStore = orascontent.NewMemoryStore() + } + return nil +} + +// saveChartConfig stores the Chart.yaml as json blob and returns a descriptor +func (cache *Cache) saveChartConfig(ch *chart.Chart) (*ocispec.Descriptor, bool, error) { + configBytes, err := json.Marshal(ch.Metadata) + if err != nil { + return nil, false, err + } + configExists, err := cache.storeBlob(configBytes) + if err != nil { + return nil, configExists, err + } + descriptor := cache.memoryStore.Add("", HelmChartConfigMediaType, configBytes) + return &descriptor, configExists, nil +} + +// saveChartContentLayer stores the chart as tarball blob and returns a descriptor +func (cache *Cache) saveChartContentLayer(ch *chart.Chart) (*ocispec.Descriptor, bool, error) { + destDir := filepath.Join(cache.rootDir, ".build") + os.MkdirAll(destDir, 0755) + tmpFile, err := chartutil.Save(ch, destDir) + defer os.Remove(tmpFile) + if err != nil { + return nil, false, errors.Wrap(err, "failed to save") + } + contentBytes, err := ioutil.ReadFile(tmpFile) + if err != nil { + return nil, false, err + } + contentExists, err := cache.storeBlob(contentBytes) + if err != nil { + return nil, contentExists, err + } + descriptor := cache.memoryStore.Add("", HelmChartContentLayerMediaType, contentBytes) + return &descriptor, contentExists, nil +} + +// saveChartManifest stores the chart manifest as json blob and returns a descriptor +func (cache *Cache) saveChartManifest(config *ocispec.Descriptor, contentLayer *ocispec.Descriptor) (*ocispec.Descriptor, bool, error) { + manifest := ocispec.Manifest{ + Versioned: specs.Versioned{SchemaVersion: 2}, + Config: *config, + Layers: []ocispec.Descriptor{*contentLayer}, + } + manifestBytes, err := json.Marshal(manifest) + if err != nil { + return nil, false, err + } + manifestExists, err := cache.storeBlob(manifestBytes) + if err != nil { + return nil, manifestExists, err + } + descriptor := ocispec.Descriptor{ + MediaType: ocispec.MediaTypeImageManifest, + Digest: digest.FromBytes(manifestBytes), + Size: int64(len(manifestBytes)), + } + return &descriptor, manifestExists, nil +} + +// storeBlob stores a blob on filesystem +func (cache *Cache) storeBlob(blobBytes []byte) (bool, error) { + var exists bool + writer, err := cache.ociStore.Store.Writer(ctx(cache.out, cache.debug), + content.WithRef(digest.FromBytes(blobBytes).Hex())) + if err != nil { + return exists, err + } + _, err = writer.Write(blobBytes) + if err != nil { + return exists, err + } + err = writer.Commit(ctx(cache.out, cache.debug), 0, writer.Digest()) + if err != nil { + if !errdefs.IsAlreadyExists(err) { + return exists, err + } + exists = true + } + err = writer.Close() + return exists, err +} + +// fetchBlob retrieves a blob from filesystem +func (cache *Cache) fetchBlob(desc *ocispec.Descriptor) ([]byte, error) { + reader, err := cache.ociStore.ReaderAt(ctx(cache.out, cache.debug), *desc) + if err != nil { + return nil, err + } + defer reader.Close() + + bytes := make([]byte, desc.Size) + _, err = reader.ReadAt(bytes, 0) + if err != nil { + return nil, err + } + return bytes, nil +} diff --git a/pkg/deploy/bundles/registry/cache_opts.go b/pkg/deploy/bundles/registry/cache_opts.go new file mode 100644 index 0000000000..6851ae8075 --- /dev/null +++ b/pkg/deploy/bundles/registry/cache_opts.go @@ -0,0 +1,48 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package registry // import "helm.sh/helm/v3/internal/experimental/registry" + +import ( + "io" +) + +type ( + // CacheOption allows specifying various settings configurable by the user for overriding the defaults + // used when creating a new default cache + CacheOption func(*Cache) +) + +// CacheOptDebug returns a function that sets the debug setting on cache options set +func CacheOptDebug(debug bool) CacheOption { + return func(cache *Cache) { + cache.debug = debug + } +} + +// CacheOptWriter returns a function that sets the writer setting on cache options set +func CacheOptWriter(out io.Writer) CacheOption { + return func(cache *Cache) { + cache.out = out + } +} + +// CacheOptRoot returns a function that sets the root directory setting on cache options set +func CacheOptRoot(rootDir string) CacheOption { + return func(cache *Cache) { + cache.rootDir = rootDir + } +} diff --git a/pkg/deploy/bundles/registry/client.go b/pkg/deploy/bundles/registry/client.go new file mode 100644 index 0000000000..4df43fe388 --- /dev/null +++ b/pkg/deploy/bundles/registry/client.go @@ -0,0 +1,360 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package registry // import "helm.sh/helm/v3/internal/experimental/registry" + +import ( + "bytes" + "context" + "crypto/tls" + "fmt" + "io" + "io/ioutil" + "net/http" + "os" + "path/filepath" + "sort" + + "github.com/docker/cli/cli/config" + "github.com/docker/docker/pkg/homedir" + + auth "github.com/deislabs/oras/pkg/auth/docker" + "github.com/deislabs/oras/pkg/content" + "github.com/deislabs/oras/pkg/oras" + "github.com/gosuri/uitable" + ocispec "github.com/opencontainers/image-spec/specs-go/v1" + "github.com/pkg/errors" + + "helm.sh/helm/v3/pkg/chart" + "helm.sh/helm/v3/pkg/helmpath" +) + +const ( + // CredentialsFileBasename is the filename for auth credentials file + CredentialsFileBasename = "config.json" +) + +type ( + // Client works with OCI-compliant registries and local Helm chart cache + Client struct { + debug bool + insecure bool + // path to repository config file e.g. ~/.docker/config.json + credentialsFile string + out io.Writer + authorizer *Authorizer + resolver *Resolver + cache *Cache + } +) + +func getDefaultDockerConfigPath() string { + configDir := os.Getenv("DOCKER_CONFIG") + if configDir == "" { + return filepath.Join(homedir.Get(), ".docker", config.ConfigFileName) + } else { + return filepath.Join(configDir, config.ConfigFileName) + } +} + +// NewClient returns a new registry client with config +func NewClient(opts ...ClientOption) (*Client, error) { + client := &Client{ + out: ioutil.Discard, + } + for _, opt := range opts { + opt(client) + } + // set defaults if fields are missing + if client.credentialsFile == "" { + client.credentialsFile = helmpath.CachePath("registry", CredentialsFileBasename) + } + if client.authorizer == nil { + authClient, err := auth.NewClient(client.credentialsFile, getDefaultDockerConfigPath()) + if err != nil { + return nil, err + } + client.authorizer = &Authorizer{ + Client: authClient, + } + } + if client.resolver == nil { + httpClient := http.DefaultClient + if client.insecure { + httpClient.Transport = &http.Transport{ + TLSClientConfig: &tls.Config{ + InsecureSkipVerify: true, + }, + } + } + + resolver, err := client.authorizer.Resolver(context.Background(), httpClient, client.insecure) + if err != nil { + return nil, err + } + client.resolver = &Resolver{ + Resolver: resolver, + } + } + if client.cache == nil { + cache, err := NewCache( + CacheOptDebug(client.debug), + CacheOptWriter(client.out), + CacheOptRoot(helmpath.CachePath("registry", CacheRootDir)), + ) + if err != nil { + return nil, err + } + client.cache = cache + } + return client, nil +} + +// Login logs into a registry +func (c *Client) Login(hostname string, username string, password string, insecure bool) error { + err := c.authorizer.Login(ctx(c.out, c.debug), hostname, username, password, insecure) + if err != nil { + return err + } + fmt.Fprintf(c.out, "Login succeeded\n") + return nil +} + +// Logout logs out of a registry +func (c *Client) Logout(hostname string) error { + err := c.authorizer.Logout(ctx(c.out, c.debug), hostname) + if err != nil { + return err + } + fmt.Fprintln(c.out, "Logout succeeded") + return nil +} + +// PushChart uploads a chart to a registry +func (c *Client) PushChart(ref *Reference) error { + r, err := c.cache.FetchReference(ref) + if err != nil { + return err + } + if !r.Exists { + return errors.New(fmt.Sprintf("Chart not found: %s", r.Name)) + } + fmt.Fprintf(c.out, "The push refers to repository [%s]\n", r.Repo) + c.printCacheRefSummary(r) + layers := []ocispec.Descriptor{*r.ContentLayer} + _, err = oras.Push(ctx(c.out, c.debug), c.resolver, r.Name, c.cache.Provider(), layers, + oras.WithConfig(*r.Config), oras.WithNameValidation(nil)) + if err != nil { + return err + } + s := "" + numLayers := len(layers) + if 1 < numLayers { + s = "s" + } + fmt.Fprintf(c.out, + "%s: pushed to remote (%d layer%s, %s total)\n", r.Tag, numLayers, s, byteCountBinary(r.Size)) + return nil +} + +// PullChart downloads a chart from a registry +func (c *Client) PullChart(ref *Reference) (*bytes.Buffer, error) { + buf := bytes.NewBuffer(nil) + + if ref.Tag == "" { + return buf, errors.New("tag explicitly required") + } + + fmt.Fprintf(c.out, "%s: Pulling from %s\n", ref.Tag, ref.Repo) + + store := content.NewMemoryStore() + fullname := ref.FullName() + _ = fullname + _, layerDescriptors, err := oras.Pull(ctx(c.out, c.debug), c.resolver, ref.FullName(), store, + oras.WithPullEmptyNameAllowed(), + oras.WithAllowedMediaTypes(KnownMediaTypes())) + if err != nil { + return buf, err + } + + numLayers := len(layerDescriptors) + if numLayers < 1 { + return buf, errors.New( + fmt.Sprintf("manifest does not contain at least 1 layer (total: %d)", numLayers)) + } + + var contentLayer *ocispec.Descriptor + for _, layer := range layerDescriptors { + layer := layer + switch layer.MediaType { + case HelmChartContentLayerMediaType: + contentLayer = &layer + } + } + + if contentLayer == nil { + return buf, errors.New( + fmt.Sprintf("manifest does not contain a layer with mediatype %s", + HelmChartContentLayerMediaType)) + } + + _, b, ok := store.Get(*contentLayer) + if !ok { + return buf, errors.Errorf("Unable to retrieve blob with digest %s", contentLayer.Digest) + } + + buf = bytes.NewBuffer(b) + return buf, nil +} + +// PullChartToCache pulls a chart from an OCI Registry to the Registry Cache. +// This function is needed for `helm chart pull`, which is experimental and will be deprecated soon. +// Likewise, the Registry cache will soon be deprecated as will this function. +func (c *Client) PullChartToCache(ref *Reference) error { + if ref.Tag == "" { + return errors.New("tag explicitly required") + } + existing, err := c.cache.FetchReference(ref) + if err != nil { + return err + } + fmt.Fprintf(c.out, "%s: Pulling from %s\n", ref.Tag, ref.Repo) + manifest, _, err := oras.Pull(ctx(c.out, c.debug), c.resolver, ref.FullName(), c.cache.Ingester(), + oras.WithPullEmptyNameAllowed(), + oras.WithAllowedMediaTypes(KnownMediaTypes()), + oras.WithContentProvideIngester(c.cache.ProvideIngester())) + if err != nil { + return err + } + err = c.cache.AddManifest(ref, &manifest) + if err != nil { + return err + } + r, err := c.cache.FetchReference(ref) + if err != nil { + return err + } + if !r.Exists { + return errors.New(fmt.Sprintf("Chart not found: %s", r.Name)) + } + c.printCacheRefSummary(r) + if !existing.Exists { + fmt.Fprintf(c.out, "Status: Downloaded newer chart for %s\n", ref.FullName()) + } else { + fmt.Fprintf(c.out, "Status: Chart is up to date for %s\n", ref.FullName()) + } + return err +} + +// SaveChart stores a copy of chart in local cache +func (c *Client) SaveChart(ch *chart.Chart, ref *Reference) error { + r, err := c.cache.StoreReference(ref, ch) + if err != nil { + return err + } + c.printCacheRefSummary(r) + err = c.cache.AddManifest(ref, r.Manifest) + if err != nil { + return err + } + fmt.Fprintf(c.out, "%s: saved\n", r.Tag) + return nil +} + +// LoadChart retrieves a chart object by reference +func (c *Client) LoadChart(ref *Reference) (*chart.Chart, error) { + r, err := c.cache.FetchReference(ref) + if err != nil { + return nil, err + } + if !r.Exists { + return nil, errors.New(fmt.Sprintf("Chart not found: %s", ref.FullName())) + } + c.printCacheRefSummary(r) + return r.Chart, nil +} + +// RemoveChart deletes a locally saved chart +func (c *Client) RemoveChart(ref *Reference) error { + r, err := c.cache.DeleteReference(ref) + if err != nil { + return err + } + if !r.Exists { + return errors.New(fmt.Sprintf("Chart not found: %s", ref.FullName())) + } + fmt.Fprintf(c.out, "%s: removed\n", r.Tag) + return nil +} + +// PrintChartTable prints a list of locally stored charts +func (c *Client) PrintChartTable() error { + table := uitable.New() + table.MaxColWidth = 60 + table.AddRow("REF", "NAME", "VERSION", "DIGEST", "SIZE", "CREATED") + rows, err := c.getChartTableRows() + if err != nil { + return err + } + for _, row := range rows { + table.AddRow(row...) + } + fmt.Fprintln(c.out, table.String()) + return nil +} + +// printCacheRefSummary prints out chart ref summary +func (c *Client) printCacheRefSummary(r *CacheRefSummary) { + fmt.Fprintf(c.out, "ref: %s\n", r.Name) + fmt.Fprintf(c.out, "digest: %s\n", r.Manifest.Digest.Hex()) + fmt.Fprintf(c.out, "size: %s\n", byteCountBinary(r.Size)) + fmt.Fprintf(c.out, "name: %s\n", r.Chart.Metadata.Name) + fmt.Fprintf(c.out, "version: %s\n", r.Chart.Metadata.Version) +} + +// getChartTableRows returns rows in uitable-friendly format +func (c *Client) getChartTableRows() ([][]interface{}, error) { + rr, err := c.cache.ListReferences() + if err != nil { + return nil, err + } + refsMap := map[string]map[string]string{} + for _, r := range rr { + refsMap[r.Name] = map[string]string{ + "name": r.Chart.Metadata.Name, + "version": r.Chart.Metadata.Version, + "digest": shortDigest(r.Manifest.Digest.Hex()), + "size": byteCountBinary(r.Size), + "created": timeAgo(r.CreatedAt), + } + } + // Sort and convert to format expected by uitable + rows := make([][]interface{}, len(refsMap)) + keys := make([]string, 0, len(refsMap)) + for key := range refsMap { + keys = append(keys, key) + } + sort.Strings(keys) + for i, key := range keys { + rows[i] = make([]interface{}, 6) + rows[i][0] = key + ref := refsMap[key] + for j, k := range []string{"name", "version", "digest", "size", "created"} { + rows[i][j+1] = ref[k] + } + } + return rows, nil +} diff --git a/pkg/deploy/bundles/registry/client_opts.go b/pkg/deploy/bundles/registry/client_opts.go new file mode 100644 index 0000000000..2251daadfd --- /dev/null +++ b/pkg/deploy/bundles/registry/client_opts.go @@ -0,0 +1,75 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package registry // import "helm.sh/helm/v3/internal/experimental/registry" + +import ( + "io" +) + +type ( + // ClientOption allows specifying various settings configurable by the user for overriding the defaults + // used when creating a new default client + ClientOption func(*Client) +) + +// ClientOptDebug returns a function that sets the debug setting on client options set +func ClientOptDebug(debug bool) ClientOption { + return func(client *Client) { + client.debug = debug + } +} + +// ClientOptWriter returns a function that sets the writer setting on client options set +func ClientOptWriter(out io.Writer) ClientOption { + return func(client *Client) { + client.out = out + } +} + +// ClientOptResolver returns a function that sets the resolver setting on client options set +func ClientOptResolver(resolver *Resolver) ClientOption { + return func(client *Client) { + client.resolver = resolver + } +} + +// ClientOptAuthorizer returns a function that sets the authorizer setting on client options set +func ClientOptAuthorizer(authorizer *Authorizer) ClientOption { + return func(client *Client) { + client.authorizer = authorizer + } +} + +// ClientOptCache returns a function that sets the cache setting on a client options set +func ClientOptCache(cache *Cache) ClientOption { + return func(client *Client) { + client.cache = cache + } +} + +// ClientOptCredentialsFile returns a function that sets the cache setting on a client options set +func ClientOptCredentialsFile(credentialsFile string) ClientOption { + return func(client *Client) { + client.credentialsFile = credentialsFile + } +} + +func ClientOptInsecure(insecure bool) ClientOption { + return func(client *Client) { + client.insecure = insecure + } +} diff --git a/pkg/deploy/bundles/registry/client_test.go b/pkg/deploy/bundles/registry/client_test.go new file mode 100644 index 0000000000..a9936ba138 --- /dev/null +++ b/pkg/deploy/bundles/registry/client_test.go @@ -0,0 +1,294 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package registry + +import ( + "bytes" + "context" + "fmt" + "io" + "io/ioutil" + "net/http" + "net/http/httptest" + "net/url" + "os" + "path/filepath" + "strings" + "testing" + "time" + + "github.com/containerd/containerd/errdefs" + auth "github.com/deislabs/oras/pkg/auth/docker" + "github.com/docker/distribution/configuration" + "github.com/docker/distribution/registry" + _ "github.com/docker/distribution/registry/auth/htpasswd" + _ "github.com/docker/distribution/registry/storage/driver/inmemory" + "github.com/phayes/freeport" + "github.com/stretchr/testify/suite" + "golang.org/x/crypto/bcrypt" + + "helm.sh/helm/v3/pkg/chart" +) + +var ( + testCacheRootDir = "helm-registry-test" + testHtpasswdFileBasename = "authtest.htpasswd" + testUsername = "myuser" + testPassword = "mypass" +) + +type RegistryClientTestSuite struct { + suite.Suite + Out io.Writer + DockerRegistryHost string + CompromisedRegistryHost string + CacheRootDir string + RegistryClient *Client +} + +func (suite *RegistryClientTestSuite) SetupSuite() { + suite.CacheRootDir = testCacheRootDir + os.RemoveAll(suite.CacheRootDir) + os.Mkdir(suite.CacheRootDir, 0700) + + var out bytes.Buffer + suite.Out = &out + credentialsFile := filepath.Join(suite.CacheRootDir, CredentialsFileBasename) + + client, err := auth.NewClient(credentialsFile) + suite.Nil(err, "no error creating auth client") + + resolver, err := client.Resolver(context.Background(), http.DefaultClient, false) + suite.Nil(err, "no error creating resolver") + + // create cache + cache, err := NewCache( + CacheOptDebug(true), + CacheOptWriter(suite.Out), + CacheOptRoot(filepath.Join(suite.CacheRootDir, CacheRootDir)), + ) + suite.Nil(err, "no error creating cache") + + // init test client + suite.RegistryClient, err = NewClient( + ClientOptDebug(true), + ClientOptWriter(suite.Out), + ClientOptAuthorizer(&Authorizer{ + Client: client, + }), + ClientOptResolver(&Resolver{ + Resolver: resolver, + }), + ClientOptCache(cache), + ) + suite.Nil(err, "no error creating registry client") + + // create htpasswd file (w BCrypt, which is required) + pwBytes, err := bcrypt.GenerateFromPassword([]byte(testPassword), bcrypt.DefaultCost) + suite.Nil(err, "no error generating bcrypt password for test htpasswd file") + htpasswdPath := filepath.Join(suite.CacheRootDir, testHtpasswdFileBasename) + err = ioutil.WriteFile(htpasswdPath, []byte(fmt.Sprintf("%s:%s\n", testUsername, string(pwBytes))), 0644) + suite.Nil(err, "no error creating test htpasswd file") + + // Registry config + config := &configuration.Configuration{} + port, err := freeport.GetFreePort() + suite.Nil(err, "no error finding free port for test registry") + suite.DockerRegistryHost = fmt.Sprintf("localhost:%d", port) + config.HTTP.Addr = fmt.Sprintf(":%d", port) + config.HTTP.DrainTimeout = time.Duration(10) * time.Second + config.Storage = map[string]configuration.Parameters{"inmemory": map[string]interface{}{}} + config.Auth = configuration.Auth{ + "htpasswd": configuration.Parameters{ + "realm": "localhost", + "path": htpasswdPath, + }, + } + dockerRegistry, err := registry.NewRegistry(context.Background(), config) + suite.Nil(err, "no error creating test registry") + + suite.CompromisedRegistryHost = initCompromisedRegistryTestServer() + + // Start Docker registry + go dockerRegistry.ListenAndServe() +} + +func (suite *RegistryClientTestSuite) TearDownSuite() { + os.RemoveAll(suite.CacheRootDir) +} + +func (suite *RegistryClientTestSuite) Test_0_Login() { + err := suite.RegistryClient.Login(suite.DockerRegistryHost, "badverybad", "ohsobad", false) + suite.NotNil(err, "error logging into registry with bad credentials") + + err = suite.RegistryClient.Login(suite.DockerRegistryHost, "badverybad", "ohsobad", true) + suite.NotNil(err, "error logging into registry with bad credentials, insecure mode") + + err = suite.RegistryClient.Login(suite.DockerRegistryHost, testUsername, testPassword, false) + suite.Nil(err, "no error logging into registry with good credentials") + + err = suite.RegistryClient.Login(suite.DockerRegistryHost, testUsername, testPassword, true) + suite.Nil(err, "no error logging into registry with good credentials, insecure mode") +} + +func (suite *RegistryClientTestSuite) Test_1_SaveChart() { + ref, err := ParseReference(fmt.Sprintf("%s/testrepo/testchart:1.2.3", suite.DockerRegistryHost)) + suite.Nil(err) + + // empty chart + err = suite.RegistryClient.SaveChart(&chart.Chart{}, ref) + suite.NotNil(err) + + // valid chart + ch := &chart.Chart{} + ch.Metadata = &chart.Metadata{ + APIVersion: "v1", + Name: "testchart", + Version: "1.2.3", + } + err = suite.RegistryClient.SaveChart(ch, ref) + suite.Nil(err) +} + +func (suite *RegistryClientTestSuite) Test_2_LoadChart() { + + // non-existent ref + ref, err := ParseReference(fmt.Sprintf("%s/testrepo/whodis:9.9.9", suite.DockerRegistryHost)) + suite.Nil(err) + _, err = suite.RegistryClient.LoadChart(ref) + suite.NotNil(err) + + // existing ref + ref, err = ParseReference(fmt.Sprintf("%s/testrepo/testchart:1.2.3", suite.DockerRegistryHost)) + suite.Nil(err) + ch, err := suite.RegistryClient.LoadChart(ref) + suite.Nil(err) + suite.Equal("testchart", ch.Metadata.Name) + suite.Equal("1.2.3", ch.Metadata.Version) +} + +func (suite *RegistryClientTestSuite) Test_3_PushChart() { + + // non-existent ref + ref, err := ParseReference(fmt.Sprintf("%s/testrepo/whodis:9.9.9", suite.DockerRegistryHost)) + suite.Nil(err) + err = suite.RegistryClient.PushChart(ref) + suite.NotNil(err) + + // existing ref + ref, err = ParseReference(fmt.Sprintf("%s/testrepo/testchart:1.2.3", suite.DockerRegistryHost)) + suite.Nil(err) + err = suite.RegistryClient.PushChart(ref) + suite.Nil(err) +} + +func (suite *RegistryClientTestSuite) Test_4_PullChart() { + + // non-existent ref + ref, err := ParseReference(fmt.Sprintf("%s/testrepo/whodis:9.9.9", suite.DockerRegistryHost)) + suite.Nil(err) + _, err = suite.RegistryClient.PullChart(ref) + suite.NotNil(err) + + // existing ref + ref, err = ParseReference(fmt.Sprintf("%s/testrepo/testchart:1.2.3", suite.DockerRegistryHost)) + suite.Nil(err) + _, err = suite.RegistryClient.PullChart(ref) + suite.Nil(err) +} + +func (suite *RegistryClientTestSuite) Test_5_PrintChartTable() { + err := suite.RegistryClient.PrintChartTable() + suite.Nil(err) +} + +func (suite *RegistryClientTestSuite) Test_6_RemoveChart() { + + // non-existent ref + ref, err := ParseReference(fmt.Sprintf("%s/testrepo/whodis:9.9.9", suite.DockerRegistryHost)) + suite.Nil(err) + err = suite.RegistryClient.RemoveChart(ref) + suite.NotNil(err) + + // existing ref + ref, err = ParseReference(fmt.Sprintf("%s/testrepo/testchart:1.2.3", suite.DockerRegistryHost)) + suite.Nil(err) + err = suite.RegistryClient.RemoveChart(ref) + suite.Nil(err) +} + +func (suite *RegistryClientTestSuite) Test_7_Logout() { + err := suite.RegistryClient.Logout("this-host-aint-real:5000") + suite.NotNil(err, "error logging out of registry that has no entry") + + err = suite.RegistryClient.Logout(suite.DockerRegistryHost) + suite.Nil(err, "no error logging out of registry") +} + +func (suite *RegistryClientTestSuite) Test_8_ManInTheMiddle() { + ref, err := ParseReference(fmt.Sprintf("%s/testrepo/supposedlysafechart:9.9.9", suite.CompromisedRegistryHost)) + suite.Nil(err) + + // returns content that does not match the expected digest + _, err = suite.RegistryClient.PullChart(ref) + suite.NotNil(err) + suite.True(errdefs.IsFailedPrecondition(err)) +} + +func TestRegistryClientTestSuite(t *testing.T) { + suite.Run(t, new(RegistryClientTestSuite)) +} + +func initCompromisedRegistryTestServer() string { + s := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if strings.Contains(r.URL.Path, "manifests") { + w.Header().Set("Content-Type", "application/vnd.oci.image.manifest.v1+json") + w.WriteHeader(200) + + // layers[0] is the blob []byte("a") + w.Write([]byte( + `{ "schemaVersion": 2, "config": { + "mediaType": "application/vnd.cncf.helm.config.v1+json", + "digest": "sha256:a705ee2789ab50a5ba20930f246dbd5cc01ff9712825bb98f57ee8414377f133", + "size": 181 + }, + "layers": [ + { + "mediaType": "application/tar+gzip", + "digest": "sha256:ca978112ca1bbdcafac231b39a23dc4da786eff8147c4e72b9807785afee48bb", + "size": 1 + } + ] +}`)) + } else if r.URL.Path == "/v2/testrepo/supposedlysafechart/blobs/sha256:a705ee2789ab50a5ba20930f246dbd5cc01ff9712825bb98f57ee8414377f133" { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(200) + w.Write([]byte("{\"name\":\"mychart\",\"version\":\"0.1.0\",\"description\":\"A Helm chart for Kubernetes\\n" + + "an 'application' or a 'library' chart.\",\"apiVersion\":\"v2\",\"appVersion\":\"1.16.0\",\"type\":" + + "\"application\"}")) + } else if r.URL.Path == "/v2/testrepo/supposedlysafechart/blobs/sha256:ca978112ca1bbdcafac231b39a23dc4da786eff8147c4e72b9807785afee48bb" { + w.Header().Set("Content-Type", "application/tar+gzip") + w.WriteHeader(200) + w.Write([]byte("b")) + } else { + w.WriteHeader(500) + } + })) + + u, _ := url.Parse(s.URL) + return fmt.Sprintf("localhost:%s", u.Port()) +} diff --git a/pkg/deploy/bundles/registry/constants.go b/pkg/deploy/bundles/registry/constants.go new file mode 100644 index 0000000000..dafb3c9e59 --- /dev/null +++ b/pkg/deploy/bundles/registry/constants.go @@ -0,0 +1,33 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package registry // import "helm.sh/helm/v3/internal/experimental/registry" + +const ( + // HelmChartConfigMediaType is the reserved media type for the Helm chart manifest config + HelmChartConfigMediaType = "application/vnd.cncf.helm.config.v1+json" + + // HelmChartContentLayerMediaType is the reserved media type for Helm chart package content + HelmChartContentLayerMediaType = "application/tar+gzip" +) + +// KnownMediaTypes returns a list of layer mediaTypes that the Helm client knows about +func KnownMediaTypes() []string { + return []string{ + HelmChartConfigMediaType, + HelmChartContentLayerMediaType, + } +} diff --git a/pkg/deploy/bundles/registry/constants_test.go b/pkg/deploy/bundles/registry/constants_test.go new file mode 100644 index 0000000000..9f078e632f --- /dev/null +++ b/pkg/deploy/bundles/registry/constants_test.go @@ -0,0 +1,29 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package registry + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestConstants(t *testing.T) { + knownMediaTypes := KnownMediaTypes() + assert.Contains(t, knownMediaTypes, HelmChartConfigMediaType) + assert.Contains(t, knownMediaTypes, HelmChartContentLayerMediaType) +} diff --git a/pkg/deploy/bundles/registry/reference.go b/pkg/deploy/bundles/registry/reference.go new file mode 100644 index 0000000000..f0e91d4ba6 --- /dev/null +++ b/pkg/deploy/bundles/registry/reference.go @@ -0,0 +1,146 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package registry // import "helm.sh/helm/v3/internal/experimental/registry" + +import ( + "errors" + "fmt" + "net/url" + "regexp" + "strconv" + "strings" +) + +var ( + validPortRegEx = regexp.MustCompile(`^([1-9]\d{0,3}|0|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$`) // adapted from https://stackoverflow.com/a/12968117 + // TODO: Currently we don't support digests, so we are only splitting on the + // colon. However, when we add support for digests, we'll need to use the + // regexp anyway to split on both colons and @, so leaving it like this for + // now + referenceDelimiter = regexp.MustCompile(`[:]`) + errEmptyRepo = errors.New("parsed repo was empty") + errTooManyColons = errors.New("ref may only contain a single colon character (:) unless specifying a port number") +) + +type ( + // Reference defines the main components of a reference specification + Reference struct { + Tag string + Repo string + } +) + +// ParseReference converts a string to a Reference +func ParseReference(s string) (*Reference, error) { + if s == "" { + return nil, errEmptyRepo + } + // Split the components of the string on the colon or @, if it is more than 3, + // immediately return an error. Other validation will be performed later in + // the function + splitComponents := fixSplitComponents(referenceDelimiter.Split(s, -1)) + if len(splitComponents) > 3 { + return nil, errTooManyColons + } + + var ref *Reference + switch len(splitComponents) { + case 1: + ref = &Reference{Repo: splitComponents[0]} + case 2: + ref = &Reference{Repo: splitComponents[0], Tag: splitComponents[1]} + case 3: + ref = &Reference{Repo: strings.Join(splitComponents[:2], ":"), Tag: splitComponents[2]} + } + + // ensure the reference is valid + err := ref.validate() + if err != nil { + return nil, err + } + + return ref, nil +} + +// FullName the full name of a reference (repo:tag) +func (ref *Reference) FullName() string { + if ref.Tag == "" { + return ref.Repo + } + return fmt.Sprintf("%s:%s", ref.Repo, ref.Tag) +} + +// validate makes sure the ref meets our criteria +func (ref *Reference) validate() error { + + err := ref.validateRepo() + if err != nil { + return err + } + return ref.validateNumColons() +} + +// validateRepo checks that the Repo field is non-empty +func (ref *Reference) validateRepo() error { + if ref.Repo == "" { + return errEmptyRepo + } + // Makes sure the repo results in a parsable URL (similar to what is done + // with containerd reference parsing) + _, err := url.Parse("//" + ref.Repo) + return err +} + +// validateNumColons ensures the ref only contains a single colon character (:) +// (or potentially two, there might be a port number specified i.e. :5000) +func (ref *Reference) validateNumColons() error { + if strings.Contains(ref.Tag, ":") { + return errTooManyColons + } + parts := strings.Split(ref.Repo, ":") + lastIndex := len(parts) - 1 + if 1 < lastIndex { + return errTooManyColons + } + if 0 < lastIndex { + port := strings.Split(parts[lastIndex], "/")[0] + if !isValidPort(port) { + return errTooManyColons + } + } + return nil +} + +// isValidPort returns whether or not a string looks like a valid port +func isValidPort(s string) bool { + return validPortRegEx.MatchString(s) +} + +// fixSplitComponents this will modify reference parts based on presence of port +// Example: {localhost, 5000/x/y/z, 0.1.0} => {localhost:5000/x/y/z, 0.1.0} +func fixSplitComponents(c []string) []string { + if len(c) <= 1 { + return c + } + possiblePortParts := strings.Split(c[1], "/") + if _, err := strconv.Atoi(possiblePortParts[0]); err == nil { + components := []string{strings.Join(c[:2], ":")} + components = append(components, c[2:]...) + return components + } + return c +} diff --git a/pkg/deploy/bundles/registry/reference_test.go b/pkg/deploy/bundles/registry/reference_test.go new file mode 100644 index 0000000000..aae03ad99d --- /dev/null +++ b/pkg/deploy/bundles/registry/reference_test.go @@ -0,0 +1,126 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package registry + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestParseReference(t *testing.T) { + is := assert.New(t) + + // bad refs + s := "" + _, err := ParseReference(s) + is.Error(err, "empty ref") + + s = "my:bad:ref" + _, err = ParseReference(s) + is.Error(err, "ref contains too many colons (2)") + + s = "my:really:bad:ref" + _, err = ParseReference(s) + is.Error(err, "ref contains too many colons (3)") + + // good refs + s = "mychart" + ref, err := ParseReference(s) + is.NoError(err) + is.Equal("mychart", ref.Repo) + is.Equal("", ref.Tag) + is.Equal("mychart", ref.FullName()) + + s = "mychart:1.5.0" + ref, err = ParseReference(s) + is.NoError(err) + is.Equal("mychart", ref.Repo) + is.Equal("1.5.0", ref.Tag) + is.Equal("mychart:1.5.0", ref.FullName()) + + s = "myrepo/mychart" + ref, err = ParseReference(s) + is.NoError(err) + is.Equal("myrepo/mychart", ref.Repo) + is.Equal("", ref.Tag) + is.Equal("myrepo/mychart", ref.FullName()) + + s = "myrepo/mychart:1.5.0" + ref, err = ParseReference(s) + is.NoError(err) + is.Equal("myrepo/mychart", ref.Repo) + is.Equal("1.5.0", ref.Tag) + is.Equal("myrepo/mychart:1.5.0", ref.FullName()) + + s = "mychart:5001:1.5.0" + ref, err = ParseReference(s) + is.NoError(err) + is.Equal("mychart:5001", ref.Repo) + is.Equal("1.5.0", ref.Tag) + is.Equal("mychart:5001:1.5.0", ref.FullName()) + + s = "myrepo:5001/mychart:1.5.0" + ref, err = ParseReference(s) + is.NoError(err) + is.Equal("myrepo:5001/mychart", ref.Repo) + is.Equal("1.5.0", ref.Tag) + is.Equal("myrepo:5001/mychart:1.5.0", ref.FullName()) + + s = "127.0.0.1:5001/mychart:1.5.0" + ref, err = ParseReference(s) + is.NoError(err) + is.Equal("127.0.0.1:5001/mychart", ref.Repo) + is.Equal("1.5.0", ref.Tag) + is.Equal("127.0.0.1:5001/mychart:1.5.0", ref.FullName()) + + s = "localhost:5000/mychart:latest" + ref, err = ParseReference(s) + is.NoError(err) + is.Equal("localhost:5000/mychart", ref.Repo) + is.Equal("latest", ref.Tag) + is.Equal("localhost:5000/mychart:latest", ref.FullName()) + + s = "my.host.com/my/nested/repo:1.2.3" + ref, err = ParseReference(s) + is.NoError(err) + is.Equal("my.host.com/my/nested/repo", ref.Repo) + is.Equal("1.2.3", ref.Tag) + is.Equal("my.host.com/my/nested/repo:1.2.3", ref.FullName()) + + s = "localhost:5000/x/y/z" + ref, err = ParseReference(s) + is.NoError(err) + is.Equal("localhost:5000/x/y/z", ref.Repo) + is.Equal("", ref.Tag) + is.Equal("localhost:5000/x/y/z", ref.FullName()) + + s = "localhost:5000/x/y/z:123" + ref, err = ParseReference(s) + is.NoError(err) + is.Equal("localhost:5000/x/y/z", ref.Repo) + is.Equal("123", ref.Tag) + is.Equal("localhost:5000/x/y/z:123", ref.FullName()) + + s = "localhost:5000/x/y/z:123:x" + _, err = ParseReference(s) + is.Error(err, "ref contains too many colons (3)") + + s = "localhost:5000/x/y/z:123:x:y" + _, err = ParseReference(s) + is.Error(err, "ref contains too many colons (4)") +} diff --git a/pkg/deploy/bundles/registry/resolver.go b/pkg/deploy/bundles/registry/resolver.go new file mode 100644 index 0000000000..ff8a82633b --- /dev/null +++ b/pkg/deploy/bundles/registry/resolver.go @@ -0,0 +1,28 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package registry // import "helm.sh/helm/v3/internal/experimental/registry" + +import ( + "github.com/containerd/containerd/remotes" +) + +type ( + // Resolver provides remotes based on a locator + Resolver struct { + remotes.Resolver + } +) diff --git a/pkg/deploy/bundles/registry/util.go b/pkg/deploy/bundles/registry/util.go new file mode 100644 index 0000000000..697a890e37 --- /dev/null +++ b/pkg/deploy/bundles/registry/util.go @@ -0,0 +1,66 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package registry // import "helm.sh/helm/v3/internal/experimental/registry" + +import ( + "context" + "fmt" + "io" + "time" + + orascontext "github.com/deislabs/oras/pkg/context" + units "github.com/docker/go-units" + "github.com/sirupsen/logrus" +) + +// byteCountBinary produces a human-readable file size +func byteCountBinary(b int64) string { + const unit = 1024 + if b < unit { + return fmt.Sprintf("%d B", b) + } + div, exp := int64(unit), 0 + for n := b / unit; n >= unit; n /= unit { + div *= unit + exp++ + } + return fmt.Sprintf("%.1f %ciB", float64(b)/float64(div), "KMGTPE"[exp]) +} + +// shortDigest returns first 7 characters of a sha256 digest +func shortDigest(digest string) string { + if len(digest) == 64 { + return digest[:7] + } + return digest +} + +// timeAgo returns a human-readable timestamp representing time that has passed +func timeAgo(t time.Time) string { + return units.HumanDuration(time.Now().UTC().Sub(t)) +} + +// ctx retrieves a fresh context. +// disable verbose logging coming from ORAS (unless debug is enabled) +func ctx(out io.Writer, debug bool) context.Context { + if !debug { + return orascontext.Background() + } + ctx := orascontext.WithLoggerFromWriter(context.Background(), out) + orascontext.GetLogger(ctx).Logger.SetLevel(logrus.DebugLevel) + return ctx +} diff --git a/pkg/deploy/helm/chart_extender/werf_chart.go b/pkg/deploy/helm/chart_extender/werf_chart.go index 290f6bfae8..a3940b74dd 100644 --- a/pkg/deploy/helm/chart_extender/werf_chart.go +++ b/pkg/deploy/helm/chart_extender/werf_chart.go @@ -262,7 +262,7 @@ func (wc *WerfChart) SetEnv(env string) error { * CreateNewBundle creates new Bundle object with werf chart extensions taken into account. * inputVals could contain any custom values, which should be stored in the bundle. */ -func (wc *WerfChart) CreateNewBundle(ctx context.Context, destDir string, inputVals map[string]interface{}) (*Bundle, error) { +func (wc *WerfChart) CreateNewBundle(ctx context.Context, destDir, chartVersion string, inputVals map[string]interface{}) (*Bundle, error) { chartPath := filepath.Join(wc.GiterminismManager.ProjectDir(), wc.ChartDir) chrt, err := loader.LoadDir(chartPath) if err != nil { @@ -307,6 +307,7 @@ func (wc *WerfChart) CreateNewBundle(ctx context.Context, destDir string, inputV bundleMetadata := *wc.HelmChart.Metadata // Force api v2 bundleMetadata.APIVersion = chart.APIVersionV2 + bundleMetadata.Version = chartVersion chartYamlFile := filepath.Join(destDir, "Chart.yaml") if data, err := json.Marshal(bundleMetadata); err != nil { diff --git a/pkg/util/archive.go b/pkg/util/archive.go index ba46e5ec37..5e679c9771 100644 --- a/pkg/util/archive.go +++ b/pkg/util/archive.go @@ -209,45 +209,30 @@ func ExtractTar(tarFileReader io.Reader, dstDir string) error { return nil } -func ReadDirAsTar(dir string) io.Reader { - r, w := io.Pipe() +func WriteDirAsTar(dir string, w io.Writer) error { + tarWriter := tar.NewWriter(w) - go func() { - tarWriter := tar.NewWriter(w) - - err := filepath.Walk(dir, func(path string, info fs.FileInfo, err error) error { - if err != nil { - return fmt.Errorf("error accessing %q: %s", path, err) - } - - relPath, err := filepath.Rel(dir, path) - if err != nil { - return err - } - - if info.Mode().IsDir() { - header := &tar.Header{ - Name: relPath, - Size: info.Size(), - Mode: int64(info.Mode()), - ModTime: info.ModTime(), - Typeflag: tar.TypeDir, - } + err := filepath.Walk(dir, func(path string, info fs.FileInfo, err error) error { + if err != nil { + return fmt.Errorf("error accessing %q: %s", path, err) + } - err = tarWriter.WriteHeader(header) - if err != nil { - return fmt.Errorf("could not tar write header for %q: %s", path, err) - } + relPath, err := filepath.Rel(dir, path) + if err != nil { + return err + } - return nil - } + if debugArchiveUtil() { + fmt.Printf("filepath.Walk %q\n", relPath) + } + if info.Mode().IsDir() { header := &tar.Header{ Name: relPath, Size: info.Size(), Mode: int64(info.Mode()), ModTime: info.ModTime(), - Typeflag: tar.TypeReg, + Typeflag: tar.TypeDir, } err = tarWriter.WriteHeader(header) @@ -255,34 +240,56 @@ func ReadDirAsTar(dir string) io.Reader { return fmt.Errorf("could not tar write header for %q: %s", path, err) } - file, err := os.Open(path) - if err != nil { - return fmt.Errorf("unable to open %q: %s", path, err) - } - defer file.Close() - - _, err = io.Copy(tarWriter, file) - if err != nil { - return fmt.Errorf("unable to write %q into tar: %s", path, err) + if debugArchiveUtil() { + fmt.Printf("Written dir %q\n", relPath) } return nil - }) + } + + header := &tar.Header{ + Name: relPath, + Size: info.Size(), + Mode: int64(info.Mode()), + ModTime: info.ModTime(), + Typeflag: tar.TypeReg, + } + + err = tarWriter.WriteHeader(header) + if err != nil { + return fmt.Errorf("could not tar write header for %q: %s", path, err) + } + + file, err := os.Open(path) + if err != nil { + return fmt.Errorf("unable to open %q: %s", path, err) + } + n, err := io.Copy(tarWriter, file) if err != nil { - panic(err.Error()) + return fmt.Errorf("unable to write %q into tar: %s", path, err) } - if err := tarWriter.Close(); err != nil { - panic(err.Error()) + if err := file.Close(); err != nil { + return fmt.Errorf("unable to close %q: %s", path, err) } - if err := w.Close(); err != nil { - panic(err.Error()) + if debugArchiveUtil() { + fmt.Printf("Written file %q (%d bytes)\n", relPath, n) } - }() - return r + return nil + }) + + if err != nil { + return err + } + + if err := tarWriter.Close(); err != nil { + return fmt.Errorf("unable to close tar writer: %s", err) + } + + return nil } func debugArchiveUtil() bool { diff --git a/pkg/util/io.go b/pkg/util/io.go new file mode 100644 index 0000000000..180252bf0b --- /dev/null +++ b/pkg/util/io.go @@ -0,0 +1,15 @@ +package util + +import ( + "io" + + "github.com/djherbis/buffer" + "github.com/djherbis/nio/v3" +) + +func BufferedPipedWriterProcess(f func(w io.WriteCloser)) io.ReadCloser { + buf := buffer.New(64 * 1024 * 1024) + r, w := nio.Pipe(buf) + go f(w) + return r +}