Skip to content

Commit ecaa6d0

Browse files
committed
loki dev mode
1 parent e8cbaf2 commit ecaa6d0

19 files changed

+476
-31
lines changed

api/flowcollector/v1beta2/flowcollector_types.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -884,6 +884,7 @@ type LokiStackRef struct {
884884
type LokiMode string
885885

886886
const (
887+
LokiModeDev LokiMode = "Dev"
887888
LokiModeManual LokiMode = "Manual"
888889
LokiModeLokiStack LokiMode = "LokiStack"
889890
LokiModeMonolithic LokiMode = "Monolithic"
@@ -904,12 +905,13 @@ type FlowCollectorLoki struct {
904905
Enable *bool `json:"enable,omitempty"`
905906

906907
// `mode` must be set according to the installation mode of Loki:<br>
908+
// - Use `Dev` to use the development mode, which is not recommended for production use.
907909
// - Use `LokiStack` when Loki is managed using the Loki Operator<br>
908910
// - Use `Monolithic` when Loki is installed as a monolithic workload<br>
909911
// - Use `Microservices` when Loki is installed as microservices, but without Loki Operator<br>
910912
// - Use `Manual` if none of the options above match your setup<br>
911913
//+unionDiscriminator
912-
//+kubebuilder:validation:Enum=Manual;LokiStack;Monolithic;Microservices
914+
//+kubebuilder:validation:Enum=Manual;Dev;LokiStack;Monolithic;Microservices
913915
//+kubebuilder:default:="Monolithic"
914916
//+kubebuilder:validation:Required
915917
Mode LokiMode `json:"mode,omitempty"`

bundle/manifests/flows.netobserv.io_flowcollectors.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4099,12 +4099,14 @@ spec:
40994099
default: Monolithic
41004100
description: |-
41014101
`mode` must be set according to the installation mode of Loki:<br>
4102+
- Use `Dev` to use the development mode, which is not recommended for production use.
41024103
- Use `LokiStack` when Loki is managed using the Loki Operator<br>
41034104
- Use `Monolithic` when Loki is installed as a monolithic workload<br>
41044105
- Use `Microservices` when Loki is installed as microservices, but without Loki Operator<br>
41054106
- Use `Manual` if none of the options above match your setup<br>
41064107
enum:
41074108
- Manual
4109+
- Dev
41084110
- LokiStack
41094111
- Monolithic
41104112
- Microservices

bundle/manifests/netobserv-operator.clusterserviceversion.yaml

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -192,19 +192,7 @@ metadata:
192192
"lokiStack": {
193193
"name": "loki"
194194
},
195-
"mode": "Monolithic",
196-
"monolithic": {
197-
"tenantID": "netobserv",
198-
"tls": {
199-
"caCert": {
200-
"certFile": "service-ca.crt",
201-
"name": "loki-gateway-ca-bundle",
202-
"type": "configmap"
203-
},
204-
"enable": false
205-
},
206-
"url": "http://loki.netobserv.svc:3100/"
207-
},
195+
"mode": "Dev",
208196
"readTimeout": "30s",
209197
"writeBatchSize": 10485760,
210198
"writeBatchWait": "1s",
@@ -253,7 +241,7 @@ metadata:
253241
categories: Monitoring, Networking, Observability
254242
console.openshift.io/plugins: '["netobserv-plugin"]'
255243
containerImage: quay.io/netobserv/network-observability-operator:1.9.1-community
256-
createdAt: "2025-07-21T09:56:28Z"
244+
createdAt: "2025-07-30T12:28:12Z"
257245
description: Network flows collector and monitoring solution
258246
operatorframework.io/initialization-resource: '{"apiVersion":"flows.netobserv.io/v1beta2",
259247
"kind":"FlowCollector","metadata":{"name":"cluster"},"spec": {}}'
@@ -775,6 +763,7 @@ spec:
775763
resources:
776764
- configmaps
777765
- namespaces
766+
- persistentvolumeclaims
778767
- secrets
779768
- serviceaccounts
780769
- services

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3768,12 +3768,14 @@ spec:
37683768
default: Monolithic
37693769
description: |-
37703770
`mode` must be set according to the installation mode of Loki:<br>
3771+
- Use `Dev` to use the development mode, which is not recommended for production use.
37713772
- Use `LokiStack` when Loki is managed using the Loki Operator<br>
37723773
- Use `Monolithic` when Loki is installed as a monolithic workload<br>
37733774
- Use `Microservices` when Loki is installed as microservices, but without Loki Operator<br>
37743775
- Use `Manual` if none of the options above match your setup<br>
37753776
enum:
37763777
- Manual
3778+
- Dev
37773779
- LokiStack
37783780
- Monolithic
37793781
- Microservices

config/rbac/role.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ rules:
99
resources:
1010
- configmaps
1111
- namespaces
12+
- persistentvolumeclaims
1213
- secrets
1314
- serviceaccounts
1415
- services

config/samples/flows_v1beta2_flowcollector.yaml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -127,16 +127,7 @@ spec:
127127
loki:
128128
enable: true
129129
# Change mode to "LokiStack" to use with the loki operator
130-
mode: Monolithic
131-
monolithic:
132-
url: 'http://loki.netobserv.svc:3100/'
133-
tenantID: netobserv
134-
tls:
135-
enable: false
136-
caCert:
137-
type: configmap
138-
name: loki-gateway-ca-bundle
139-
certFile: service-ca.crt
130+
mode: Dev
140131
lokiStack:
141132
name: loki
142133
# Change loki operator instance namespace

docs/FlowCollector.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7220,12 +7220,13 @@ If the namespace is different, the config map or the secret is copied so that it
72207220
<td>enum</td>
72217221
<td>
72227222
`mode` must be set according to the installation mode of Loki:<br>
7223+
- Use `Dev` to use the development mode, which is not recommended for production use.
72237224
- Use `LokiStack` when Loki is managed using the Loki Operator<br>
72247225
- Use `Monolithic` when Loki is installed as a monolithic workload<br>
72257226
- Use `Microservices` when Loki is installed as microservices, but without Loki Operator<br>
72267227
- Use `Manual` if none of the options above match your setup<br><br/>
72277228
<br/>
7228-
<i>Enum</i>: Manual, LokiStack, Monolithic, Microservices<br/>
7229+
<i>Enum</i>: Manual, Dev, LokiStack, Monolithic, Microservices<br/>
72297230
<i>Default</i>: Monolithic<br/>
72307231
</td>
72317232
<td>true</td>

helm/crds/flows.netobserv.io_flowcollectors.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3772,12 +3772,14 @@ spec:
37723772
default: Monolithic
37733773
description: |-
37743774
`mode` must be set according to the installation mode of Loki:<br>
3775+
- Use `Dev` to use the development mode, which is not recommended for production use.
37753776
- Use `LokiStack` when Loki is managed using the Loki Operator<br>
37763777
- Use `Monolithic` when Loki is installed as a monolithic workload<br>
37773778
- Use `Microservices` when Loki is installed as microservices, but without Loki Operator<br>
37783779
- Use `Manual` if none of the options above match your setup<br>
37793780
enum:
37803781
- Manual
3782+
- Dev
37813783
- LokiStack
37823784
- Monolithic
37833785
- Microservices

helm/templates/clusterrole.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ rules:
88
resources:
99
- configmaps
1010
- namespaces
11+
- persistentvolumeclaims
1112
- secrets
1213
- serviceaccounts
1314
- services

internal/controller/constants/constants.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ const (
2424
PluginName = "netobserv-plugin"
2525
StaticPluginName = "netobserv-plugin-static"
2626
PluginShortName = "plugin"
27+
LokiDev = "loki"
28+
LokiDevImage = "grafana/loki:3.5.0"
2729

2830
// EBPFAgentName and other constants for it
2931
EBPFAgentName = "netobserv-ebpf-agent"

0 commit comments

Comments
 (0)