Merge pull request #69902 from pbarker/audit-int
integration test for dynamic audit Kubernetes-commit: 865d6a71f6055075d9344bca92e2182fce8fb9cc
This commit is contained in:
commit
c54b6a18a4
File diff suppressed because it is too large
Load Diff
|
|
@ -148,9 +148,14 @@ type AuditWebhookOptions struct {
|
|||
GroupVersionString string
|
||||
}
|
||||
|
||||
// AuditDynamicOptions control the configuration of dynamic backends for audit events
|
||||
type AuditDynamicOptions struct {
|
||||
// Enabled tells whether the dynamic audit capability is enabled.
|
||||
Enabled bool
|
||||
|
||||
// Configuration for batching backend. This is currently only used as an override
|
||||
// for integration tests
|
||||
BatchConfig *pluginbuffered.BatchConfig
|
||||
}
|
||||
|
||||
func NewAuditOptions() *AuditOptions {
|
||||
|
|
@ -174,7 +179,8 @@ func NewAuditOptions() *AuditOptions {
|
|||
GroupVersionString: "audit.k8s.io/v1",
|
||||
},
|
||||
DynamicOptions: AuditDynamicOptions{
|
||||
Enabled: false,
|
||||
Enabled: false,
|
||||
BatchConfig: plugindynamic.NewDefaultWebhookBatchConfig(),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
@ -634,7 +640,7 @@ func (o *AuditDynamicOptions) newBackend(
|
|||
|
||||
dc := &plugindynamic.Config{
|
||||
Informer: informer,
|
||||
BufferedConfig: plugindynamic.NewDefaultWebhookBatchConfig(),
|
||||
BufferedConfig: o.BatchConfig,
|
||||
EventConfig: plugindynamic.EventConfig{
|
||||
Sink: eventSink,
|
||||
Source: corev1.EventSource{
|
||||
|
|
|
|||
Loading…
Reference in New Issue