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
Ensure the directory for the file in flag --audit-log-path
exists
#110813
Ensure the directory for the file in flag --audit-log-path
exists
#110813
Conversation
Signed-off-by: Vladimir Nachev <vladimir.nachev@sap.com>
@vpnachev: This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The 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. |
Hi @vpnachev. 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. |
/release-note-none |
/release-note-edit If the parent directory of the file specified in the |
@sftim: /release-note-edit must be used with a release note block. In response to this:
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. |
/release-note-edit
|
@sftim: /release-note-edit must be used with a release note block. In response to this:
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. |
/release-note-edit
|
Sorry about the noise. Anyway, I think that text is more idiomatic and also clearer. |
/remove-sig api-machinery |
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.
one question about an edge case with an audit log path that only specifies a filename and no directory, lgtm otherwise
/ok-to-test |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: liggitt, vpnachev 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 |
…0813-origin-release-1.22 Automated cherry pick of #110813: Ensure the dir of --audit-log-path exists
…0813-origin-release-1.23 Automated cherry pick of #110813: Ensure the dir of --audit-log-path exists
…0813-origin-release-1.24 Automated cherry pick of #110813: Ensure the dir of --audit-log-path exists
What type of PR is this?
/kind bug
/sig api-machinery
/sig auth
/area apiserver
What this PR does / why we need it:
Ensure the directory for the file in flag
--audit-log-path
exists.Until #95387 the
gopkg.in/natefinch/lumberjack.v2
module was taking care to create the file and the directory specified in the--audit-log-path
flag, but since then if the directory of the file does not exist, the apiserver (not k8s only, may be any extension apiserver using the k8s.io/apiserver module) fails with error likewhen the direcotry
/tmp/audit
does not exist.With this change, if the directory already exist, nothing is changed, including the already set permissions.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: