Skip to content

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

Draft
pmatouse wants to merge 4 commits into
validatedpatterns:mainfrom
pmatouse:mbp-1128-network-observability
Draft

mbp-1128: Add Network Observability with NooBaa-backed Loki#165
pmatouse wants to merge 4 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

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
namespace: netobserv-loki
name: loki
size: 1x.extra-small
storageClassName: gp3-csi

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.

This is AWS platform-specific. We should leave it empty and use the default StorageClass

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

addressed

secret:
name: {{ .Values.loki.storageSecretName }}
type: s3
storageClassName: {{ .Values.loki.storageClassName }}

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.

We should look for a way to automatically detect the default storageClass, or fail if the storageClass is null, thus forcing the user to define it manually

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

addressed

}

echo "Waiting for OBC Secret and ConfigMap ${OBC_NAME}..."
for i in $(seq 1 60); do

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.

I'm missing error handling if resources are unavailable after 5 minutes (60 attempts). With the current logic, the script would continue executing, but the oc get secret requests would fail.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

addressed

- |
# NooBaa OBC creates a Secret (keys) + ConfigMap (bucket/host/port)
# with the same name as the claim — not all keys live in the Secret.
set -e

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.

we already run bash with the -e argument, we don't need set it again within the script

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

addressed

Comment thread values-hub.yaml

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.

You've committed the changes to enable the netobserv functionality
The original file from the main branch should be restored, and the configuration added within comments

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

that was an error from e2e testing facepalm

@pmatouse
pmatouse force-pushed the mbp-1128-network-observability branch from abcf24c to 091415e Compare July 23, 2026 16:45
{{- $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.

I've tested this in OCP 4.22 and using Helm lookup to find the default StorageClass works with helm install but fails in ArgoCD because ArgoCD's Helm renderer doesn't support lookup. I had to set loki.storageClassName explicitly via an ArgoCD helm parameter override.

If I'm not wrong, when storageClassName is omitted from the LokiStack CR, the Loki Operator uses the cluster's default StorageClass automatically (https://docs.redhat.com/en/documentation/red_hat_openshift_logging/6.5/html/installing_logging/verifying-cluster-prerequisites).

You can update the lokistack.yaml to make storageClassName conditional (see my next comment).

secret:
name: {{ .Values.loki.storageSecretName }}
type: s3
storageClassName: {{ include "netobserv.lokiStorageClassName" . }}

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.

You can make it conditional to address my earlier comment:

    {{- with (include "netobserv.lokiStorageClassName" .) }}
    storageClassName: {{ . }}
    {{- end }}

@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 :)

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.

3 participants