From 584165cfcc861bc0c8911e11347734cfc8feb8c8 Mon Sep 17 00:00:00 2001 From: William Zhang Date: Wed, 8 Dec 2021 17:12:37 +0800 Subject: [PATCH] cleanup(apiserver): delete the --max-resource-write-bytes & --json-patch-max-copy-bytes description. Change-Id: I0fe27dce27db6a1e186bd44a968c6e931de88dd8 Signed-off-by: William Zhang --- .../k8s.io/apiserver/pkg/server/options/server_run_options.go | 4 ++-- .../apiserver/pkg/server/options/server_run_options_test.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/staging/src/k8s.io/apiserver/pkg/server/options/server_run_options.go b/staging/src/k8s.io/apiserver/pkg/server/options/server_run_options.go index 07a887a5399..ef841504041 100644 --- a/staging/src/k8s.io/apiserver/pkg/server/options/server_run_options.go +++ b/staging/src/k8s.io/apiserver/pkg/server/options/server_run_options.go @@ -151,11 +151,11 @@ func (s *ServerRunOptions) Validate() []error { } if s.JSONPatchMaxCopyBytes < 0 { - errors = append(errors, fmt.Errorf("--json-patch-max-copy-bytes can not be negative value")) + errors = append(errors, fmt.Errorf("ServerRunOptions.JSONPatchMaxCopyBytes can not be negative value")) } if s.MaxRequestBodyBytes < 0 { - errors = append(errors, fmt.Errorf("--max-resource-write-bytes can not be negative value")) + errors = append(errors, fmt.Errorf("ServerRunOptions.MaxRequestBodyBytes can not be negative value")) } if err := validateHSTSDirectives(s.HSTSDirectives); err != nil { diff --git a/staging/src/k8s.io/apiserver/pkg/server/options/server_run_options_test.go b/staging/src/k8s.io/apiserver/pkg/server/options/server_run_options_test.go index b5d0ecd8ef8..1dd103a15e1 100644 --- a/staging/src/k8s.io/apiserver/pkg/server/options/server_run_options_test.go +++ b/staging/src/k8s.io/apiserver/pkg/server/options/server_run_options_test.go @@ -99,7 +99,7 @@ func TestServerRunOptionsValidate(t *testing.T) { JSONPatchMaxCopyBytes: -10 * 1024 * 1024, MaxRequestBodyBytes: 10 * 1024 * 1024, }, - expectErr: "--json-patch-max-copy-bytes can not be negative value", + expectErr: "ServerRunOptions.JSONPatchMaxCopyBytes can not be negative value", }, { name: "Test when MaxRequestBodyBytes is negative value", @@ -113,7 +113,7 @@ func TestServerRunOptionsValidate(t *testing.T) { JSONPatchMaxCopyBytes: 10 * 1024 * 1024, MaxRequestBodyBytes: -10 * 1024 * 1024, }, - expectErr: "--max-resource-write-bytes can not be negative value", + expectErr: "ServerRunOptions.MaxRequestBodyBytes can not be negative value", }, { name: "Test when LivezGracePeriod is negative value",