Skip to content

Commit 1edea9a

Browse files
committed
allow using helmChart without repo URL.
1 parent 311dbbf commit 1edea9a

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

api/internal/builtins/HelmChartInflationGenerator.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugin/builtin/helmchartinflationgenerator/HelmChartInflationGenerator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ func (p *plugin) absChartHome() string {
160160
chartHome = filepath.Join(p.h.Loader().Root(), p.ChartHome)
161161
}
162162

163-
if p.Version != "" && p.Repo != "" {
163+
if p.Version != "" {
164164
return filepath.Join(chartHome, fmt.Sprintf("%s-%s", p.Name, p.Version))
165165
}
166166
return chartHome

plugin/builtin/helmchartinflationgenerator/HelmChartInflationGenerator_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -847,7 +847,7 @@ releaseName: %s
847847
assert.True(t, len(rm.Resources()) > 0)
848848

849849
var chartDir string
850-
if tt.version != "" && tt.repo != "" {
850+
if tt.version != "" {
851851
chartDir = fmt.Sprintf("charts/%s-%s/%s", tt.chartName, tt.version, tt.chartName)
852852
} else {
853853
chartDir = fmt.Sprintf("charts/%s", tt.chartName)
@@ -949,7 +949,7 @@ chartHome: ./charts
949949
require.NoError(t, err)
950950
assert.Equal(t, "bar", cm)
951951

952-
chartDir := filepath.Join(th.GetRoot(), "charts/test-chart")
952+
chartDir := filepath.Join(th.GetRoot(), "charts/test-chart-1.0.0/test-chart")
953953
assert.True(t, th.GetFSys().Exists(chartDir))
954954

955955
chartYamlContent, err := th.GetFSys().ReadFile(filepath.Join(chartDir, "Chart.yaml"))
@@ -983,7 +983,7 @@ debug: true
983983
require.NoError(t, err)
984984
assert.Equal(t, "bar", cm)
985985

986-
chartDir := filepath.Join(th.GetRoot(), "charts/test-chart")
986+
chartDir := filepath.Join(th.GetRoot(), "charts/test-chart-1.0.0/test-chart")
987987
assert.True(t, th.GetFSys().Exists(chartDir))
988988

989989
chartYamlContent, err := th.GetFSys().ReadFile(filepath.Join(chartDir, "Chart.yaml"))

0 commit comments

Comments
 (0)