@@ -26,9 +26,6 @@ type config struct {
2626 // EventQueueSize specifies the buffer size of the channel to receive
2727 // monitor events.
2828 EventQueueSize int `mapstructure:"hubble-event-queue-size"`
29- // SkipUnknownCGroupIDs specifies if events with unknown cgroup ids should
30- // be skipped.
31- SkipUnknownCGroupIDs bool `mapstructure:"hubble-skip-unknown-cgroup-ids"`
3229 // MonitorEvents specifies Cilium monitor events for Hubble to observe. By
3330 // default, Hubble observes all monitor events.
3431 MonitorEvents []string `mapstructure:"hubble-monitor-events"`
@@ -89,22 +86,6 @@ type config struct {
8986 // RecorderSinkQueueSize is the queue size for each recorder sink.
9087 RecorderSinkQueueSize int `mapstructure:"hubble-recorder-sink-queue-size"`
9188
92- // EnableRedact controls if sensitive information will be redacted from L7
93- // flows.
94- EnableRedact bool `mapstructure:"hubble-redact-enabled"`
95- // RedactHttpURLQuery controls if the URL query will be redacted from flows.
96- RedactHttpURLQuery bool `mapstructure:"hubble-redact-http-urlquery"`
97- // RedactHttpUserInfo controls if the user info will be redacted from flows.
98- RedactHttpUserInfo bool `mapstructure:"hubble-redact-http-userinfo"`
99- // RedactHttpHeadersAllow controls which http headers will not be redacted
100- // from flows.
101- RedactHttpHeadersAllow []string `mapstructure:"hubble-redact-http-headers-allow"`
102- // RedactHttpHeadersDeny controls which http headers will be redacted from
103- // flows.
104- RedactHttpHeadersDeny []string `mapstructure:"hubble-redact-http-headers-deny"`
105- // RedactKafkaAPIKey controls if Kafka API key will be redacted from flows.
106- RedactKafkaAPIKey bool `mapstructure:"hubble-redact-kafka-apikey"`
107-
10889 // EnableK8sDropEvents controls whether Hubble should create v1.Events for
10990 // packet drops related to pods.
11091 EnableK8sDropEvents bool `mapstructure:"hubble-drop-events"`
@@ -120,10 +101,9 @@ type config struct {
120101var defaultConfig = config {
121102 EnableHubble : false ,
122103 // Hubble internals (parser, ringbuffer) configuration
123- EventBufferCapacity : observeroption .Default .MaxFlows .AsInt (),
124- EventQueueSize : 0 , // see getDefaultMonitorQueueSize()
125- SkipUnknownCGroupIDs : true ,
126- MonitorEvents : []string {},
104+ EventBufferCapacity : observeroption .Default .MaxFlows .AsInt (),
105+ EventQueueSize : 0 , // see getDefaultMonitorQueueSize()
106+ MonitorEvents : []string {},
127107 // Hubble local server configuration
128108 SocketPath : hubbleDefaults .SocketPath ,
129109 // Hubble TCP server configuration
@@ -148,13 +128,6 @@ var defaultConfig = config{
148128 EnableRecorderAPI : true ,
149129 RecorderStoragePath : hubbleDefaults .RecorderStoragePath ,
150130 RecorderSinkQueueSize : 1024 ,
151- // Hubble field redaction configuration
152- EnableRedact : false ,
153- RedactHttpURLQuery : false ,
154- RedactHttpUserInfo : true ,
155- RedactHttpHeadersAllow : []string {},
156- RedactHttpHeadersDeny : []string {},
157- RedactKafkaAPIKey : false ,
158131 // Hubble k8s v1.Events integration configuration.
159132 EnableK8sDropEvents : false ,
160133 K8sDropEventsInterval : 2 * time .Minute ,
@@ -167,7 +140,6 @@ func (def config) Flags(flags *pflag.FlagSet) {
167140 // Hubble internals (parser, ringbuffer) configuration
168141 flags .Int ("hubble-event-buffer-capacity" , def .EventBufferCapacity , "Capacity of Hubble events buffer. The provided value must be one less than an integer power of two and no larger than 65535 (ie: 1, 3, ..., 2047, 4095, ..., 65535)" )
169142 flags .Int ("hubble-event-queue-size" , def .EventQueueSize , "Buffer size of the channel to receive monitor events." )
170- flags .Bool ("hubble-skip-unknown-cgroup-ids" , def .SkipUnknownCGroupIDs , "Skip Hubble events with unknown cgroup ids" )
171143 flags .StringSlice ("hubble-monitor-events" , def .MonitorEvents ,
172144 fmt .Sprintf (
173145 "Cilium monitor events for Hubble to observe: [%s]. By default, Hubble observes all monitor events." ,
@@ -197,13 +169,6 @@ func (def config) Flags(flags *pflag.FlagSet) {
197169 flags .Bool ("enable-hubble-recorder-api" , def .EnableRecorderAPI , "Enable the Hubble recorder API" )
198170 flags .String ("hubble-recorder-storage-path" , def .RecorderStoragePath , "Directory in which pcap files created via the Hubble Recorder API are stored" )
199171 flags .Int ("hubble-recorder-sink-queue-size" , def .RecorderSinkQueueSize , "Queue size of each Hubble recorder sink" )
200- // Hubble field redaction configuration
201- flags .Bool ("hubble-redact-enabled" , def .EnableRedact , "Hubble redact sensitive information from flows" )
202- flags .Bool ("hubble-redact-http-urlquery" , def .RedactHttpURLQuery , "Hubble redact http URL query from flows" )
203- flags .Bool ("hubble-redact-http-userinfo" , def .RedactHttpUserInfo , "Hubble redact http user info from flows" )
204- flags .StringSlice ("hubble-redact-http-headers-allow" , def .RedactHttpHeadersAllow , "HTTP headers to keep visible in flows" )
205- flags .StringSlice ("hubble-redact-http-headers-deny" , def .RedactHttpHeadersDeny , "HTTP headers to redact from flows" )
206- flags .Bool ("hubble-redact-kafka-apikey" , def .RedactKafkaAPIKey , "Hubble redact Kafka API key from flows" )
207172 // Hubble k8s v1.Events integration configuration.
208173 flags .Bool ("hubble-drop-events" , def .EnableK8sDropEvents , "Emit packet drop Events related to pods (alpha)" )
209174 flags .Duration ("hubble-drop-events-interval" , def .K8sDropEventsInterval , "Minimum time between emitting same events" )
@@ -235,13 +200,6 @@ func (cfg *config) normalize() {
235200 }
236201}
237202
238- func (cfg config ) validate () error {
239- if len (cfg .RedactHttpHeadersAllow ) > 0 && len (cfg .RedactHttpHeadersDeny ) > 0 {
240- return fmt .Errorf ("Only one of --hubble-redact-http-headers-allow and --hubble-redact-http-headers-deny can be specified, not both" )
241- }
242- return nil
243- }
244-
245203func getDefaultMonitorQueueSize (numCPU int ) int {
246204 monitorQueueSize := numCPU * ciliumDefaults .MonitorQueueSizePerCPU
247205 if monitorQueueSize > ciliumDefaults .MonitorQueueSizePerCPUMaximum {
0 commit comments