From dc207d6fcb62b92de41a8d0a7c906c65f7101db3 Mon Sep 17 00:00:00 2001 From: Marvin Beckers Date: Wed, 24 Jul 2024 19:02:40 +0200 Subject: [PATCH] Disable SuppressPerExpressionCost Signed-off-by: Marvin Beckers --- pkg/admission/apiresourceschema/validation.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/admission/apiresourceschema/validation.go b/pkg/admission/apiresourceschema/validation.go index 404fffb45924..889bba586907 100644 --- a/pkg/admission/apiresourceschema/validation.go +++ b/pkg/admission/apiresourceschema/validation.go @@ -171,6 +171,11 @@ var defaultValidationOpts = crdvalidation.ValidationOptions{ // Here this does not matter. The whole resource is always immutable. RequireImmutableNames: false, + // in Kube, the validation on CRD update will set it to true for unchanged schemas + // (ratcheting validation). Here, as everything is immutable, this case never + // happens. Hence, we can statically set it to false. + SuppressPerExpressionCost: false, + RequireOpenAPISchema: true, RequireValidPropertyType: true, RequireStructuralSchema: true,