OnlyOnce preupgrade check (#2037)
* OnlyOnce preupgrade check Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com> * Update preupgradechecks.go Co-authored-by: Sanket Sudake <sanketsudake@gmail.com>
This commit is contained in:
co-authored by
Sanket Sudake
parent
42c22a7bbb
commit
4a1fc11b2d
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user