Skip to content
Merged
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
3 changes: 2 additions & 1 deletion api/flowcollector/v1beta2/flowcollector_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -1058,7 +1058,7 @@ type FlowCollectorPrometheus struct {
// `PrometheusQuerier` defines the desired state for querying Prometheus (client...)
type PrometheusQuerier struct {
// 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.
// It is enabled by default: set it to `false` to disable this feature.
// The Console plugin can use either Loki or Prometheus as a data source for metrics (see also `spec.loki`), or both.
// Not all queries are transposable from Loki to Prometheus. Hence, if Loki is disabled, some features of the plugin are disabled as well,
// such as getting per-pod information or viewing raw flows.
Expand Down Expand Up @@ -1504,6 +1504,7 @@ type SubnetLabel struct {
CIDRs []string `json:"cidrs,omitempty"` // Note, starting with k8s 1.31 / ocp 4.16 there's a new way to validate CIDR such as `+kubebuilder:validation:XValidation:rule="isCIDR(self)",message="field should be in CIDR notation format"`. But older versions would reject the CRD so we cannot implement it now to maintain compatibility.

// Label name, used to flag matching flows.
// External subnets must be labeled with the prefix `EXT:`, or not labeled at all, in order to work with default quick filters and some metrics examples provided.<br/>
// +kubebuilder:validation:Pattern:="^[a-zA-Z_:-][a-zA-Z0-9_:-]*$"
//+required
Name string `json:"name,omitempty"`
Expand Down
9 changes: 6 additions & 3 deletions api/flowcollectorslice/v1alpha1/flowcollectorslice_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ import (

// FlowCollectorSliceSpec defines the desired state of FlowCollectorSlice
type FlowCollectorSliceSpec struct {
// `subnetLabels` allows to customize subnets and IPs labelling, such as to identify cluster-external workloads or web services.
// `subnetLabels` allows you to customize subnets and IPs labeling, such as to identify cluster external workloads or web services.
// External subnets must be labeled with the prefix `EXT:`, or not labeled at all, in order to work with default quick filters and some metrics examples provided.<br/>
// Beware that the subnet labels configured in FlowCollectorSlice are not limited to the flows of the related namespace: any flow
// in the whole cluster can be labelled using this configuration. However, subnet labels defined in the cluster-scoped FlowCollector take
// in the whole cluster can be labeled using this configuration. However, subnet labels defined in the cluster-scoped FlowCollector take
// precedence in case of conflicting rules.
//+optional
SubnetLabels []SubnetLabel `json:"subnetLabels,omitempty"`
Expand All @@ -24,7 +25,9 @@ type SubnetLabel struct {
// List of CIDRs, such as `["1.2.3.4/32"]`.
//+required
CIDRs []string `json:"cidrs,omitempty"` // Note, starting with k8s 1.31 / ocp 4.16 there's a new way to validate CIDR such as `+kubebuilder:validation:XValidation:rule="isCIDR(self)",message="field should be in CIDR notation format"`. But older versions would reject the CRD so we cannot implement it now to maintain compatibility.

// Label name, used to flag matching flows.
// External subnets must be labeled with the prefix `EXT:`, or not labeled at all, in order to work with default quick filters and some metrics examples provided.<br/>
//+required
Name string `json:"name,omitempty"`
}
Expand All @@ -43,7 +46,7 @@ type FlowCollectorSliceStatus struct {

// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// FlowMetric is the API allowing to create custom metrics from the collected flow logs.
// FlowCollectorSlice is the API allowing to decentralize some of the FlowCollector configuration per namespace tenant.
type FlowCollectorSlice struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Expand Down
6 changes: 4 additions & 2 deletions bundle/manifests/flows.netobserv.io_flowcollectors.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6218,7 +6218,9 @@ spec:
type: string
type: array
name:
description: Label name, used to flag matching flows.
description: |-
Label name, used to flag matching flows.
External subnets must be labeled with the prefix `EXT:`, or not labeled at all, in order to work with default quick filters and some metrics examples provided.<br/>
pattern: ^[a-zA-Z_:-][a-zA-Z0-9_:-]*$
type: string
required:
Expand Down Expand Up @@ -6250,7 +6252,7 @@ spec:
enable:
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.
It is enabled by default: set it to `false` to disable this feature.
The Console plugin can use either Loki or Prometheus as a data source for metrics (see also `spec.loki`), or both.
Not all queries are transposable from Loki to Prometheus. Hence, if Loki is disabled, some features of the plugin are disabled as well,
such as getting per-pod information or viewing raw flows.
Expand Down
13 changes: 8 additions & 5 deletions bundle/manifests/flows.netobserv.io_flowcollectorslices.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ spec:
- name: v1alpha1
schema:
openAPIV3Schema:
description: FlowMetric is the API allowing to create custom metrics from
the collected flow logs.
description: FlowCollectorSlice is the API allowing to decentralize some of
the FlowCollector configuration per namespace tenant.
properties:
apiVersion:
description: |-
Expand Down Expand Up @@ -49,9 +49,10 @@ spec:
type: integer
subnetLabels:
description: |-
`subnetLabels` allows to customize subnets and IPs labelling, such as to identify cluster-external workloads or web services.
`subnetLabels` allows you to customize subnets and IPs labeling, such as to identify cluster external workloads or web services.
External subnets must be labeled with the prefix `EXT:`, or not labeled at all, in order to work with default quick filters and some metrics examples provided.<br/>
Beware that the subnet labels configured in FlowCollectorSlice are not limited to the flows of the related namespace: any flow
in the whole cluster can be labelled using this configuration. However, subnet labels defined in the cluster-scoped FlowCollector take
in the whole cluster can be labeled using this configuration. However, subnet labels defined in the cluster-scoped FlowCollector take
precedence in case of conflicting rules.
items:
description: SubnetLabel allows to label subnets and IPs, such as
Expand All @@ -63,7 +64,9 @@ spec:
type: string
type: array
name:
description: Label name, used to flag matching flows.
description: |-
Label name, used to flag matching flows.
External subnets must be labeled with the prefix `EXT:`, or not labeled at all, in order to work with default quick filters and some metrics examples provided.<br/>
type: string
required:
- cidrs
Expand Down
6 changes: 4 additions & 2 deletions config/crd/bases/flows.netobserv.io_flowcollectors.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5750,7 +5750,9 @@ spec:
type: string
type: array
name:
description: Label name, used to flag matching flows.
description: |-
Label name, used to flag matching flows.
External subnets must be labeled with the prefix `EXT:`, or not labeled at all, in order to work with default quick filters and some metrics examples provided.<br/>
pattern: ^[a-zA-Z_:-][a-zA-Z0-9_:-]*$
type: string
required:
Expand Down Expand Up @@ -5778,7 +5780,7 @@ spec:
enable:
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.
It is enabled by default: set it to `false` to disable this feature.
The Console plugin can use either Loki or Prometheus as a data source for metrics (see also `spec.loki`), or both.
Not all queries are transposable from Loki to Prometheus. Hence, if Loki is disabled, some features of the plugin are disabled as well,
such as getting per-pod information or viewing raw flows.
Expand Down
13 changes: 8 additions & 5 deletions config/crd/bases/flows.netobserv.io_flowcollectorslices.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ spec:
- name: v1alpha1
schema:
openAPIV3Schema:
description: FlowMetric is the API allowing to create custom metrics from
the collected flow logs.
description: FlowCollectorSlice is the API allowing to decentralize some of
the FlowCollector configuration per namespace tenant.
properties:
apiVersion:
description: |-
Expand Down Expand Up @@ -49,9 +49,10 @@ spec:
type: integer
subnetLabels:
description: |-
`subnetLabels` allows to customize subnets and IPs labelling, such as to identify cluster-external workloads or web services.
`subnetLabels` allows you to customize subnets and IPs labeling, such as to identify cluster external workloads or web services.
External subnets must be labeled with the prefix `EXT:`, or not labeled at all, in order to work with default quick filters and some metrics examples provided.<br/>
Beware that the subnet labels configured in FlowCollectorSlice are not limited to the flows of the related namespace: any flow
in the whole cluster can be labelled using this configuration. However, subnet labels defined in the cluster-scoped FlowCollector take
in the whole cluster can be labeled using this configuration. However, subnet labels defined in the cluster-scoped FlowCollector take
precedence in case of conflicting rules.
items:
description: SubnetLabel allows to label subnets and IPs, such as
Expand All @@ -63,7 +64,9 @@ spec:
type: string
type: array
name:
description: Label name, used to flag matching flows.
description: |-
Label name, used to flag matching flows.
External subnets must be labeled with the prefix `EXT:`, or not labeled at all, in order to work with default quick filters and some metrics examples provided.<br/>
type: string
required:
- cidrs
Expand Down
5 changes: 3 additions & 2 deletions docs/FlowCollector.md
Original file line number Diff line number Diff line change
Expand Up @@ -12169,7 +12169,8 @@ SubnetLabel allows to label subnets and IPs, such as to identify cluster-externa
<td><b>name</b></td>
<td>string</td>
<td>
Label name, used to flag matching flows.<br/>
Label name, used to flag matching flows.
External subnets must be labeled with the prefix `EXT:`, or not labeled at all, in order to work with default quick filters and some metrics examples provided.<br/><br/>
</td>
<td>true</td>
</tr></tbody>
Expand Down Expand Up @@ -12236,7 +12237,7 @@ Prometheus querying configuration, such as client settings, used in the Console
<td>boolean</td>
<td>
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.
It is enabled by default: set it to `false` to disable this feature.
The Console plugin can use either Loki or Prometheus as a data source for metrics (see also `spec.loki`), or both.
Not all queries are transposable from Loki to Prometheus. Hence, if Loki is disabled, some features of the plugin are disabled as well,
such as getting per-pod information or viewing raw flows.
Expand Down
10 changes: 6 additions & 4 deletions docs/FlowCollectorSlice.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Resource Types:



FlowMetric is the API allowing to create custom metrics from the collected flow logs.
FlowCollectorSlice is the API allowing to decentralize some of the FlowCollector configuration per namespace tenant.

<table>
<thead>
Expand Down Expand Up @@ -97,9 +97,10 @@ FlowCollectorSliceSpec defines the desired state of FlowCollectorSlice
<td><b><a href="#flowcollectorslicespecsubnetlabelsindex">subnetLabels</a></b></td>
<td>[]object</td>
<td>
`subnetLabels` allows to customize subnets and IPs labelling, such as to identify cluster-external workloads or web services.
`subnetLabels` allows you to customize subnets and IPs labeling, such as to identify cluster external workloads or web services.
External subnets must be labeled with the prefix `EXT:`, or not labeled at all, in order to work with default quick filters and some metrics examples provided.<br/>
Beware that the subnet labels configured in FlowCollectorSlice are not limited to the flows of the related namespace: any flow
in the whole cluster can be labelled using this configuration. However, subnet labels defined in the cluster-scoped FlowCollector take
in the whole cluster can be labeled using this configuration. However, subnet labels defined in the cluster-scoped FlowCollector take
precedence in case of conflicting rules.<br/>
</td>
<td>false</td>
Expand Down Expand Up @@ -134,7 +135,8 @@ SubnetLabel allows to label subnets and IPs, such as to identify cluster-externa
<td><b>name</b></td>
<td>string</td>
<td>
Label name, used to flag matching flows.<br/>
Label name, used to flag matching flows.
External subnets must be labeled with the prefix `EXT:`, or not labeled at all, in order to work with default quick filters and some metrics examples provided.<br/><br/>
</td>
<td>true</td>
</tr></tbody>
Expand Down
6 changes: 4 additions & 2 deletions docs/flowcollector-flows-netobserv-io-v1beta2.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -189,13 +189,13 @@ override the default Linux capabilities from there.

| `cacheActiveTimeout`
| `string`
| `cacheActiveTimeout` is the max period during which the reporter aggregates flows before sending.
| `cacheActiveTimeout` is the period during which the agent aggregates flows before sending.
Increasing `cacheMaxFlows` and `cacheActiveTimeout` can decrease the network traffic overhead and the CPU load,
however you can expect higher memory consumption and an increased latency in the flow collection.

| `cacheMaxFlows`
| `integer`
| `cacheMaxFlows` is the max number of flows in an aggregate; when reached, the reporter sends the flows.
| `cacheMaxFlows` is the maximum number of flows in an aggregate; when reached, the reporter sends the flows.
Increasing `cacheMaxFlows` and `cacheActiveTimeout` can decrease the network traffic overhead and the CPU load,
however you can expect higher memory consumption and an increased latency in the flow collection.

Expand Down Expand Up @@ -3591,6 +3591,8 @@ Required::
| `name`
| `string`
| Label name, used to flag matching flows.
External subnets must be labeled with the prefix `EXT:`, or not labeled at all, in order to work with default quick filters and some metrics examples provided. +


|===
== .spec.prometheus
Expand Down
16 changes: 11 additions & 5 deletions docs/flowcollectorslice-flows-netobserv-io-v1alpha1.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Description::
+
--
FlowMetric is the API allowing to create custom metrics from the collected flow logs.
FlowCollectorSlice is the API allowing to decentralize some of the FlowCollector configuration per namespace tenant.
--

Type::
Expand Down Expand Up @@ -74,19 +74,23 @@ Type::

| `subnetLabels`
| `array`
| `subnetLabels` allows to customize subnets and IPs labelling, such as to identify cluster-external workloads or web services.
| `subnetLabels` allows you to customize subnets and IPs labeling, such as to identify cluster external workloads or web services.
External subnets must be labeled with the prefix `EXT:`, or not labeled at all, in order to work with default quick filters and some metrics examples provided. +

Beware that the subnet labels configured in FlowCollectorSlice are not limited to the flows of the related namespace: any flow
in the whole cluster can be labelled using this configuration. However, subnet labels defined in the cluster-scoped FlowCollector take
in the whole cluster can be labeled using this configuration. However, subnet labels defined in the cluster-scoped FlowCollector take
precedence in case of conflicting rules.

|===
== .spec.subnetLabels
Description::
+
--
`subnetLabels` allows to customize subnets and IPs labelling, such as to identify cluster-external workloads or web services.
`subnetLabels` allows you to customize subnets and IPs labeling, such as to identify cluster external workloads or web services.
External subnets must be labeled with the prefix `EXT:`, or not labeled at all, in order to work with default quick filters and some metrics examples provided. +

Beware that the subnet labels configured in FlowCollectorSlice are not limited to the flows of the related namespace: any flow
in the whole cluster can be labelled using this configuration. However, subnet labels defined in the cluster-scoped FlowCollector take
in the whole cluster can be labeled using this configuration. However, subnet labels defined in the cluster-scoped FlowCollector take
precedence in case of conflicting rules.
--

Expand Down Expand Up @@ -123,6 +127,8 @@ Required::
| `name`
| `string`
| Label name, used to flag matching flows.
External subnets must be labeled with the prefix `EXT:`, or not labeled at all, in order to work with default quick filters and some metrics examples provided. +


|===

6 changes: 4 additions & 2 deletions helm/crds/flows.netobserv.io_flowcollectors.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5754,7 +5754,9 @@ spec:
type: string
type: array
name:
description: Label name, used to flag matching flows.
description: |-
Label name, used to flag matching flows.
External subnets must be labeled with the prefix `EXT:`, or not labeled at all, in order to work with default quick filters and some metrics examples provided.<br/>
pattern: ^[a-zA-Z_:-][a-zA-Z0-9_:-]*$
type: string
required:
Expand Down Expand Up @@ -5782,7 +5784,7 @@ spec:
enable:
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.
It is enabled by default: set it to `false` to disable this feature.
The Console plugin can use either Loki or Prometheus as a data source for metrics (see also `spec.loki`), or both.
Not all queries are transposable from Loki to Prometheus. Hence, if Loki is disabled, some features of the plugin are disabled as well,
such as getting per-pod information or viewing raw flows.
Expand Down
Loading