Skip to content

Commit 56f1e43

Browse files
authored
Fix doc issues with slices (#2444)
* Fix doc issues with slices - Mention "EXT:" prefix in slices - Mention "EXT:" prefix in label names - Fix bad copy-paste of FlowMetric within Slices doc Regenerate docs * fix typo enbaled
1 parent 1faaa78 commit 56f1e43

12 files changed

+65
-35
lines changed

api/flowcollector/v1beta2/flowcollector_types.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1058,7 +1058,7 @@ type FlowCollectorPrometheus struct {
10581058
// `PrometheusQuerier` defines the desired state for querying Prometheus (client...)
10591059
type PrometheusQuerier struct {
10601060
// When `enable` is `true`, the Console plugin queries flow metrics from Prometheus instead of Loki whenever possible.
1061-
// It is enbaled by default: set it to `false` to disable this feature.
1061+
// It is enabled by default: set it to `false` to disable this feature.
10621062
// The Console plugin can use either Loki or Prometheus as a data source for metrics (see also `spec.loki`), or both.
10631063
// Not all queries are transposable from Loki to Prometheus. Hence, if Loki is disabled, some features of the plugin are disabled as well,
10641064
// such as getting per-pod information or viewing raw flows.
@@ -1504,6 +1504,7 @@ type SubnetLabel struct {
15041504
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.
15051505

15061506
// Label name, used to flag matching flows.
1507+
// 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/>
15071508
// +kubebuilder:validation:Pattern:="^[a-zA-Z_:-][a-zA-Z0-9_:-]*$"
15081509
//+required
15091510
Name string `json:"name,omitempty"`

api/flowcollectorslice/v1alpha1/flowcollectorslice_types.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ import (
66

77
// FlowCollectorSliceSpec defines the desired state of FlowCollectorSlice
88
type FlowCollectorSliceSpec struct {
9-
// `subnetLabels` allows to customize subnets and IPs labelling, such as to identify cluster-external workloads or web services.
9+
// `subnetLabels` allows you to customize subnets and IPs labeling, such as to identify cluster external workloads or web services.
10+
// 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/>
1011
// Beware that the subnet labels configured in FlowCollectorSlice are not limited to the flows of the related namespace: any flow
11-
// in the whole cluster can be labelled using this configuration. However, subnet labels defined in the cluster-scoped FlowCollector take
12+
// in the whole cluster can be labeled using this configuration. However, subnet labels defined in the cluster-scoped FlowCollector take
1213
// precedence in case of conflicting rules.
1314
//+optional
1415
SubnetLabels []SubnetLabel `json:"subnetLabels,omitempty"`
@@ -24,7 +25,9 @@ type SubnetLabel struct {
2425
// List of CIDRs, such as `["1.2.3.4/32"]`.
2526
//+required
2627
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.
28+
2729
// Label name, used to flag matching flows.
30+
// 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/>
2831
//+required
2932
Name string `json:"name,omitempty"`
3033
}
@@ -43,7 +46,7 @@ type FlowCollectorSliceStatus struct {
4346

4447
// +kubebuilder:object:root=true
4548
// +kubebuilder:subresource:status
46-
// FlowMetric is the API allowing to create custom metrics from the collected flow logs.
49+
// FlowCollectorSlice is the API allowing to decentralize some of the FlowCollector configuration per namespace tenant.
4750
type FlowCollectorSlice struct {
4851
metav1.TypeMeta `json:",inline"`
4952
metav1.ObjectMeta `json:"metadata,omitempty"`

bundle/manifests/flows.netobserv.io_flowcollectors.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6218,7 +6218,9 @@ spec:
62186218
type: string
62196219
type: array
62206220
name:
6221-
description: Label name, used to flag matching flows.
6221+
description: |-
6222+
Label name, used to flag matching flows.
6223+
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/>
62226224
pattern: ^[a-zA-Z_:-][a-zA-Z0-9_:-]*$
62236225
type: string
62246226
required:
@@ -6250,7 +6252,7 @@ spec:
62506252
enable:
62516253
description: |-
62526254
When `enable` is `true`, the Console plugin queries flow metrics from Prometheus instead of Loki whenever possible.
6253-
It is enbaled by default: set it to `false` to disable this feature.
6255+
It is enabled by default: set it to `false` to disable this feature.
62546256
The Console plugin can use either Loki or Prometheus as a data source for metrics (see also `spec.loki`), or both.
62556257
Not all queries are transposable from Loki to Prometheus. Hence, if Loki is disabled, some features of the plugin are disabled as well,
62566258
such as getting per-pod information or viewing raw flows.

bundle/manifests/flows.netobserv.io_flowcollectorslices.yaml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ spec:
1717
- name: v1alpha1
1818
schema:
1919
openAPIV3Schema:
20-
description: FlowMetric is the API allowing to create custom metrics from
21-
the collected flow logs.
20+
description: FlowCollectorSlice is the API allowing to decentralize some of
21+
the FlowCollector configuration per namespace tenant.
2222
properties:
2323
apiVersion:
2424
description: |-
@@ -49,9 +49,10 @@ spec:
4949
type: integer
5050
subnetLabels:
5151
description: |-
52-
`subnetLabels` allows to customize subnets and IPs labelling, such as to identify cluster-external workloads or web services.
52+
`subnetLabels` allows you to customize subnets and IPs labeling, such as to identify cluster external workloads or web services.
53+
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/>
5354
Beware that the subnet labels configured in FlowCollectorSlice are not limited to the flows of the related namespace: any flow
54-
in the whole cluster can be labelled using this configuration. However, subnet labels defined in the cluster-scoped FlowCollector take
55+
in the whole cluster can be labeled using this configuration. However, subnet labels defined in the cluster-scoped FlowCollector take
5556
precedence in case of conflicting rules.
5657
items:
5758
description: SubnetLabel allows to label subnets and IPs, such as
@@ -63,7 +64,9 @@ spec:
6364
type: string
6465
type: array
6566
name:
66-
description: Label name, used to flag matching flows.
67+
description: |-
68+
Label name, used to flag matching flows.
69+
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/>
6770
type: string
6871
required:
6972
- cidrs

config/crd/bases/flows.netobserv.io_flowcollectors.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5750,7 +5750,9 @@ spec:
57505750
type: string
57515751
type: array
57525752
name:
5753-
description: Label name, used to flag matching flows.
5753+
description: |-
5754+
Label name, used to flag matching flows.
5755+
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/>
57545756
pattern: ^[a-zA-Z_:-][a-zA-Z0-9_:-]*$
57555757
type: string
57565758
required:
@@ -5778,7 +5780,7 @@ spec:
57785780
enable:
57795781
description: |-
57805782
When `enable` is `true`, the Console plugin queries flow metrics from Prometheus instead of Loki whenever possible.
5781-
It is enbaled by default: set it to `false` to disable this feature.
5783+
It is enabled by default: set it to `false` to disable this feature.
57825784
The Console plugin can use either Loki or Prometheus as a data source for metrics (see also `spec.loki`), or both.
57835785
Not all queries are transposable from Loki to Prometheus. Hence, if Loki is disabled, some features of the plugin are disabled as well,
57845786
such as getting per-pod information or viewing raw flows.

config/crd/bases/flows.netobserv.io_flowcollectorslices.yaml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ spec:
1717
- name: v1alpha1
1818
schema:
1919
openAPIV3Schema:
20-
description: FlowMetric is the API allowing to create custom metrics from
21-
the collected flow logs.
20+
description: FlowCollectorSlice is the API allowing to decentralize some of
21+
the FlowCollector configuration per namespace tenant.
2222
properties:
2323
apiVersion:
2424
description: |-
@@ -49,9 +49,10 @@ spec:
4949
type: integer
5050
subnetLabels:
5151
description: |-
52-
`subnetLabels` allows to customize subnets and IPs labelling, such as to identify cluster-external workloads or web services.
52+
`subnetLabels` allows you to customize subnets and IPs labeling, such as to identify cluster external workloads or web services.
53+
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/>
5354
Beware that the subnet labels configured in FlowCollectorSlice are not limited to the flows of the related namespace: any flow
54-
in the whole cluster can be labelled using this configuration. However, subnet labels defined in the cluster-scoped FlowCollector take
55+
in the whole cluster can be labeled using this configuration. However, subnet labels defined in the cluster-scoped FlowCollector take
5556
precedence in case of conflicting rules.
5657
items:
5758
description: SubnetLabel allows to label subnets and IPs, such as
@@ -63,7 +64,9 @@ spec:
6364
type: string
6465
type: array
6566
name:
66-
description: Label name, used to flag matching flows.
67+
description: |-
68+
Label name, used to flag matching flows.
69+
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/>
6770
type: string
6871
required:
6972
- cidrs

docs/FlowCollector.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12169,7 +12169,8 @@ SubnetLabel allows to label subnets and IPs, such as to identify cluster-externa
1216912169
<td><b>name</b></td>
1217012170
<td>string</td>
1217112171
<td>
12172-
Label name, used to flag matching flows.<br/>
12172+
Label name, used to flag matching flows.
12173+
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/>
1217312174
</td>
1217412175
<td>true</td>
1217512176
</tr></tbody>
@@ -12236,7 +12237,7 @@ Prometheus querying configuration, such as client settings, used in the Console
1223612237
<td>boolean</td>
1223712238
<td>
1223812239
When `enable` is `true`, the Console plugin queries flow metrics from Prometheus instead of Loki whenever possible.
12239-
It is enbaled by default: set it to `false` to disable this feature.
12240+
It is enabled by default: set it to `false` to disable this feature.
1224012241
The Console plugin can use either Loki or Prometheus as a data source for metrics (see also `spec.loki`), or both.
1224112242
Not all queries are transposable from Loki to Prometheus. Hence, if Loki is disabled, some features of the plugin are disabled as well,
1224212243
such as getting per-pod information or viewing raw flows.

docs/FlowCollectorSlice.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Resource Types:
2121

2222

2323

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

2626
<table>
2727
<thead>
@@ -97,9 +97,10 @@ FlowCollectorSliceSpec defines the desired state of FlowCollectorSlice
9797
<td><b><a href="#flowcollectorslicespecsubnetlabelsindex">subnetLabels</a></b></td>
9898
<td>[]object</td>
9999
<td>
100-
`subnetLabels` allows to customize subnets and IPs labelling, such as to identify cluster-external workloads or web services.
100+
`subnetLabels` allows you to customize subnets and IPs labeling, such as to identify cluster external workloads or web services.
101+
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/>
101102
Beware that the subnet labels configured in FlowCollectorSlice are not limited to the flows of the related namespace: any flow
102-
in the whole cluster can be labelled using this configuration. However, subnet labels defined in the cluster-scoped FlowCollector take
103+
in the whole cluster can be labeled using this configuration. However, subnet labels defined in the cluster-scoped FlowCollector take
103104
precedence in case of conflicting rules.<br/>
104105
</td>
105106
<td>false</td>
@@ -134,7 +135,8 @@ SubnetLabel allows to label subnets and IPs, such as to identify cluster-externa
134135
<td><b>name</b></td>
135136
<td>string</td>
136137
<td>
137-
Label name, used to flag matching flows.<br/>
138+
Label name, used to flag matching flows.
139+
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/>
138140
</td>
139141
<td>true</td>
140142
</tr></tbody>

docs/flowcollector-flows-netobserv-io-v1beta2.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3591,6 +3591,8 @@ Required::
35913591
| `name`
35923592
| `string`
35933593
| Label name, used to flag matching flows.
3594+
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. +
3595+
35943596

35953597
|===
35963598
== .spec.prometheus

docs/flowcollectorslice-flows-netobserv-io-v1alpha1.adoc

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
Description::
99
+
1010
--
11-
FlowMetric is the API allowing to create custom metrics from the collected flow logs.
11+
FlowCollectorSlice is the API allowing to decentralize some of the FlowCollector configuration per namespace tenant.
1212
--
1313

1414
Type::
@@ -74,19 +74,23 @@ Type::
7474

7575
| `subnetLabels`
7676
| `array`
77-
| `subnetLabels` allows to customize subnets and IPs labelling, such as to identify cluster-external workloads or web services.
77+
| `subnetLabels` allows you to customize subnets and IPs labeling, such as to identify cluster external workloads or web services.
78+
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. +
79+
7880
Beware that the subnet labels configured in FlowCollectorSlice are not limited to the flows of the related namespace: any flow
79-
in the whole cluster can be labelled using this configuration. However, subnet labels defined in the cluster-scoped FlowCollector take
81+
in the whole cluster can be labeled using this configuration. However, subnet labels defined in the cluster-scoped FlowCollector take
8082
precedence in case of conflicting rules.
8183

8284
|===
8385
== .spec.subnetLabels
8486
Description::
8587
+
8688
--
87-
`subnetLabels` allows to customize subnets and IPs labelling, such as to identify cluster-external workloads or web services.
89+
`subnetLabels` allows you to customize subnets and IPs labeling, such as to identify cluster external workloads or web services.
90+
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. +
91+
8892
Beware that the subnet labels configured in FlowCollectorSlice are not limited to the flows of the related namespace: any flow
89-
in the whole cluster can be labelled using this configuration. However, subnet labels defined in the cluster-scoped FlowCollector take
93+
in the whole cluster can be labeled using this configuration. However, subnet labels defined in the cluster-scoped FlowCollector take
9094
precedence in case of conflicting rules.
9195
--
9296

@@ -123,6 +127,8 @@ Required::
123127
| `name`
124128
| `string`
125129
| Label name, used to flag matching flows.
130+
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. +
131+
126132

127133
|===
128134

0 commit comments

Comments
 (0)