-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Disable some flags in kube-apiserver when logging-format is not text #13264
Conversation
Disable these flags because these are not accepted. * --logtostderr * --alsologtostderr * --log-file
Hi @h3poteto. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/ok-to-test |
"--logtostderr=false", // https://github.com/kubernetes/klog/issues/60 | ||
"--alsologtostderr", | ||
"--log-file=/var/log/kube-apiserver.log") | ||
if kubeAPIServer.LogFormat != "" && kubeAPIServer.LogFormat != "text" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be done for b.IsKubernetesGTE("1.23")
too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, when Kubernetes version is greater than 1.23, we use go-runner
and we don't specify these logging options as kube-apiserver's flags. So it is no problem.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hakman The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
…-upstream-release-1.22 Automated cherry pick of #13264: Disable some flags in kube-apiserver when logging-format is
/retest |
…-upstream-release-1.23 Automated cherry pick of #13264: Disable some flags in kube-apiserver when logging-format is
Fixes #13245
Disable these flags because these are not accepted when I use
json
aslogging-format
.--logtostderr
--alsologtostderr
--log-file
According to Kubernetes document:
https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/
And when I specify these flags, kube-apiserver says an error.