Previous install

If an helm install has been performed with a prior version, there may be a need to update the Custom Resource Definitions in the kubernetes cluster. OneDB’s Custom Resource Definitions can change from release to release. You may see this with a helm upgrade as well when moving from one helm chart version to another, where the CRD has changed.

If you perform a helm install/upgrade and receive an error similar to the error below, update the CRDs associated with OneDB:
Error: INSTALLATION FAILED: unable to build kubernetes objects from release manifest: error validating "": error validating data: ValidationError(OneDB.spec): unknown field
Run kubectl get crds to find the name of the OneDB CRDs:
kubectl get crds |grep onedb

NAME CREATED AT
onedbcms.onedb.hcl 2022-03-08T17:02:44Z
onedbs.onedb.hcl 2022-03-08T17:02:44Z
Run a kubectl apply command to update the existing CRDs using the new CRDs in the new helm chart:

kubectl apply –f onedb-sql/chart/crds/onedb.hcl_onedbcms.yaml
kubectl apply –f onedb-sql/chart/crds/onedb.hcl_onedbs.yaml