You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: internal/options/options.go
+12-6Lines changed: 12 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -27,12 +27,16 @@ import (
27
27
)
28
28
29
29
const (
30
-
// EventTypesAll is the argument to specify to allow all Event types.
31
-
EventTypesAll=""
30
+
// EventTypeAll is the argument to specify to allow all Event types.
31
+
EventTypeAll=""
32
32
33
-
// APIGroupsAll is the argument to specify to allow objects from all API
33
+
// APIGroupAll is the argument to specify to allow objects from all API
34
34
// groups.
35
-
APIGroupsAll=""
35
+
APIGroupAll=""
36
+
37
+
// ReportingControllerAll is the argument to specify to allow Event
38
+
// reported by all controllers.
39
+
ReportingControllerAll=""
36
40
)
37
41
38
42
// Options are the configurable parameters for kube-events-exporter.
@@ -48,6 +52,7 @@ type Options struct {
48
52
EventTypes []string
49
53
InvolvedObjectAPIGroups []string
50
54
InvolvedObjectNamespaces []string
55
+
ReportingControllers []string
51
56
52
57
flags*pflag.FlagSet
53
58
}
@@ -79,9 +84,10 @@ func (o *Options) AddFlags() {
79
84
o.flags.IntVar(&o.ExporterPort, "exporter-port", 8081, "Port to expose kube-events-exporter own metrics on.")
80
85
o.flags.BoolVar(&o.Version, "version", false, "kube-events-exporter version information")
81
86
82
-
o.flags.StringArrayVar(&o.EventTypes, "event-types", []string{EventTypesAll}, "List of allowed Event types. Defaults to all types.")
83
-
o.flags.StringArrayVar(&o.InvolvedObjectAPIGroups, "involved-object-api-groups", []string{APIGroupsAll}, "List of allowed Event involved object API groups. Defaults to all API groups.")
87
+
o.flags.StringArrayVar(&o.EventTypes, "event-types", []string{EventTypeAll}, "List of allowed Event types. Defaults to all types.")
88
+
o.flags.StringArrayVar(&o.InvolvedObjectAPIGroups, "involved-object-api-groups", []string{APIGroupAll}, "List of allowed Event involved object API groups. Defaults to all API groups.")
84
89
o.flags.StringArrayVar(&o.InvolvedObjectNamespaces, "involved-object-namespaces", []string{metav1.NamespaceAll}, "List of allowed Event involved object namespaces. Defaults to all namespaces.")
90
+
o.flags.StringArrayVar(&o.ReportingControllers, "reporting-controllers", []string{ReportingControllerAll}, "List of controllers allowed to report Event. Defaults to all controllers.")
85
91
}
86
92
87
93
// Parse parses the flag definitions from the argument list.
0 commit comments