@@ -27,6 +27,7 @@ import (
2727 "helm.sh/helm/v3/pkg/cli"
2828 "helm.sh/helm/v3/pkg/downloader"
2929 "helm.sh/helm/v3/pkg/getter"
30+ "helm.sh/helm/v3/pkg/registry"
3031 "helm.sh/helm/v3/pkg/repo"
3132)
3233
@@ -126,11 +127,19 @@ func LoadChart(opts Options) (*chart.Chart, error) {
126127func downloadChart (destDir string , opts Options ) (string , error ) {
127128 settings := cli .New ()
128129 getters := getter .All (settings )
130+
131+ // Create registry client for OCI registry support
132+ registryClient , err := registry .NewClient ()
133+ if err != nil {
134+ return "" , fmt .Errorf ("failed to create registry client: %w" , err )
135+ }
136+
129137 c := downloader.ChartDownloader {
130138 Out : os .Stderr ,
131139 Getters : getters ,
132140 RepositoryConfig : settings .RepositoryConfig ,
133141 RepositoryCache : settings .RepositoryCache ,
142+ RegistryClient : registryClient ,
134143 }
135144
136145 if opts .Repo != "" {
@@ -182,13 +191,20 @@ func fetchChartDependencies(chartPath string) error {
182191 settings := cli .New ()
183192 getters := getter .All (settings )
184193
194+ // Create registry client for OCI registry support
195+ registryClient , err := registry .NewClient ()
196+ if err != nil {
197+ return fmt .Errorf ("failed to create registry client: %w" , err )
198+ }
199+
185200 out := & bytes.Buffer {}
186201 man := & downloader.Manager {
187202 Out : out ,
188203 ChartPath : chartPath ,
189204 Getters : getters ,
190205 RepositoryConfig : settings .RepositoryConfig ,
191206 RepositoryCache : settings .RepositoryCache ,
207+ RegistryClient : registryClient ,
192208 }
193209 if err := man .Build (); err != nil {
194210 fmt .Println (out .String ())
0 commit comments