mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-11-04 16:07:03 +00:00
Loosing the request body size limit to 100MB to account for the size
ratio between json and protobuf.
This commit is contained in:
@@ -129,8 +129,8 @@ func TestAddFlags(t *testing.T) {
|
|||||||
MaxMutatingRequestsInFlight: 200,
|
MaxMutatingRequestsInFlight: 200,
|
||||||
RequestTimeout: time.Duration(2) * time.Minute,
|
RequestTimeout: time.Duration(2) * time.Minute,
|
||||||
MinRequestTimeout: 1800,
|
MinRequestTimeout: 1800,
|
||||||
JSONPatchMaxCopyBytes: int64(10 * 1024 * 1024),
|
JSONPatchMaxCopyBytes: int64(100 * 1024 * 1024),
|
||||||
MaxRequestBodyBytes: int64(10 * 1024 * 1024),
|
MaxRequestBodyBytes: int64(100 * 1024 * 1024),
|
||||||
},
|
},
|
||||||
Admission: &kubeoptions.AdmissionOptions{
|
Admission: &kubeoptions.AdmissionOptions{
|
||||||
GenericAdmission: &apiserveroptions.AdmissionOptions{
|
GenericAdmission: &apiserveroptions.AdmissionOptions{
|
||||||
|
|||||||
@@ -267,17 +267,21 @@ func NewConfig(codecs serializer.CodecFactory) *Config {
|
|||||||
RequestTimeout: time.Duration(60) * time.Second,
|
RequestTimeout: time.Duration(60) * time.Second,
|
||||||
MinRequestTimeout: 1800,
|
MinRequestTimeout: 1800,
|
||||||
// 10MB is the recommended maximum client request size in bytes
|
// 10MB is the recommended maximum client request size in bytes
|
||||||
// the etcd server should accept. Thus, we set it as the limit
|
// the etcd server should accept. See
|
||||||
// on the size increase the "copy" operations in a json patch
|
|
||||||
// can cause. See
|
|
||||||
// https://github.com/etcd-io/etcd/blob/release-3.3/etcdserver/server.go#L90.
|
// https://github.com/etcd-io/etcd/blob/release-3.3/etcdserver/server.go#L90.
|
||||||
JSONPatchMaxCopyBytes: int64(10 * 1024 * 1024),
|
// A request body might be encoded in json, and is converted to
|
||||||
|
// proto when persisted in etcd. Assuming the upper bound of
|
||||||
|
// the size ratio is 10:1, we set 100MB as the largest size
|
||||||
|
// increase the "copy" operations in a json patch may cause.
|
||||||
|
JSONPatchMaxCopyBytes: int64(100 * 1024 * 1024),
|
||||||
// 10MB is the recommended maximum client request size in bytes
|
// 10MB is the recommended maximum client request size in bytes
|
||||||
// the etcd server should accept. Thus, we set it as the
|
// the etcd server should accept. See
|
||||||
// maximum bytes accepted to be decoded in a resource write
|
|
||||||
// request. See
|
|
||||||
// https://github.com/etcd-io/etcd/blob/release-3.3/etcdserver/server.go#L90.
|
// https://github.com/etcd-io/etcd/blob/release-3.3/etcdserver/server.go#L90.
|
||||||
MaxRequestBodyBytes: int64(10 * 1024 * 1024),
|
// A request body might be encoded in json, and is converted to
|
||||||
|
// proto when persisted in etcd. Assuming the upper bound of
|
||||||
|
// the size ratio is 10:1, we set 100MB as the largest request
|
||||||
|
// body size to be accepted and decoded in a write request.
|
||||||
|
MaxRequestBodyBytes: int64(100 * 1024 * 1024),
|
||||||
EnableAPIResponseCompression: utilfeature.DefaultFeatureGate.Enabled(features.APIResponseCompression),
|
EnableAPIResponseCompression: utilfeature.DefaultFeatureGate.Enabled(features.APIResponseCompression),
|
||||||
|
|
||||||
// Default to treating watch as a long-running operation
|
// Default to treating watch as a long-running operation
|
||||||
|
|||||||
Reference in New Issue
Block a user