|
|
@ -259,16 +259,18 @@ func (i *Install) RunWithContext(ctx context.Context, chrt *chart.Chart, vals ma
|
|
|
|
interactWithRemote = true
|
|
|
|
interactWithRemote = true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Pre-install anything in the crd/ directory. We do this before Helm
|
|
|
|
// Pre-install anything in the crds/ directory. We do this before Helm
|
|
|
|
// contacts the upstream server and builds the capabilities object.
|
|
|
|
// contacts the upstream server and builds the capabilities object.
|
|
|
|
if crds := chrt.CRDObjects(); !i.ClientOnly && !i.SkipCRDs && len(crds) > 0 {
|
|
|
|
if !i.ClientOnly && !i.SkipCRDs {
|
|
|
|
// On dry run, bail here
|
|
|
|
// On dry run, bail here
|
|
|
|
if i.isDryRun() {
|
|
|
|
if i.isDryRun() {
|
|
|
|
i.cfg.Log("WARNING: This chart or one of its subcharts contains CRDs. Rendering may fail or contain inaccuracies.")
|
|
|
|
i.cfg.Log("WARNING: This chart or one of its subcharts contains CRDs. Rendering may fail or contain inaccuracies.")
|
|
|
|
} else if err := i.installCRDs(crds); err != nil {
|
|
|
|
} else if crds := chrt.CRDObjects(); len(crds) > 0 {
|
|
|
|
|
|
|
|
if err := i.installCRDs(crds); err != nil {
|
|
|
|
return nil, err
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if i.ClientOnly {
|
|
|
|
if i.ClientOnly {
|
|
|
|
// Add mock objects in here so it doesn't use Kube API server
|
|
|
|
// Add mock objects in here so it doesn't use Kube API server
|
|
|
|