From c11210a96b660643d45b4464f429a3eadeecf89a Mon Sep 17 00:00:00 2001 From: Salah Al Saleh Date: Fri, 19 Jan 2024 19:06:55 +0000 Subject: [PATCH] dest registry always exists --- pkg/apparchive/helm-v1beta2.go | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/pkg/apparchive/helm-v1beta2.go b/pkg/apparchive/helm-v1beta2.go index 046231c1b2..2ed514929d 100644 --- a/pkg/apparchive/helm-v1beta2.go +++ b/pkg/apparchive/helm-v1beta2.go @@ -317,14 +317,11 @@ func processV1Beta2HelmChartImages(opts WriteV1Beta2HelmChartsOptions, helmChart dockerHubRegistryCreds, _ = registry.GetCredentialsForRegistryFromConfigJSON(dockerhubSecret.Data[".dockerconfigjson"], registry.DockerHubRegistryName) } - var destRegistry *dockerregistrytypes.RegistryOptions - if opts.ProcessImageOptions.RewriteImages { - destRegistry = &dockerregistrytypes.RegistryOptions{ - Endpoint: opts.ProcessImageOptions.RegistrySettings.Hostname, - Namespace: opts.ProcessImageOptions.RegistrySettings.Namespace, - Username: opts.ProcessImageOptions.RegistrySettings.Username, - Password: opts.ProcessImageOptions.RegistrySettings.Password, - } + destRegistry := &dockerregistrytypes.RegistryOptions{ + Endpoint: opts.ProcessImageOptions.RegistrySettings.Hostname, + Namespace: opts.ProcessImageOptions.RegistrySettings.Namespace, + Username: opts.ProcessImageOptions.RegistrySettings.Username, + Password: opts.ProcessImageOptions.RegistrySettings.Password, } baseImages, err := image.FindImagesInDir(templatedOutputDir)