@@ -68,7 +68,9 @@ func NewContainer(target *apiv1.Target, containersReaderWriter client.Containers
6868func (t * Target ) getContainersUploadURL () string {
6969 containersURL := t .containersURL
7070 if containersURL == "" {
71- containersURL = t .GetUploadURL ()
71+ // When containers URL is not specified, append /containers to charts URL
72+ // to avoid collision between charts and containers at the same path
73+ containersURL = t .GetUploadURL () + "/containers"
7274 }
7375
7476 if schemeRE .MatchString (containersURL ) {
@@ -97,6 +99,7 @@ func (t *Target) UnwrapChart(file string, _ *chart.Metadata, opts ...config.Opti
9799 unwrap .WithContainerRegistryAuth (t .containersUsername , t .containersPassword ),
98100 unwrap .WithSkipImageRelocation (cfg .SkipImages ),
99101 unwrap .WithSkipPullImages (cfg .SkipImages ),
102+ unwrap .WithPreserveRepository (false ),
100103 ); err != nil {
101104 return errors .Trace (err )
102105 }
@@ -124,6 +127,7 @@ func (t *Target) UnwrapContainer(file string, opts ...config.Option) error {
124127 unwrap .WithSkipImageRelocation (cfg .SkipImages ),
125128 unwrap .WithSkipPullImages (cfg .SkipImages ),
126129 unwrap .WithFetchArtifacts (! cfg .SkipArtifacts ),
130+ unwrap .WithPreserveRepository (false ),
127131 ); err != nil {
128132 return errors .Trace (err )
129133 }
0 commit comments