Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 29 additions & 14 deletions api/flowcollector/v1beta2/flowcollector_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,8 @@ type EBPFMetrics struct {
Server MetricsServerConfig `json:"server,omitempty"`

// Set `enable` to `false` to disable eBPF agent metrics collection. It is enabled by default.
// +optional
//+kubebuilder:default:=true
//+optional
Enable *bool `json:"enable,omitempty"`

// `disableAlerts` is a list of alerts that should be disabled.
Expand Down Expand Up @@ -299,6 +300,8 @@ type EBPFFlowFilterRule struct {
// `EBPFFlowFilter` defines the desired eBPF agent configuration regarding flow filtering.
type EBPFFlowFilter struct {
// Set `enable` to `true` to enable the eBPF flow filtering feature.
//+kubebuilder:default:=false
//+optional
Enable *bool `json:"enable,omitempty"`

// [Deprecated (*)]. This setting is not used anymore. It is replaced with the `rules` list.
Expand Down Expand Up @@ -369,7 +372,7 @@ type FlowCollectorEBPF struct {
// Privileged mode for the eBPF Agent container. When set to `true`, the agent is able to capture more traffic, including from secondary interfaces.
// When ignored or set to `false`, the operator sets granular capabilities (BPF, PERFMON, NET_ADMIN) to the container.
// Some agent features require the privileged mode, such as packet drops tracking (see `features`) and SR-IOV support.
// +optional
//+kubebuilder:default:=false
Privileged bool `json:"privileged,omitempty"`

//+kubebuilder:default:=1048576
Expand Down Expand Up @@ -456,13 +459,15 @@ type FlowCollectorIPFIXReceiver struct {

type FlowCollectorOpenTelemetryLogs struct {
// Set `enable` to `true` to send logs to an OpenTelemetry receiver.
// +kubebuilder:default:=true
//+kubebuilder:default:=true
//+optional
Enable *bool `json:"enable,omitempty"`
}

type FlowCollectorOpenTelemetryMetrics struct {
// Set `enable` to `true` to send metrics to an OpenTelemetry receiver.
// +kubebuilder:default:=true
//+kubebuilder:default:=true
//+optional
Enable *bool `json:"enable,omitempty"`

// Specify how often metrics are sent to a collector.
Expand Down Expand Up @@ -651,7 +656,7 @@ type FlowCollectorFLP struct {
ConsumerReplicas *int32 `json:"consumerReplicas,omitempty"`

// If `unmanagedReplicas` is `true`, the operator will not reconcile `consumerReplicas`. This is useful when using a pod autoscaler.
// +optional
//+kubebuilder:default:=false
UnmanagedReplicas bool `json:"unmanagedReplicas,omitempty"`

//+kubebuilder:default:=1000
Expand Down Expand Up @@ -679,13 +684,15 @@ type FlowCollectorFLP struct {
// `clusterName` is the name of the cluster to appear in the flows data. This is useful in a multi-cluster context. When using OpenShift, leave empty to make it automatically determined.
ClusterName string `json:"clusterName,omitempty"`

//+kubebuilder:default:=false
// Set `multiClusterDeployment` to `true` to enable multi clusters feature. This adds `clusterName` label to flows data
//+kubebuilder:default:=false
// +optional
MultiClusterDeployment *bool `json:"multiClusterDeployment,omitempty"`

//+optional
// `addZone` allows availability zone awareness by labeling flows with their source and destination zones.
// This feature requires the "topology.kubernetes.io/zone" label to be set on nodes.
//+kubebuilder:default:=false
//+optional
AddZone *bool `json:"addZone,omitempty"`

//+optional
Expand Down Expand Up @@ -903,6 +910,7 @@ type LokiMonolithParams struct {
// This is useful for development and demo purposes. Do not use it in production.
// [Unsupported (*)].
//+kubebuilder:default:=false
//+optional
InstallDemoLoki *bool `json:"installDemoLoki,omitempty"`

//+kubebuilder:default:="http://loki:3100/"
Expand Down Expand Up @@ -950,6 +958,7 @@ type FlowCollectorLoki struct {
// If both Prometheus and Loki are enabled, Prometheus takes precedence and Loki is used as a fallback for queries that Prometheus cannot handle.
// If they are both disabled, the Console plugin is not deployed.
//+kubebuilder:default:=true
//+optional
Enable *bool `json:"enable,omitempty"`

// `mode` must be set according to the installation mode of Loki:<br>
Expand Down Expand Up @@ -1021,7 +1030,7 @@ type PrometheusQuerierManual struct {
TLS ClientTLS `json:"tls"`

// Set `true` to forward logged in user token in queries to Prometheus
// +optional
//+kubebuilder:default:=false
ForwardUserToken bool `json:"forwardUserToken"`

// AlertManager configuration. This is used in the console to query silenced alerts, for displaying health information.
Expand Down Expand Up @@ -1064,6 +1073,8 @@ type PrometheusQuerier struct {
// such as getting per-pod information or viewing raw flows.
// If both Prometheus and Loki are enabled, Prometheus takes precedence and Loki is used as a fallback for queries that Prometheus cannot handle.
// If they are both disabled, the Console plugin is not deployed.
//+kubebuilder:default:=true
//+optional
Enable *bool `json:"enable,omitempty"`

// `mode` must be set according to the type of Prometheus installation that stores NetObserv metrics:<br>
Expand All @@ -1087,13 +1098,15 @@ type PrometheusQuerier struct {

// FlowCollectorConsolePlugin defines the desired ConsolePlugin state of FlowCollector.
type FlowCollectorConsolePlugin struct {
//+kubebuilder:default:=true
// Enables the console plugin deployment.
//+kubebuilder:default:=true
//+optional
Enable *bool `json:"enable,omitempty"`

// Deploy as a standalone console, instead of a plugin of the OpenShift Console.
// This is not recommended when using with OpenShift, as it doesn't provide an integrated experience.
// [Unsupported (*)].
//+kubebuilder:default:=false
Standalone bool `json:"standalone,omitempty"`

//+kubebuilder:validation:Minimum=0
Expand All @@ -1102,7 +1115,7 @@ type FlowCollectorConsolePlugin struct {
Replicas *int32 `json:"replicas,omitempty"`

// If `unmanagedReplicas` is `true`, the operator will not reconcile `replicas`. This is useful when using a pod autoscaler.
// +optional
//+kubebuilder:default:=false
UnmanagedReplicas bool `json:"unmanagedReplicas,omitempty"`

//+kubebuilder:validation:Enum=IfNotPresent;Always;Never
Expand Down Expand Up @@ -1145,8 +1158,9 @@ type FlowCollectorConsolePlugin struct {

// Configuration of the port to service name translation feature of the console plugin
type ConsolePluginPortConfig struct {
//+kubebuilder:default:=true
// Enable the console plugin port-to-service name translation
//+kubebuilder:default:=true
//+optional
Enable *bool `json:"enable,omitempty"`

// `portNames` defines additional port names to use in the console,
Expand All @@ -1165,7 +1179,7 @@ type QuickFilter struct {
// +kubebuilder:MinProperties:=1
Filter map[string]string `json:"filter"`
// `default` defines whether this filter should be active by default or not
// +optional
//+kubebuilder:default:=false
Default bool `json:"default,omitempty"`
}

Expand Down Expand Up @@ -1462,11 +1476,11 @@ type AdvancedPluginConfig struct {
//+optional
Args []string `json:"args,omitempty"`

//+kubebuilder:default:=true
//+optional
// `register` allows, when set to `true`, to automatically register the provided console plugin with the OpenShift Console operator.
// When set to `false`, you can still register it manually by editing console.operator.openshift.io/cluster with the following command:
// `oc patch console.operator.openshift.io cluster --type='json' -p '[{"op": "add", "path": "/spec/plugins/-", "value": "netobserv-plugin"}]'`
//+kubebuilder:default:=true
//+optional
Register *bool `json:"register,omitempty"`

//+kubebuilder:validation:Minimum=1
Expand All @@ -1486,6 +1500,7 @@ type SubnetLabels struct {
// `openShiftAutoDetect` allows, when set to `true`, to detect automatically the machines, pods and services subnets based on the
// OpenShift install configuration and the Cluster Network Operator configuration. Indirectly, this is a way to accurately detect
// external traffic: flows that are not labeled for those subnets are external to the cluster. Enabled by default on OpenShift.
//+kubebuilder:default:=true
//+optional
OpenShiftAutoDetect *bool `json:"openShiftAutoDetect,omitempty"`

Expand Down
13 changes: 13 additions & 0 deletions bundle/manifests/flows.netobserv.io_flowcollectors.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1199,6 +1199,7 @@ spec:
- Egress
type: string
enable:
default: false
description: Set `enable` to `true` to enable the eBPF
flow filtering feature.
type: boolean
Expand Down Expand Up @@ -1457,6 +1458,7 @@ spec:
type: string
type: array
enable:
default: true
description: Set `enable` to `false` to disable eBPF agent
metrics collection. It is enabled by default.
type: boolean
Expand Down Expand Up @@ -1556,6 +1558,7 @@ spec:
type: object
type: object
privileged:
default: false
description: |-
Privileged mode for the eBPF Agent container. When set to `true`, the agent is able to capture more traffic, including from secondary interfaces.
When ignored or set to `false`, the operator sets granular capabilities (BPF, PERFMON, NET_ADMIN) to the container.
Expand Down Expand Up @@ -3127,6 +3130,7 @@ spec:
Console''s quick filters'
properties:
default:
default: false
description: '`default` defines whether this filter should
be active by default or not'
type: boolean
Expand Down Expand Up @@ -3221,12 +3225,14 @@ spec:
type: object
type: object
standalone:
default: false
description: |-
Deploy as a standalone console, instead of a plugin of the OpenShift Console.
This is not recommended when using with OpenShift, as it doesn't provide an integrated experience.
[Unsupported (*)].
type: boolean
unmanagedReplicas:
default: false
description: If `unmanagedReplicas` is `true`, the operator will
not reconcile `replicas`. This is useful when using a pod autoscaler.
type: boolean
Expand Down Expand Up @@ -4307,6 +4313,7 @@ spec:
enriches them, generates metrics, and forwards them to the Loki persistence layer and/or any available exporter.
properties:
addZone:
default: false
description: |-
`addZone` allows availability zone awareness by labeling flows with their source and destination zones.
This feature requires the "topology.kubernetes.io/zone" label to be set on nodes.
Expand Down Expand Up @@ -6227,13 +6234,15 @@ spec:
type: object
type: array
openShiftAutoDetect:
default: true
description: |-
`openShiftAutoDetect` allows, when set to `true`, to detect automatically the machines, pods and services subnets based on the
OpenShift install configuration and the Cluster Network Operator configuration. Indirectly, this is a way to accurately detect
external traffic: flows that are not labeled for those subnets are external to the cluster. Enabled by default on OpenShift.
type: boolean
type: object
unmanagedReplicas:
default: false
description: If `unmanagedReplicas` is `true`, the operator will
not reconcile `consumerReplicas`. This is useful when using
a pod autoscaler.
Expand All @@ -6248,6 +6257,7 @@ spec:
settings, used in the Console plugin.
properties:
enable:
default: true
description: |-
When `enable` is `true`, the Console plugin queries flow metrics from Prometheus instead of Loki whenever possible.
It is enbaled by default: set it to `false` to disable this feature.
Expand Down Expand Up @@ -6355,6 +6365,7 @@ spec:
type: string
type: object
forwardUserToken:
default: false
description: Set `true` to forward logged in user token
in queries to Prometheus
type: boolean
Expand Down Expand Up @@ -6444,6 +6455,8 @@ spec:
description: '`url` is the address of an existing Prometheus
service to use for querying metrics.'
type: string
required:
- forwardUserToken
type: object
mode:
default: Auto
Expand Down
20 changes: 1 addition & 19 deletions bundle/manifests/netobserv-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,38 +45,20 @@ metadata:
"lo"
],
"interfaces": [],
"privileged": false,
"sampling": 50
},
"type": "eBPF"
},
"consolePlugin": {
"enable": true
}
},
"deploymentModel": "Service",
"exporters": [],
"loki": {
"enable": true,
"lokiStack": {
"name": "loki"
},
"mode": "Monolithic",
"monolithic": {
"url": "http://loki.netobserv.svc.cluster.local.:3100/"
}
},
"namespace": "netobserv",
"networkPolicy": {
"additionalNamespaces": [],
"enable": true
},
"processor": {
"consumerReplicas": 3,
"metrics": {
"disableAlerts": []
},
"slicesConfig": {
"enable": false
}
}
}
Expand Down
Loading