Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
27166e48
Commit
27166e48
authored
Feb 07, 2019
by
Chao Xu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Loosing the request body size limit to 100MB to account for the size
ratio between json and protobuf.
parent
e90409d7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
10 deletions
+14
-10
options_test.go
cmd/kube-apiserver/app/options/options_test.go
+2
-2
config.go
staging/src/k8s.io/apiserver/pkg/server/config.go
+12
-8
No files found.
cmd/kube-apiserver/app/options/options_test.go
View file @
27166e48
...
...
@@ -129,8 +129,8 @@ func TestAddFlags(t *testing.T) {
MaxMutatingRequestsInFlight
:
200
,
RequestTimeout
:
time
.
Duration
(
2
)
*
time
.
Minute
,
MinRequestTimeout
:
1800
,
JSONPatchMaxCopyBytes
:
int64
(
10
*
1024
*
1024
),
MaxRequestBodyBytes
:
int64
(
10
*
1024
*
1024
),
JSONPatchMaxCopyBytes
:
int64
(
10
0
*
1024
*
1024
),
MaxRequestBodyBytes
:
int64
(
10
0
*
1024
*
1024
),
},
Admission
:
&
kubeoptions
.
AdmissionOptions
{
GenericAdmission
:
&
apiserveroptions
.
AdmissionOptions
{
...
...
staging/src/k8s.io/apiserver/pkg/server/config.go
View file @
27166e48
...
...
@@ -267,17 +267,21 @@ func NewConfig(codecs serializer.CodecFactory) *Config {
RequestTimeout
:
time
.
Duration
(
60
)
*
time
.
Second
,
MinRequestTimeout
:
1800
,
// 10MB is the recommended maximum client request size in bytes
// the etcd server should accept. Thus, we set it as the limit
// on the size increase the "copy" operations in a json patch
// can cause. See
// the etcd server should accept. See
// 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
// the etcd server should accept. Thus, we set it as the
// maximum bytes accepted to be decoded in a resource write
// request. See
// the etcd server should accept. See
// 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
),
// Default to treating watch as a long-running operation
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment