// ValidateDefaults checks that default values validate and are properly pruned. // context is passed for supporting context cancellation during cel validation func ValidateDefaults(ctx context.Context, pth *field.Path, s *structuralschema.Structural, isResourceRoot, requirePrunedDefaults bool) (field.ErrorList, error) { … } // validate is the recursive step func for the validation. insideMeta is true if s specifies // TypeMeta or ObjectMeta. The SurroundingObjectFunc f is used to validate defaults of // TypeMeta or ObjectMeta fields. // context is passed for supporting context cancellation during cel validation func validate(ctx context.Context, pth *field.Path, s *structuralschema.Structural, rootSchema *structuralschema.Structural, f SurroundingObjectFunc, insideMeta, requirePrunedDefaults bool, costBudget int64) (allErrs field.ErrorList, error error, remainingCost int64) { … }