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

add audit-log-compress to apiserver #94066

Merged
merged 1 commit into from Oct 29, 2020

Conversation

lojies
Copy link
Contributor

@lojies lojies commented Aug 18, 2020

What type of PR is this?
/kind feature

What this PR does / why we need it:

Add --audit-log-compress to apiserver.This can determine if the rotated log files should be compressed using gzip.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

kube-apiserver: added support for compressing rotated audit log files with `--audit-log-compress`

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Aug 18, 2020
@k8s-ci-robot
Copy link
Contributor

Hi @lojies. 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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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.

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Aug 18, 2020
@k8s-ci-robot k8s-ci-robot added area/apiserver sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Aug 18, 2020
@ping035627
Copy link
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 18, 2020
@fedebongio
Copy link
Contributor

/sig auth

@k8s-ci-robot k8s-ci-robot added the sig/auth Categorizes an issue or PR as relevant to SIG Auth. label Aug 18, 2020
@fedebongio
Copy link
Contributor

Hi @lojies we assume you intend this one for 1.20, are we right?
/cc @tallclair

@lojies
Copy link
Contributor Author

lojies commented Aug 19, 2020

@fedebongio yes.

@ping035627
Copy link
Contributor

/assign @liggitt

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Sep 3, 2020
@liggitt
Copy link
Member

liggitt commented Sep 3, 2020

This seems sensible to me. @deads2k, any concerns with this?

@liggitt liggitt added the priority/backlog Higher priority than priority/awaiting-more-evidence. label Sep 3, 2020
@k8s-ci-robot k8s-ci-robot removed the needs-priority Indicates a PR lacks a `priority/foo` label and requires one. label Sep 3, 2020
@lojies
Copy link
Contributor Author

lojies commented Sep 30, 2020

@deads2k

@sftim
Copy link
Contributor

sftim commented Oct 28, 2020

Hi.
I'd expect this command line argument to work like: --audit-log-compress=gzip or --audit-log-compress=zstd (which allows future extension). If I were implementing this I'd force setting the compressed encoding you plan to use rather than inferring gzip as a default, because then that allows a future change that drops gzip support.

Is that a good model for how it can work?

@@ -449,6 +450,7 @@ func (o *AuditLogOptions) AddFlags(fs *pflag.FlagSet) {
strings.Join(pluginlog.AllowedFormats, ",")+".")
fs.StringVar(&o.GroupVersionString, "audit-log-version", o.GroupVersionString,
"API group and version used for serializing audit events written to log.")
fs.BoolVar(&o.Compress, "audit-log-compress", o.Compress, "Compress determines if the rotated log files should be compressed using gzip.")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: "If set, the rotated log files will be compressed using gzip".

@deads2k
Copy link
Contributor

deads2k commented Oct 28, 2020

Hi.
I'd expect this command line argument to work like: --audit-log-compress=gzip or --audit-log-compress=zstd (which allows future extension). If I were implementing this I'd force setting the compressed encoding you plan to use rather than inferring gzip as a default, because then that allows a future change that drops gzip support.

Is that a good model for how it can work?

The base library doesn't provide that option. If that library changed someday, with some effort this could be extended, but I wouldn't make it a prerequisite.

Looks straight-forward, but I'd like the nit on the help.

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: deads2k, lojies

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 28, 2020
@sftim
Copy link
Contributor

sftim commented Oct 28, 2020

(to be clear, I'm not asking for the zstd encoding, just to leave room for adding it)
Also don't feel that this feedback should block approval if reviewers are happy.

@deads2k
Copy link
Contributor

deads2k commented Oct 29, 2020

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 29, 2020
@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

1 similar comment
@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

@k8s-ci-robot k8s-ci-robot merged commit 5ee72a4 into kubernetes:master Oct 29, 2020
@k8s-ci-robot k8s-ci-robot added this to the v1.20 milestone Oct 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/apiserver cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. priority/backlog Higher priority than priority/awaiting-more-evidence. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/auth Categorizes an issue or PR as relevant to SIG Auth. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants