Skip to content

Commit

Permalink
Ad omitempty
Browse files Browse the repository at this point in the history
  • Loading branch information
jotak committed Dec 8, 2023
1 parent 6e63f3c commit 9e92488
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions api/v1alpha1/flowmetric_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`.
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion controllers/flp/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
})
Expand Down

0 comments on commit 9e92488

Please sign in to comment.