Skip to content

mbp-1128: Add Network Observability with NooBaa-backed Loki - #165

Open
pmatouse wants to merge 9 commits into
validatedpatterns:mainfrom
pmatouse:mbp-1128-network-observability
Open

mbp-1128: Add Network Observability with NooBaa-backed Loki#165
pmatouse wants to merge 9 commits into
validatedpatterns:mainfrom
pmatouse:mbp-1128-network-observability

Conversation

@pmatouse

Copy link
Copy Markdown

feat: add Network Observability with NooBaa-backed Loki

Install Loki and Network Observability operators via a storage-dependent
feature fragment, and deploy LokiStack plus FlowCollector using NooBaa
storage.

Signed-off-by: Petr Matousek pmatouse@redhat.com

@pmatouse
pmatouse marked this pull request as draft July 23, 2026 09:51

@mlorenzofr mlorenzofr left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overall it's very good, but some small changes need to be made

Comment thread charts/netobserv/values.yaml Outdated
Comment thread charts/netobserv/templates/lokistack.yaml Outdated
Comment thread charts/netobserv/templates/loki-s3-credentials-job.yaml
Comment thread charts/netobserv/templates/loki-s3-credentials-job.yaml Outdated
Comment thread values-hub.yaml
@pmatouse
pmatouse force-pushed the mbp-1128-network-observability branch from abcf24c to 091415e Compare July 23, 2026 16:45
Comment thread charts/netobserv/templates/_helpers.tpl
Comment thread charts/netobserv/templates/lokistack.yaml

@p-rog p-rog left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM

I left one suggestion which I found when I was testing it at OCP 4.22.
Additionally, it would be great to add network policies to the Network Observability feature, to follow ZT methodology. You can test my network policy architect skill :)

@pmatouse

Copy link
Copy Markdown
Author

Additionally, it would be great to add network policies to the Network Observability feature, to follow ZT methodology. You can test my network policy architect skill :)

I've added the the network policies

@pmatouse
pmatouse force-pushed the mbp-1128-network-observability branch from 89a748b to 04a245d Compare July 30, 2026 10:35

@mlorenzofr mlorenzofr left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall okay, it's almost ready for LGTM in my opinion, just a couple of minor things.

Additionally:

  • Change its status from draft to ready for review.
  • Do a rebase to get the latest changes from the main branch and avoid conflicts.

Comment thread scripts/features/netobserv.yaml
Comment thread values-hub.yaml
Comment thread charts/netobserv/templates/loki-s3-credentials-job.yaml Outdated
Comment thread charts/netobserv/templates/loki-s3-credentials-job.yaml Outdated
@pmatouse
pmatouse marked this pull request as ready for review August 3, 2026 14:27
@p-rog

p-rog commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

@pmatouse the network policies looks very nice. As I can see you didn't restrict specific ports in the ingress rules from netobserv, openshift-console, and openshift-monitoring. Loki components typically listen on specific ports (3100 for HTTP API, 9095 for gRPC, 7946 for memberlist). Is it intentional because Loki has multiple internal ports that vary by component?

Additionally, the Loki Operator channel is pinned to stable-6.6. To avoid OCP compatibility problems, maybe let's remove it like it was done with ODF, Quay, and RHTAS so subscriptions follow the default catalog channel on newer OCP releases. WDYT?

Install Loki and Network Observability operators via a storage-dependent
feature fragment, and deploy LokiStack plus FlowCollector using NooBaa
storage.

Signed-off-by: Petr Matousek <pmatouse@redhat.com>
Use Helm lookup for the default StorageClass when possible; require an
explicit value under Argo CD. LokiStack CRD rejects an omitted field.
Enable FlowCollector operator NPs for netobserv/privileged, and add
least-privilege policies for netobserv-loki.
@pmatouse
pmatouse force-pushed the mbp-1128-network-observability branch from 04a245d to b46e35c Compare August 5, 2026 08:25
@pmatouse

pmatouse commented Aug 5, 2026

Copy link
Copy Markdown
Author

Addressed in 0323cd0 — peer-namespace ingress is port-pinned now. Same-ns left unrestricted to stay cautious around Loki’s internal gRPC/memberlist traffic.

Also unpinned Loki channel in b56eb16 so OLM follows the catalog default.

@pmatouse
pmatouse requested review from mlorenzofr and p-rog August 5, 2026 09:33

