diff --git a/api/v1alpha1/flowmetric_types.go b/api/v1alpha1/flowmetric_types.go index 8228e51e3..850df8d54 100644 --- a/api/v1alpha1/flowmetric_types.go +++ b/api/v1alpha1/flowmetric_types.go @@ -74,7 +74,7 @@ type FlowMetricSpec struct { // Leave empty to count flows rather than a specific value per flow. // Refer to the documentation for the list of available fields: https://docs.openshift.com/container-platform/latest/networking/network_observability/json-flows-format-reference.html. // +optional - ValueField string `json:"valueField"` + ValueField string `json:"valueField,omitempty"` // `filters` is a list of fields and values used to restrict which flows are taken into account. Oftentimes, these filters must // be used to eliminate duplicates: `Duplicate:"false"` and `FlowDirection: "0"`. @@ -102,7 +102,7 @@ type FlowMetricSpec struct { // +kubebuilder:validation:Enum:="Any";"Egress";"Ingress" // +kubebuilder:default:="Any" // +optional - Direction FlowDirection `json:"direction"` + Direction FlowDirection `json:"direction,omitempty"` // A list of buckets to use when `type` is "Histogram". The list must be parseable as floats. Prometheus default buckets will be used if unset. // +optional diff --git a/controllers/flp/suite_test.go b/controllers/flp/suite_test.go index 5062f8dee..f6a536ca9 100644 --- a/controllers/flp/suite_test.go +++ b/controllers/flp/suite_test.go @@ -32,7 +32,7 @@ func TestAPIs(t *testing.T) { // go test ./... runs always Ginkgo test suites in parallel and they would interfere // this way we make sure that both test sub-suites are executed serially -var _ = Describe("FlowCollector Controller", Ordered, Serial, func() { +var _ = Describe("FLP Controller", Ordered, Serial, func() { ControllerSpecs() ControllerFlowMetricsSpecs() })