Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Useless flag: --max-resource-write-bytes, --json-patch-max-copy-bytes #106873

Closed
warmchang opened this issue Dec 8, 2021 · 2 comments · Fixed by #106875
Closed

Useless flag: --max-resource-write-bytes, --json-patch-max-copy-bytes #106873

warmchang opened this issue Dec 8, 2021 · 2 comments · Fixed by #106875
Assignees
Labels
area/apiserver kind/bug Categorizes issue or PR as related to a bug. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@warmchang
Copy link
Contributor

warmchang commented Dec 8, 2021

What happened?

kube-apiserver has no --max-resource-write-bytes & --json-patch-max-copy-bytes option.

What did you expect to happen?

Correct the error message to not use the "--max-resource-write-bytes" & "--json-patch-max-copy-bytes" string.

How can we reproduce it (as minimally and precisely as possible)?

Check the source code:

if s.JSONPatchMaxCopyBytes < 0 {
errors = append(errors, fmt.Errorf("--json-patch-max-copy-bytes can not be negative value"))
}
if s.MaxRequestBodyBytes < 0 {
errors = append(errors, fmt.Errorf("--max-resource-write-bytes can not be negative value"))
}

Anything else we need to know?

No response

Kubernetes version

v1.19 ~ v1.23

eg:

[root@paas-controller-2:/]$ kubectl version
Client Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.4", GitCommit:"d360454c9bcd1634cf4cc52d1867af5491dc9c5f", GitTreeState:"archive", BuildDate:"2021-06-23T02:02:03Z", GoVersion:"go1.15.6", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.4", GitCommit:"d360454c9bcd1634cf4cc52d1867af5491dc9c5f", GitTreeState:"archive", BuildDate:"2021-09-30T08:28:08Z", GoVersion:"go1.15.6", Compiler:"gc", Platform:"linux/amd64"}
[root@paas-controller-2:/]$

Cloud provider

OS version

# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here

# On Windows:
C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture
# paste output here

Install tools

Container runtime (CRI) and and version (if applicable)

Related plugins (CNI, CSI, ...) and versions (if applicable)

@warmchang warmchang added the kind/bug Categorizes issue or PR as related to a bug. label Dec 8, 2021
@k8s-ci-robot k8s-ci-robot added needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Dec 8, 2021
@warmchang
Copy link
Contributor Author

warmchang commented Dec 8, 2021

/sig api-machinery
/area apiserver
/kind cleanup
/assign

FYI:
#88976 (comment)
#88968 (comment)

@k8s-ci-robot k8s-ci-robot added sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. area/apiserver kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Dec 8, 2021
@fedebongio
Copy link
Contributor

/cc @caesarxuchao
/triage accepted

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Dec 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/apiserver kind/bug Categorizes issue or PR as related to a bug. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
3 participants