added option to disable sync event creation (#8528)
* added option to disable event creation Signed-off-by: Marcus Noble <github@marcusnoble.co.uk> * Re-trigger github workflows Signed-off-by: Marcus Noble <github@marcusnoble.co.uk> Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
This commit is contained in:
parent
54dd88a5d1
commit
e7bee5308e
8 changed files with 147 additions and 17 deletions
|
|
@ -251,7 +251,8 @@ func New(
|
|||
updateCh *channels.RingChannel,
|
||||
disableCatchAll bool,
|
||||
deepInspector bool,
|
||||
icConfig *ingressclass.IngressClassConfiguration) Storer {
|
||||
icConfig *ingressclass.IngressClassConfiguration,
|
||||
disableSyncEvents bool) Storer {
|
||||
|
||||
store := &k8sStore{
|
||||
informers: &Informer{},
|
||||
|
|
@ -267,9 +268,11 @@ func New(
|
|||
|
||||
eventBroadcaster := record.NewBroadcaster()
|
||||
eventBroadcaster.StartLogging(klog.Infof)
|
||||
eventBroadcaster.StartRecordingToSink(&clientcorev1.EventSinkImpl{
|
||||
Interface: client.CoreV1().Events(namespace),
|
||||
})
|
||||
if !disableSyncEvents {
|
||||
eventBroadcaster.StartRecordingToSink(&clientcorev1.EventSinkImpl{
|
||||
Interface: client.CoreV1().Events(namespace),
|
||||
})
|
||||
}
|
||||
recorder := eventBroadcaster.NewRecorder(scheme.Scheme, corev1.EventSource{
|
||||
Component: "nginx-ingress-controller",
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue