diff --git a/apis/flowcollector/v1beta1/flowcollector_types.go b/apis/flowcollector/v1beta1/flowcollector_types.go index 98f7bcd8b..63eced678 100644 --- a/apis/flowcollector/v1beta1/flowcollector_types.go +++ b/apis/flowcollector/v1beta1/flowcollector_types.go @@ -858,6 +858,7 @@ type SubnetLabels struct { OpenShiftAutoDetect *bool `json:"openShiftAutoDetect,omitempty"` // `customLabels` allows to customize subnets and IPs labelling, such as to identify cluster-external workloads or web services. + // If you enable `openShiftAutoDetect`, `customLabels` can override the detected subnets in case they overlap. //+optional CustomLabels []SubnetLabel `json:"customLabels,omitempty"` } @@ -866,7 +867,7 @@ type SubnetLabels struct { type SubnetLabel struct { // List of CIDRs, such as `["1.2.3.4/32"]`. //+required - CIDRs []string `json:"cidrs,omitempty"` + 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. //+required Name string `json:"name,omitempty"` diff --git a/apis/flowcollector/v1beta2/flowcollector_types.go b/apis/flowcollector/v1beta2/flowcollector_types.go index 44547eaac..11d1698bd 100644 --- a/apis/flowcollector/v1beta2/flowcollector_types.go +++ b/apis/flowcollector/v1beta2/flowcollector_types.go @@ -1009,6 +1009,7 @@ type SubnetLabels struct { OpenShiftAutoDetect *bool `json:"openShiftAutoDetect,omitempty"` // `customLabels` allows to customize subnets and IPs labelling, such as to identify cluster-external workloads or web services. + // If you enable `openShiftAutoDetect`, `customLabels` can override the detected subnets in case they overlap. //+optional CustomLabels []SubnetLabel `json:"customLabels,omitempty"` } @@ -1017,7 +1018,7 @@ type SubnetLabels struct { type SubnetLabel struct { // List of CIDRs, such as `["1.2.3.4/32"]`. //+required - CIDRs []string `json:"cidrs,omitempty"` + 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. //+required Name string `json:"name,omitempty"` diff --git a/bundle/manifests/flows.netobserv.io_flowcollectors.yaml b/bundle/manifests/flows.netobserv.io_flowcollectors.yaml index abba1926a..248073ebe 100644 --- a/bundle/manifests/flows.netobserv.io_flowcollectors.yaml +++ b/bundle/manifests/flows.netobserv.io_flowcollectors.yaml @@ -2753,7 +2753,8 @@ spec: customLabels: description: '`customLabels` allows to customize subnets and IPs labelling, such as to identify cluster-external workloads - or web services.' + or web services. If you enable `openShiftAutoDetect`, `customLabels` + can override the detected subnets in case they overlap.' items: description: SubnetLabel allows to label subnets and IPs, such as to identify cluster-external workloads or web @@ -5847,7 +5848,8 @@ spec: customLabels: description: '`customLabels` allows to customize subnets and IPs labelling, such as to identify cluster-external workloads - or web services.' + or web services. If you enable `openShiftAutoDetect`, `customLabels` + can override the detected subnets in case they overlap.' items: description: SubnetLabel allows to label subnets and IPs, such as to identify cluster-external workloads or web diff --git a/config/crd/bases/flows.netobserv.io_flowcollectors.yaml b/config/crd/bases/flows.netobserv.io_flowcollectors.yaml index ba9f10160..420198b3f 100644 --- a/config/crd/bases/flows.netobserv.io_flowcollectors.yaml +++ b/config/crd/bases/flows.netobserv.io_flowcollectors.yaml @@ -2740,7 +2740,8 @@ spec: customLabels: description: '`customLabels` allows to customize subnets and IPs labelling, such as to identify cluster-external workloads - or web services.' + or web services. If you enable `openShiftAutoDetect`, `customLabels` + can override the detected subnets in case they overlap.' items: description: SubnetLabel allows to label subnets and IPs, such as to identify cluster-external workloads or web @@ -5834,7 +5835,8 @@ spec: customLabels: description: '`customLabels` allows to customize subnets and IPs labelling, such as to identify cluster-external workloads - or web services.' + or web services. If you enable `openShiftAutoDetect`, `customLabels` + can override the detected subnets in case they overlap.' items: description: SubnetLabel allows to label subnets and IPs, such as to identify cluster-external workloads or web diff --git a/docs/FlowCollector.md b/docs/FlowCollector.md index 29d56a79d..be656435a 100644 --- a/docs/FlowCollector.md +++ b/docs/FlowCollector.md @@ -4832,7 +4832,7 @@ ResourceClaim references one entry in PodSpec.ResourceClaims.