@mlorenzofr mlorenzofr left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with the current code it is fully functional

If we want to avoid OutOfSync in the Argo CD application, we would have to ignore some attributes that mutate when the FlowCollector is initialized.

I may be wrong, but I think the SYNC-WAVE-INVENTORY.md file is missing the NetworkPolicies entries.

argocd.argoproj.io/sync-wave: "42"
overrides:
- name: loki.storageClassName
value: "<YOUR-STORAGE-CLASS>"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

netobserv operator mutates some fields after creation, so every ArgoCD sync after the first will report OutOfSync. I think this would solve it.

Suggested change
value: "<YOUR-STORAGE-CLASS>"
value: "<YOUR-STORAGE-CLASS>"
ignoreDifferences:
- group: flows.netobserv.io
kind: FlowCollector
jsonPointers:
- /spec/agent/ebpf/cacheActiveTimeout
- /spec/agent/ebpf/cacheMaxFlows
- /spec/agent/ebpf/excludeInterfaces
- /spec/agent/ebpf/imagePullPolicy
- /spec/agent/ebpf/kafkaBatchSize
- /spec/agent/ebpf/logLevel
- /spec/agent/ebpf/metrics
- /spec/agent/ebpf/resources
- /spec/agent/ipfix
- /spec/consolePlugin/autoscaler
- /spec/consolePlugin/imagePullPolicy
- /spec/consolePlugin/logLevel
- /spec/consolePlugin/portNaming
- /spec/consolePlugin/quickFilters
- /spec/consolePlugin/replicas
- /spec/consolePlugin/resources
- /spec/execution
- /spec/kafka
- /spec/loki/manual
- /spec/loki/microservices
- /spec/loki/monolithic
- /spec/loki/readTimeout
- /spec/loki/writeBatchSize
- /spec/loki/writeBatchWait
- /spec/loki/writeTimeout
- /spec/processor
- /spec/prometheus

Comment thread values-hub.yaml
# argocd.argoproj.io/sync-wave: "42" # Deploy after NooBaa storage backend
# overrides:
# - name: loki.storageClassName
# value: "" # Add your own storageClassName here

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# value: "" # Add your own storageClassName here
# value: "" # Add your own storageClassName here
# ignoreDifferences:
# - group: flows.netobserv.io
# kind: FlowCollector
# jsonPointers:
# - /spec/agent/ebpf/cacheActiveTimeout
# - /spec/agent/ebpf/cacheMaxFlows
# - /spec/agent/ebpf/excludeInterfaces
# - /spec/agent/ebpf/imagePullPolicy
# - /spec/agent/ebpf/kafkaBatchSize
# - /spec/agent/ebpf/logLevel
# - /spec/agent/ebpf/metrics
# - /spec/agent/ebpf/resources
# - /spec/agent/ipfix
# - /spec/consolePlugin/autoscaler
# - /spec/consolePlugin/imagePullPolicy
# - /spec/consolePlugin/logLevel
# - /spec/consolePlugin/portNaming
# - /spec/consolePlugin/quickFilters
# - /spec/consolePlugin/replicas
# - /spec/consolePlugin/resources
# - /spec/execution
# - /spec/kafka
# - /spec/loki/manual
# - /spec/loki/microservices
# - /spec/loki/monolithic
# - /spec/loki/readTimeout
# - /spec/loki/writeBatchSize
# - /spec/loki/writeBatchWait
# - /spec/loki/writeTimeout
# - /spec/processor
# - /spec/prometheus

@sabre1041 sabre1041 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few small changes. However, functionality wise, the new integration works great. Once these items are addressed, we can integrate

{{- $sc -}}
{{- else -}}
{{- $default := "" -}}
{{- range (lookup "storage.k8s.io/v1" "StorageClass" "" "").items | default list -}}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the lookup functionality is not supported in Argo CD, lets remove this from the chart and just fail if this value is not provided. Appropriate guidance via documentation should be provided to instruct the end user the steps that they need to take

type: {{ .Values.flowcollector.agent.type }}
ebpf:
sampling: {{ .Values.flowcollector.agent.sampling }}
privileged: {{ .Values.flowcollector.agent.privileged }}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if privileged is false, the property is dropped from the resulting CR as results in out of sync warnings. Update this property to only provide the value only if true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants