Fix lint to not fail for duplicate release names across ns (#1388)
Fixes #1384
This commit is contained in:
		
							parent
							
								
									1e260e4a5e
								
							
						
					
					
						commit
						b4857937fb
					
				|  | @ -856,13 +856,29 @@ func (st *HelmState) PrepareCharts(helm helmexec.Interface, dir string, concurre | |||
| 					chartPath = normalizeChart(st.basePath, release.Chart) | ||||
| 				} else { | ||||
| 					fetchFlags := []string{} | ||||
| 					if release.Version != "" { | ||||
| 						chartPath = path.Join(dir, release.Name, release.Version, release.Chart) | ||||
| 						fetchFlags = append(fetchFlags, "--version", release.Version) | ||||
| 					} else { | ||||
| 						chartPath = path.Join(dir, release.Name, "latest", release.Chart) | ||||
| 
 | ||||
| 					pathElems := []string{ | ||||
| 						dir, | ||||
| 					} | ||||
| 
 | ||||
| 					if release.TillerNamespace != "" { | ||||
| 						pathElems = append(pathElems, release.TillerNamespace) | ||||
| 					} | ||||
| 
 | ||||
| 					if release.Namespace != "" { | ||||
| 						pathElems = append(pathElems, release.Namespace) | ||||
| 					} | ||||
| 
 | ||||
| 					chartVersion := "latest" | ||||
| 					if release.Version != "" { | ||||
| 						chartVersion = release.Version | ||||
| 						fetchFlags = append(fetchFlags, "--version", release.Version) | ||||
| 					} | ||||
| 
 | ||||
| 					pathElems = append(pathElems, chartVersion, release.Chart) | ||||
| 
 | ||||
| 					chartPath = path.Join(pathElems...) | ||||
| 
 | ||||
| 					if st.isDevelopment(release) { | ||||
| 						fetchFlags = append(fetchFlags, "--devel") | ||||
| 					} | ||||
|  | @ -875,6 +891,7 @@ func (st *HelmState) PrepareCharts(helm helmexec.Interface, dir string, concurre | |||
| 							return | ||||
| 						} | ||||
| 					} | ||||
| 
 | ||||
| 					// Set chartPath to be the path containing Chart.yaml, if found
 | ||||
| 					fullChartPath, err := findChartDirectory(chartPath) | ||||
| 					if err == nil { | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue