From 898bf794dbb1a98b44351bde117f2b9e15746e28 Mon Sep 17 00:00:00 2001 From: Tamal Saha Date: Wed, 20 Sep 2023 08:00:13 -0700 Subject: [PATCH] Handle empty preset names Signed-off-by: Tamal Saha --- go.mod | 2 +- go.sum | 4 ++-- vendor/kubepack.dev/lib-helm/pkg/values/preset.go | 5 +++-- vendor/modules.txt | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 13d971743..78dee9cae 100644 --- a/go.mod +++ b/go.mod @@ -49,7 +49,7 @@ require ( kmodules.xyz/resource-metrics v0.25.2 kmodules.xyz/sets v0.25.0 kubeops.dev/scanner v0.0.13-0.20230610152531-83d060ed8780 - kubepack.dev/lib-helm v0.7.2-0.20230920082220-472f4c7a79c8 + kubepack.dev/lib-helm v0.7.2-0.20230920145804-ede12e65df63 sigs.k8s.io/cli-utils v0.34.0 sigs.k8s.io/controller-runtime v0.13.1 sigs.k8s.io/yaml v1.3.0 diff --git a/go.sum b/go.sum index 875503960..641fe2c27 100644 --- a/go.sum +++ b/go.sum @@ -2137,8 +2137,8 @@ kmodules.xyz/sets v0.25.0 h1:belY/3trp/M/CKc1TEteA40jb2uCIdwKHhjpvrIxG+8= kmodules.xyz/sets v0.25.0/go.mod h1:ICWmplgCsxniWkImSBGlJrLT9npqOXKhX/Bwbc7bmEw= kubeops.dev/scanner v0.0.13-0.20230610152531-83d060ed8780 h1:w4fP2k8lahFVKlWOKah208zfdfWJFPUALFwfdvuGZ5c= kubeops.dev/scanner v0.0.13-0.20230610152531-83d060ed8780/go.mod h1:XWtmGm+ugCgxjYkYBI2Dcnlf042cYB3EkxQ4zSpu2a4= -kubepack.dev/lib-helm v0.7.2-0.20230920082220-472f4c7a79c8 h1:2qz5CsDvydFWpayIA9bY8zL69K1Hdlmr0Z1SNamrkrw= -kubepack.dev/lib-helm v0.7.2-0.20230920082220-472f4c7a79c8/go.mod h1:1VSh+9iOadPO2Za1iwe0hLqHLbJLCkcTTPF99WutUQU= +kubepack.dev/lib-helm v0.7.2-0.20230920145804-ede12e65df63 h1:+vsVDWkYZ1iPT7gLeDRdBikwMX0O+yt/tuDEL0zc0XI= +kubepack.dev/lib-helm v0.7.2-0.20230920145804-ede12e65df63/go.mod h1:1VSh+9iOadPO2Za1iwe0hLqHLbJLCkcTTPF99WutUQU= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/vendor/kubepack.dev/lib-helm/pkg/values/preset.go b/vendor/kubepack.dev/lib-helm/pkg/values/preset.go index 34ac60489..21077de3d 100644 --- a/vendor/kubepack.dev/lib-helm/pkg/values/preset.go +++ b/vendor/kubepack.dev/lib-helm/pkg/values/preset.go @@ -19,7 +19,8 @@ import ( func LoadPresetValues(kc client.Client, ref chartsapi.ChartPresetFlatRef) ([]chartsapi.ChartPresetValues, error) { if ref.PresetName == "" { - return nil, errors.New("preset name is not set") + // required for editor charts + return nil, nil } rid := &kmapi.ResourceID{ @@ -48,7 +49,7 @@ func LoadPresetValues(kc client.Client, ref chartsapi.ChartPresetFlatRef) ([]cha } if variant.Selector == nil { - return nil, nil // ERROR? + return nil, nil } sel, err := metav1.LabelSelectorAsSelector(variant.Selector) if err != nil { diff --git a/vendor/modules.txt b/vendor/modules.txt index 9b64858aa..8a6cbe437 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1845,7 +1845,7 @@ kubeops.dev/scanner/apis/scanner kubeops.dev/scanner/apis/scanner/v1alpha1 kubeops.dev/scanner/apis/trivy kubeops.dev/scanner/client/clientset/versioned/scheme -# kubepack.dev/lib-helm v0.7.2-0.20230920082220-472f4c7a79c8 +# kubepack.dev/lib-helm v0.7.2-0.20230920145804-ede12e65df63 ## explicit; go 1.18 kubepack.dev/lib-helm/pkg/values # sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.33