`helm upgrade` currently skips installing all CRDs during upgrade,
despite having a SkipCRDs option.
This PR updates the code so that we install new CRDs during upgrade,
which allows an updated chart to provide a new CRD.
This is done in the same order as it would take place on an install
Signed-off-by: Richard Whitehouse <richard.whitehouse@microsoft.com>
// Install is a purely informative flag that indicates whether this upgrade was done in "install" mode.
// Install is a largely informative flag that indicates whether this upgrade was done in "install" mode.
//
// Applications may use this to determine whether this Upgrade operation was done as part of a
// pure upgrade (Upgrade.Install == false) or as part of an install-or-upgrade operation
@ -55,12 +55,14 @@ type Upgrade struct {
// Setting this to `true` will NOT cause `Upgrade` to perform an install if the release does not exist.
// That process must be handled by creating an Install action directly. See cmd/upgrade.go for an
// example of how this flag is used.
//
// This flag does affect how CRDs are handled - CRDs will only be installed if this flag is set.
Installbool
// Devel indicates that the operation is done in devel mode.
Develbool
// Namespace is the namespace in which this operation should be performed.
Namespacestring
// SkipCRDs skips installing CRDs when install flag is enabled during upgrade
// SkipCRDs skips installing new CRDs during upgrade, if this upgrade was done in install mode. Note, CRDs will never be upgraded if they already exist.