@ -233,6 +233,13 @@ func (u *Upgrade) prepareUpgrade(name string, chart *chart.Chart, vals map[strin
func ( u * Upgrade ) performUpgrade ( originalRelease , upgradedRelease * release . Release ) ( * release . Release , error ) {
func ( u * Upgrade ) performUpgrade ( originalRelease , upgradedRelease * release . Release ) ( * release . Release , error ) {
current , err := u . cfg . KubeClient . Build ( bytes . NewBufferString ( originalRelease . Manifest ) , false )
current , err := u . cfg . KubeClient . Build ( bytes . NewBufferString ( originalRelease . Manifest ) , false )
if err != nil {
if err != nil {
// Checking for removed Kubernetes API error so can provide a more informative error message to the user
// Ref: https://github.com/helm/helm/issues/7219
if strings . Contains ( err . Error ( ) , "unable to recognize \"\": no matches for kind" ) {
return upgradedRelease , errors . Wrap ( err , "current release manifest contains removed kubernetes api(s) for this " +
"kubernetes version and it is therefore unable to build the kubernetes " +
"objects for performing the diff. error from kubernetes" )
}
return upgradedRelease , errors . Wrap ( err , "unable to build kubernetes objects from current release manifest" )
return upgradedRelease , errors . Wrap ( err , "unable to build kubernetes objects from current release manifest" )
}
}
target , err := u . cfg . KubeClient . Build ( bytes . NewBufferString ( upgradedRelease . Manifest ) , ! u . DisableOpenAPIValidation )
target , err := u . cfg . KubeClient . Build ( bytes . NewBufferString ( upgradedRelease . Manifest ) , ! u . DisableOpenAPIValidation )