diff --git a/cmd/preupgradechecks/preupgradechecks.go b/cmd/preupgradechecks/preupgradechecks.go index 3359a960..3522d373 100644 --- a/cmd/preupgradechecks/preupgradechecks.go +++ b/cmd/preupgradechecks/preupgradechecks.go @@ -87,7 +87,7 @@ func (client *PreUpgradeTaskClient) LatestSchemaApplied() error { return errors.New("Could not get the Function CRD") } // Any new field added in Function spec can be checked here provided the substring matches the description in CRD Validation of the field - if !strings.Contains(crd.Spec.String(), "RequestsPerPod") { + if !strings.Contains(crd.Spec.String(), "RequestsPerPod") || !strings.Contains(crd.Spec.String(), "OnceOnly") { return errors.New("Apply the newer CRDs before upgrading") } return nil