From 342b5e0a6f7a115cbaead0a4f5280ee0d0f8f64c Mon Sep 17 00:00:00 2001 From: Matthijs Brouns Date: Tue, 16 Apr 2024 18:17:17 +0200 Subject: [PATCH] don't install CRDs of disabled subcharts Signed-off-by: Matthijs Brouns --- internal/action/install.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/action/install.go b/internal/action/install.go index 035cd3ab5..cd57b0f9f 100644 --- a/internal/action/install.go +++ b/internal/action/install.go @@ -55,6 +55,11 @@ func Install(ctx context.Context, config *helmaction.Configuration, obj *v2.Helm if err != nil { return nil, err } + + if err := helmchartutil.ProcessDependenciesWithMerge(chrt, vals); err != nil { + return nil, err + } + if err := applyCRDs(config, policy, chrt, setOriginVisitor(v2.GroupVersion.Group, obj.Namespace, obj.Name)); err != nil { return nil, fmt.Errorf("failed to apply CustomResourceDefinitions: %w", err) }