Skip to content

Commit ecd7664

Browse files
committed
polish extra defaults and sample
1 parent f941135 commit ecd7664

File tree

7 files changed

+181
-162
lines changed

7 files changed

+181
-162
lines changed

api/flowcollector/v1beta2/flowcollector_types.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ type FlowCollectorEBPF struct {
372372
// Privileged mode for the eBPF Agent container. When set to `true`, the agent is able to capture more traffic, including from secondary interfaces.
373373
// When ignored or set to `false`, the operator sets granular capabilities (BPF, PERFMON, NET_ADMIN) to the container.
374374
// Some agent features require the privileged mode, such as packet drops tracking (see `features`) and SR-IOV support.
375-
// +optional
375+
//+kubebuilder:default:=false
376376
Privileged bool `json:"privileged,omitempty"`
377377

378378
//+kubebuilder:default:=1048576
@@ -656,7 +656,7 @@ type FlowCollectorFLP struct {
656656
ConsumerReplicas *int32 `json:"consumerReplicas,omitempty"`
657657

658658
// If `unmanagedReplicas` is `true`, the operator will not reconcile `consumerReplicas`. This is useful when using a pod autoscaler.
659-
// +optional
659+
//+kubebuilder:default:=false
660660
UnmanagedReplicas bool `json:"unmanagedReplicas,omitempty"`
661661

662662
//+kubebuilder:default:=1000
@@ -1030,7 +1030,7 @@ type PrometheusQuerierManual struct {
10301030
TLS ClientTLS `json:"tls"`
10311031

10321032
// Set `true` to forward logged in user token in queries to Prometheus
1033-
// +optional
1033+
//+kubebuilder:default:=false
10341034
ForwardUserToken bool `json:"forwardUserToken"`
10351035

10361036
// AlertManager configuration. This is used in the console to query silenced alerts, for displaying health information.
@@ -1106,6 +1106,7 @@ type FlowCollectorConsolePlugin struct {
11061106
// Deploy as a standalone console, instead of a plugin of the OpenShift Console.
11071107
// This is not recommended when using with OpenShift, as it doesn't provide an integrated experience.
11081108
// [Unsupported (*)].
1109+
//+kubebuilder:default:=false
11091110
Standalone bool `json:"standalone,omitempty"`
11101111

11111112
//+kubebuilder:validation:Minimum=0
@@ -1114,7 +1115,7 @@ type FlowCollectorConsolePlugin struct {
11141115
Replicas *int32 `json:"replicas,omitempty"`
11151116

11161117
// If `unmanagedReplicas` is `true`, the operator will not reconcile `replicas`. This is useful when using a pod autoscaler.
1117-
// +optional
1118+
//+kubebuilder:default:=false
11181119
UnmanagedReplicas bool `json:"unmanagedReplicas,omitempty"`
11191120

11201121
//+kubebuilder:validation:Enum=IfNotPresent;Always;Never
@@ -1178,7 +1179,7 @@ type QuickFilter struct {
11781179
// +kubebuilder:MinProperties:=1
11791180
Filter map[string]string `json:"filter"`
11801181
// `default` defines whether this filter should be active by default or not
1181-
// +optional
1182+
//+kubebuilder:default:=false
11821183
Default bool `json:"default,omitempty"`
11831184
}
11841185

bundle/manifests/flows.netobserv.io_flowcollectors.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1558,6 +1558,7 @@ spec:
15581558
type: object
15591559
type: object
15601560
privileged:
1561+
default: false
15611562
description: |-
15621563
Privileged mode for the eBPF Agent container. When set to `true`, the agent is able to capture more traffic, including from secondary interfaces.
15631564
When ignored or set to `false`, the operator sets granular capabilities (BPF, PERFMON, NET_ADMIN) to the container.
@@ -3129,6 +3130,7 @@ spec:
31293130
Console''s quick filters'
31303131
properties:
31313132
default:
3133+
default: false
31323134
description: '`default` defines whether this filter should
31333135
be active by default or not'
31343136
type: boolean
@@ -3223,12 +3225,14 @@ spec:
32233225
type: object
32243226
type: object
32253227
standalone:
3228+
default: false
32263229
description: |-
32273230
Deploy as a standalone console, instead of a plugin of the OpenShift Console.
32283231
This is not recommended when using with OpenShift, as it doesn't provide an integrated experience.
32293232
[Unsupported (*)].
32303233
type: boolean
32313234
unmanagedReplicas:
3235+
default: false
32323236
description: If `unmanagedReplicas` is `true`, the operator will
32333237
not reconcile `replicas`. This is useful when using a pod autoscaler.
32343238
type: boolean
@@ -6238,6 +6242,7 @@ spec:
62386242
type: boolean
62396243
type: object
62406244
unmanagedReplicas:
6245+
default: false
62416246
description: If `unmanagedReplicas` is `true`, the operator will
62426247
not reconcile `consumerReplicas`. This is useful when using
62436248
a pod autoscaler.
@@ -6360,6 +6365,7 @@ spec:
63606365
type: string
63616366
type: object
63626367
forwardUserToken:
6368+
default: false
63636369
description: Set `true` to forward logged in user token
63646370
in queries to Prometheus
63656371
type: boolean
@@ -6449,6 +6455,8 @@ spec:
64496455
description: '`url` is the address of an existing Prometheus
64506456
service to use for querying metrics.'
64516457
type: string
6458+
required:
6459+
- forwardUserToken
64526460
type: object
64536461
mode:
64546462
default: Auto

bundle/manifests/netobserv-operator.clusterserviceversion.yaml

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -45,38 +45,18 @@ metadata:
4545
"lo"
4646
],
4747
"interfaces": [],
48-
"privileged": false,
4948
"sampling": 50
50-
},
51-
"type": "eBPF"
52-
},
53-
"consolePlugin": {
54-
"enable": true
49+
}
5550
},
56-
"deploymentModel": "Service",
57-
"exporters": [],
5851
"loki": {
59-
"enable": true,
60-
"lokiStack": {
61-
"name": "loki"
62-
},
6352
"mode": "Monolithic",
6453
"monolithic": {
6554
"url": "http://loki.netobserv.svc.cluster.local.:3100/"
6655
}
6756
},
68-
"namespace": "netobserv",
69-
"networkPolicy": {
70-
"additionalNamespaces": [],
71-
"enable": true
72-
},
7357
"processor": {
74-
"consumerReplicas": 3,
7558
"metrics": {
7659
"disableAlerts": []
77-
},
78-
"slicesConfig": {
79-
"enable": false
8060
}
8161
}
8262
}

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1436,6 +1436,7 @@ spec:
14361436
type: object
14371437
type: object
14381438
privileged:
1439+
default: false
14391440
description: |-
14401441
Privileged mode for the eBPF Agent container. When set to `true`, the agent is able to capture more traffic, including from secondary interfaces.
14411442
When ignored or set to `false`, the operator sets granular capabilities (BPF, PERFMON, NET_ADMIN) to the container.
@@ -2928,6 +2929,7 @@ spec:
29282929
description: '`QuickFilter` defines preset configuration for Console''s quick filters'
29292930
properties:
29302931
default:
2932+
default: false
29312933
description: '`default` defines whether this filter should be active by default or not'
29322934
type: boolean
29332935
filter:
@@ -3019,12 +3021,14 @@ spec:
30193021
type: object
30203022
type: object
30213023
standalone:
3024+
default: false
30223025
description: |-
30233026
Deploy as a standalone console, instead of a plugin of the OpenShift Console.
30243027
This is not recommended when using with OpenShift, as it doesn't provide an integrated experience.
30253028
[Unsupported (*)].
30263029
type: boolean
30273030
unmanagedReplicas:
3031+
default: false
30283032
description: If `unmanagedReplicas` is `true`, the operator will not reconcile `replicas`. This is useful when using a pod autoscaler.
30293033
type: boolean
30303034
type: object
@@ -5770,6 +5774,7 @@ spec:
57705774
type: boolean
57715775
type: object
57725776
unmanagedReplicas:
5777+
default: false
57735778
description: If `unmanagedReplicas` is `true`, the operator will not reconcile `consumerReplicas`. This is useful when using a pod autoscaler.
57745779
type: boolean
57755780
type: object
@@ -5868,6 +5873,7 @@ spec:
58685873
type: string
58695874
type: object
58705875
forwardUserToken:
5876+
default: false
58715877
description: Set `true` to forward logged in user token in queries to Prometheus
58725878
type: boolean
58735879
tls:
@@ -5938,6 +5944,8 @@ spec:
59385944
default: http://prometheus:9090
59395945
description: '`url` is the address of an existing Prometheus service to use for querying metrics.'
59405946
type: string
5947+
required:
5948+
- forwardUserToken
59415949
type: object
59425950
mode:
59435951
default: Auto

0 commit comments

Comments
 (0)