parent
3f86b74437
commit
0c1fca8f32
|
|
@ -67,7 +67,7 @@ func (st *HelmState) goGetterChart(chart, dir, cacheDir string, force bool) (str
|
||||||
}
|
}
|
||||||
|
|
||||||
if filepath.IsAbs(chart) || strings.HasPrefix(chart, ".") {
|
if filepath.IsAbs(chart) || strings.HasPrefix(chart, ".") {
|
||||||
return chart, fmt.Errorf("chart path %q not found", chart)
|
return "", fmt.Errorf("chart path %s not found", chart)
|
||||||
}
|
}
|
||||||
|
|
||||||
if strings.HasPrefix(chart, "oci://") {
|
if strings.HasPrefix(chart, "oci://") {
|
||||||
|
|
@ -136,10 +136,6 @@ func (st *HelmState) PrepareChartify(helm helmexec.Interface, release *ReleaseSp
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if filepath.IsAbs(dependenceChart) {
|
|
||||||
dependenceChart = fmt.Sprintf("file://%s", dependenceChart)
|
|
||||||
}
|
|
||||||
|
|
||||||
c.Opts.AdhocChartDependencies = append(c.Opts.AdhocChartDependencies, chartify.ChartDependency{
|
c.Opts.AdhocChartDependencies = append(c.Opts.AdhocChartDependencies, chartify.ChartDependency{
|
||||||
Alias: d.Alias,
|
Alias: d.Alias,
|
||||||
Chart: dependenceChart,
|
Chart: dependenceChart,
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,34 @@ func TestGoGetter(t *testing.T) {
|
||||||
out: "raw/incubator",
|
out: "raw/incubator",
|
||||||
err: "",
|
err: "",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
chart: "oci://my-oci-registry/helm-repo/envoy",
|
||||||
|
dir: "",
|
||||||
|
force: false,
|
||||||
|
out: "oci://my-oci-registry/helm-repo/envoy",
|
||||||
|
err: "",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
chart: "testdata",
|
||||||
|
dir: "",
|
||||||
|
force: false,
|
||||||
|
out: "testdata",
|
||||||
|
err: "",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
chart: "./testdata",
|
||||||
|
dir: "",
|
||||||
|
force: false,
|
||||||
|
out: "./testdata",
|
||||||
|
err: "",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
chart: "./noexist",
|
||||||
|
dir: "",
|
||||||
|
force: false,
|
||||||
|
out: "",
|
||||||
|
err: "chart path ./noexist not found",
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
for i, tc := range testcases {
|
for i, tc := range testcases {
|
||||||
|
|
|
||||||
3
test/e2e/template/helmfile/testdata/snapshot/go_getter_support_ad_hoc/config.yaml
vendored
Normal file
3
test/e2e/template/helmfile/testdata/snapshot/go_getter_support_ad_hoc/config.yaml
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
helmfileArgs:
|
||||||
|
- template
|
||||||
|
- --concurrency=1
|
||||||
18
test/e2e/template/helmfile/testdata/snapshot/go_getter_support_ad_hoc/input.yaml
vendored
Normal file
18
test/e2e/template/helmfile/testdata/snapshot/go_getter_support_ad_hoc/input.yaml
vendored
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
helmDefaults:
|
||||||
|
wait: false
|
||||||
|
cleanupOnFail: true
|
||||||
|
createNamespace: true
|
||||||
|
|
||||||
|
repositories:
|
||||||
|
- name: prometheus-community
|
||||||
|
url: https://prometheus-community.github.io/helm-charts
|
||||||
|
|
||||||
|
releases:
|
||||||
|
- name: kube-prometheus-stack
|
||||||
|
namespace: monitoring
|
||||||
|
chart: prometheus-community/kube-prometheus-stack
|
||||||
|
version: 45.17.0
|
||||||
|
disableValidationOnInstall: true
|
||||||
|
dependencies:
|
||||||
|
- chart: "git::https://github.com/goharbor/harbor-helm.git@"
|
||||||
|
version: 0.64.1
|
||||||
0
test/e2e/template/helmfile/testdata/snapshot/go_getter_support_ad_hoc/output.yaml
vendored
Normal file
0
test/e2e/template/helmfile/testdata/snapshot/go_getter_support_ad_hoc/output.yaml
vendored
Normal file
Loading…
Reference in New Issue