From 7f3a2f8ebff29d6f7e4761ff0e06f34569273280 Mon Sep 17 00:00:00 2001 From: wojtekt Date: Fri, 14 Dec 2018 11:58:40 +0100 Subject: [PATCH] Increase limit for object size in streaming serializer --- .../apimachinery/pkg/runtime/serializer/streaming/streaming.go | 2 +- .../pkg/runtime/serializer/streaming/streaming_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/staging/src/k8s.io/apimachinery/pkg/runtime/serializer/streaming/streaming.go b/staging/src/k8s.io/apimachinery/pkg/runtime/serializer/streaming/streaming.go index 91fd4ed4f0b37..a60a7c04156be 100644 --- a/staging/src/k8s.io/apimachinery/pkg/runtime/serializer/streaming/streaming.go +++ b/staging/src/k8s.io/apimachinery/pkg/runtime/serializer/streaming/streaming.go @@ -64,7 +64,7 @@ func NewDecoder(r io.ReadCloser, d runtime.Decoder) Decoder { reader: r, decoder: d, buf: make([]byte, 1024), - maxBytes: 1024 * 1024, + maxBytes: 16 * 1024 * 1024, } } diff --git a/staging/src/k8s.io/apimachinery/pkg/runtime/serializer/streaming/streaming_test.go b/staging/src/k8s.io/apimachinery/pkg/runtime/serializer/streaming/streaming_test.go index 9cae6a32c43ae..1721423acccd2 100644 --- a/staging/src/k8s.io/apimachinery/pkg/runtime/serializer/streaming/streaming_test.go +++ b/staging/src/k8s.io/apimachinery/pkg/runtime/serializer/streaming/streaming_test.go @@ -51,7 +51,7 @@ func TestDecoder(t *testing.T) { frames := [][]byte{ make([]byte, 1025), make([]byte, 1024*5), - make([]byte, 1024*1024*5), + make([]byte, 1024*1024*17), make([]byte, 1025), } pr, pw := io.Pipe()