mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 10:51:29 +00:00
Merge pull request #94066 from lojies/auditlogcompress
add audit-log-compress to apiserver
This commit is contained in:
commit
5ee72a49cb
@ -120,6 +120,7 @@ type AuditLogOptions struct {
|
|||||||
MaxBackups int
|
MaxBackups int
|
||||||
MaxSize int
|
MaxSize int
|
||||||
Format string
|
Format string
|
||||||
|
Compress bool
|
||||||
|
|
||||||
BatchOptions AuditBatchOptions
|
BatchOptions AuditBatchOptions
|
||||||
TruncateOptions AuditTruncateOptions
|
TruncateOptions AuditTruncateOptions
|
||||||
@ -449,6 +450,7 @@ func (o *AuditLogOptions) AddFlags(fs *pflag.FlagSet) {
|
|||||||
strings.Join(pluginlog.AllowedFormats, ",")+".")
|
strings.Join(pluginlog.AllowedFormats, ",")+".")
|
||||||
fs.StringVar(&o.GroupVersionString, "audit-log-version", o.GroupVersionString,
|
fs.StringVar(&o.GroupVersionString, "audit-log-version", o.GroupVersionString,
|
||||||
"API group and version used for serializing audit events written to log.")
|
"API group and version used for serializing audit events written to log.")
|
||||||
|
fs.BoolVar(&o.Compress, "audit-log-compress", o.Compress, "If set, the rotated log files will be compressed using gzip.")
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *AuditLogOptions) Validate() []error {
|
func (o *AuditLogOptions) Validate() []error {
|
||||||
@ -513,6 +515,7 @@ func (o *AuditLogOptions) getWriter() io.Writer {
|
|||||||
MaxAge: o.MaxAge,
|
MaxAge: o.MaxAge,
|
||||||
MaxBackups: o.MaxBackups,
|
MaxBackups: o.MaxBackups,
|
||||||
MaxSize: o.MaxSize,
|
MaxSize: o.MaxSize,
|
||||||
|
Compress: o.Compress,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return w
|
return w
|
||||||
|
Loading…
Reference in New Issue
Block a user