From a684d1424d8cf6b943ea8098cf801f45dd60bc2c Mon Sep 17 00:00:00 2001 From: Adam Talbot Date: Wed, 17 Jul 2024 05:34:04 +0100 Subject: [PATCH] feat: add support for OCI auth through registry-config flag (#1630) Signed-off-by: Adam Talbot --- pkg/state/state.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/state/state.go b/pkg/state/state.go index 9c8d2b90..0172c763 100644 --- a/pkg/state/state.go +++ b/pkg/state/state.go @@ -213,6 +213,7 @@ type RepositorySpec struct { KeyFile string `yaml:"keyFile,omitempty"` Username string `yaml:"username,omitempty"` Password string `yaml:"password,omitempty"` + RegistryConfig string `yaml:"registryConfig,omitempty"` Managed string `yaml:"managed,omitempty"` OCI bool `yaml:"oci,omitempty"` Verify bool `yaml:"verify,omitempty"` @@ -3679,6 +3680,9 @@ func (st *HelmState) getOCIChart(release *ReleaseSpec, tempDir string, helm helm if repo.Keyring != "" { flags = append(flags, "--keyring", repo.Keyring) } + if repo.RegistryConfig != "" { + flags = append(flags, "--registry-config", repo.RegistryConfig) + } } err := helm.ChartPull(qualifiedChartName, chartPath, flags...)