mittwald / go-helm-client

Go client for accessing the Helm package manager

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CRD upgrade fails when new CRDs are added

martin-helmich opened this issue · comments

This issue was introduced in #38.

When a new CRD is added to an already released chart, the upgradeCRDV1 and upgradeCRDV1Beta1 methods will fail, since the NotFound error is not explicitly handled:

go-helm-client/client.go

Lines 636 to 639 in 1d53dff

existingCRDObj, err := cl.ApiextensionsV1().CustomResourceDefinitions().Get(ctx, crdObj.Name, metav1.GetOptions{})
if err != nil {
return err
}

In this case, the new CRD should simply be created.