Skip to content

Commit

Permalink
Disable SuppressPerExpressionCost
Browse files Browse the repository at this point in the history
Signed-off-by: Marvin Beckers <marvin@kubermatic.com>
  • Loading branch information
embik committed Jul 29, 2024
1 parent 85a9089 commit dc207d6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/admission/apiresourceschema/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit dc207d6

Please sign in to comment.