Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions telco-core/configuration/core-baseline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ policies:
status: "True"
reason: InstallSucceeded

# Loki operator (optional component)
# - path: reference-crs/optional/logging/LokiOperatorNS.yaml
# - path: reference-crs/optional/logging/LokiOperatorGroup.yaml
# - path: reference-crs/optional/logging/LokiSubscription.yaml
# - path: reference-crs/optional/logging/LokiOperatorStatus.yaml

# Cert-manager operator (optional component)
# - path: reference-crs/optional/cert-manager/certManagerNS.yaml
# - path: reference-crs/optional/cert-manager/certManagerOperatorgroup.yaml
Expand Down Expand Up @@ -93,6 +99,10 @@ policies:
- path: reference-crs/optional/logging/ClusterLogServiceAccountAuditBinding.yaml
- path: reference-crs/optional/logging/ClusterLogServiceAccountInfrastructureBinding.yaml

# LokiStack log storage (optional component)
# - path: reference-crs/optional/logging/LokiSecret.yaml
# - path: reference-crs/optional/logging/LokiStack.yaml
Comment thread
rdiscala marked this conversation as resolved.

- path: reference-crs/required/networking/sriov/SriovOperatorConfig.yaml
patches:
- spec:
Expand Down
8 changes: 7 additions & 1 deletion telco-core/configuration/core-overlay.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,14 @@ policies:
# profile: custom-worker-profile

# Cluster Logging
# The base ClusterLogForwarder.yaml includes local Loki storage by default.
# This example patch adds external Kafka forwarding with custom labels.
- path: reference-crs/optional/logging/ClusterLogForwarder.yaml
patches:
- spec:
outputs:
# Loki output is already configured in the base CR
# Add external output for OSS/BSS systems
- type: "kafka"
name: kafka-open
kafka:
Expand All @@ -190,7 +194,9 @@ policies:
siteuuid: '{{hub fromConfigMap "" .ManagedClusterName "logging-uuid" | toLiteral hub}}'
label3: 'other data'
pipelines:
- name: all-to-default
# Loki pipeline is already configured in the base CR
# Add pipeline for external forwarding
- name: all-to-external
inputRefs:
- audit
- infrastructure
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ required/machine-config/container-runtime.yaml
ClusterLogging5Cleanup.yaml
ClusterLogOperatorStatus.yaml

# Utility object for Loki Operator installation verification
LokiOperatorStatus.yaml

# Utility objects to wait for and acknowledge cluster ugprades
ClusterVersion.yaml
upgrade-ack.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@ metadata:
spec:
{{- if .spec.outputs }}
outputs:
- name: {{ (index .spec.outputs 0).name }}
type: kafka
kafka:
url: {{ (index .spec.outputs 0).kafka.url }}
{{- .spec.outputs | toYaml | nindent 2 }}
{{- end }}
{{- if .spec.filters }}
filters:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
name: loki-operator
namespace: openshift-operators-redhat
annotations:
operatorframework.io/bundle-unpack-min-retry-interval: 10m
spec:
{{- if .spec.upgradeStrategy }}
upgradeStrategy: Default
{{- end }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: v1
kind: Namespace
metadata:
name: openshift-operators-redhat
labels:
openshift.io/cluster-monitoring: "true"
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: v1
kind: Secret
metadata:
name: logging-loki-s3
namespace: openshift-logging
stringData:
access_key_id: {{ .stringData.access_key_id }}
access_key_secret: {{ .stringData.access_key_secret }}
bucketnames: {{ .stringData.bucketnames }}
endpoint: {{ .stringData.endpoint }}
region: {{ .stringData.region }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apiVersion: loki.grafana.com/v1
kind: LokiStack
metadata:
name: logging-loki
namespace: openshift-logging
spec:
managementState: Managed
limits:
global:
retention:
days: {{ .spec.limits.global.retention.days }}
size: {{ .spec.size }}
storage:
schemas:
- version: v13
effectiveDate: {{ (index .spec.storage.schemas 0).effectiveDate }}
secret:
name: logging-loki-s3
type: s3
storageClassName: {{ .spec.storageClassName }}
tenants:
mode: openshift-logging
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: loki-operator
namespace: openshift-operators-redhat
spec:
channel: "stable-6.5"
name: loki-operator
source: {{ .spec.source }}
sourceNamespace: openshift-marketplace
installPlanApproval: Manual
status:
state: AtLatestKnown
Original file line number Diff line number Diff line change
@@ -1,48 +1,54 @@
---
apiVersion: "observability.openshift.io/v1"
apiVersion: observability.openshift.io/v1
kind: ClusterLogForwarder
metadata:
name: instance
namespace: openshift-logging
spec:
# outputs: $outputs
# pipelines: $pipelines
outputs:
# Local Loki storage for troubleshooting
- name: loki-local
type: lokiStack
lokiStack:
target:
name: logging-loki
namespace: openshift-logging
authentication:
token:
from: serviceAccount
tls:
ca:
key: service-ca.crt
configMapName: openshift-service-ca.crt

# External log aggregation (OSS/BSS systems)
# Uncomment and configure for external forwarding
# - name: external-logs
# type: kafka # or splunk, syslog, etc.
# kafka:
# url: tcp://10.11.12.13:9092/test

pipelines:
# Infrastructure and audit logs to local Loki
- name: infra-audit-to-local-loki
inputRefs:
- audit
- infrastructure
outputRefs:
- loki-local

# Optional: Forward to external system (uncomment if needed)
# - name: infra-audit-to-external
# inputRefs:
# - audit
# - infrastructure
# outputRefs:
# - external-logs

serviceAccount:
name: collector
status:
# Verify that the configuration is correct
conditions:
- type: observability.openshift.io/Valid
status: "True"

# apiVersion: "observability.openshift.io/v1"
# kind: ClusterLogForwarder
# metadata:
# name: instance
# namespace: openshift-logging
# spec:
# outputs:
# - type: "kafka"
# name: kafka-open
# # below url is an example
# kafka:
# url: tcp://10.11.12.13:9092/test
# filters:
# - name: test-labels
# type: openshiftLabels
# openshiftLabels:
# label1: test1
# label2: test2
# label3: test3
# label4: test4
# pipelines:
# - name: all-to-default
# inputRefs:
# - audit
# - infrastructure
# filterRefs:
# - test-labels
# outputRefs:
# - kafka-open
# serviceAccount:
# name: collector
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
name: loki-operator
namespace: openshift-operators-redhat

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.

Needs a standard annotation for olm bundle unpack retry:
operatorframework.io/bundle-unpack-min-retry-interval: 10m

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done.

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.

Does Loki not have a namespace of its own for installation? If this is the documented reference from monitoring team it is fine, just want to confirm

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good question. I've followed the Red Hat OpenShift Logging documentation (6.2 and 6.5) for which states:

name: openshift-operators-redhat: Use this namespace for Red Hat Operators. Avoid using openshift-operators, which might contain untrusted community Operators and cause metric conflicts.

The netobserv-loki namespace is used for network observability, but our use case is local log storage, so openshift-operators-redhat seems the right choice for me.

annotations:
operatorframework.io/bundle-unpack-min-retry-interval: 10m
spec:
upgradeStrategy: Default
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: openshift-operators-redhat
labels:
# The cluster-monitoring label ensures Prometheus scrapes this namespace.
openshift.io/cluster-monitoring: "true"
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Operator installation verification
# This CR can be used to verify the installation/upgrade of the
# Loki Operator by including status fields as shown in
# examples below
---
apiVersion: operators.coreos.com/v1
kind: Operator
metadata:
name: loki-operator.openshift-operators-redhat
status:
# components:
# refs:
# - kind: Subscription
# namespace: openshift-operators-redhat
# conditions:
# - type: CatalogSourcesUnhealthy
# status: "False"
# - kind: InstallPlan
# namespace: openshift-operators-redhat
# conditions:
# - type: Installed
# status: "True"
# - kind: ClusterServiceVersion
# namespace: openshift-operators-redhat
# conditions:
# - type: Succeeded
# status: "True"
# reason: InstallSucceeded
Comment on lines +11 to +28

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

shouldn't this part be uncommented?

@rdiscala rdiscala Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I left the status commented out as an example. This is consistent with the already existing ClusterLogOperatorStatus.yaml added by @imiller0 . If you'd prefer status to be uncommented, I'd need to make the change to the other file as well, for consistency. What do you think?

Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Object storage credentials template
#
# Note: In production environments, secrets should be managed via secure
# methods such as the External Secrets Operator, Sealed Secrets, or a
# secrets management platform (e.g., HashiCorp Vault, AWS Secrets Manager).
# Avoid committing actual credentials to version control.
---
apiVersion: v1
kind: Secret
metadata:
name: logging-loki-s3
namespace: openshift-logging
stringData:
access_key_id: "<access key>"
access_key_secret: "<access key secret>"

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.

Add note that secrets should be managed via secure method such as External Secrets Operator

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done.

bucketnames: "<bucket names>"
endpoint: "<storage endpoint>" # e.g. <https://storage.endpoint.url>
region: "<region>"
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Important: do not reuse the same LokiStack that is used for logging
# See: https://docs.redhat.com/en/documentation/openshift_container_platform/4.21/html/network_observability/installing-network-observability-operators
---
apiVersion: loki.grafana.com/v1
kind: LokiStack
metadata:
name: logging-loki
namespace: openshift-logging
spec:
managementState: Managed
limits:
global:
retention:
days: 5 # Default retention period. User-configurable.
# Sizing: uses Loki's built-in defaults for PVC sizing, which are determined
# by the operator based on the size profile.
# Important: sufficient storage must be provided according to data
# requirements and the retention period configured above.
size: 1x.extra-small # 14 vCPUs, 31Gi memory, 430Gi disk, 100GB/day
storage:
schemas:
- version: v13
# effectiveDate controls when this schema version becomes active.
# CRITICAL: Must be set to a date in the PAST (at least 2 months before
# deployment) to ensure the schema is immediately active when Loki starts.
# Setting it in the future will prevent Loki from ingesting any logs.
# Setting it too recently may cause Loki to reject logs with timestamps
# that predate the effectiveDate. Cannot be changed retroactively.
# Example: If deploying in May 2026, set to "2026-03-01" or earlier.
effectiveDate: "<yyyy-mm-dd>" # e.g., "2026-03-01"
# Object storage configuration (LONG-TERM LOG STORAGE)
# This secret contains S3-compatible object storage credentials where
# compressed log chunks and indexes are stored permanently.
secret:
name: logging-loki-s3
type: s3
# Block storage configuration (SHORT-TERM BUFFERING)
# storageClassName provisions PVCs for Loki component StatefulSets.
# Used for: Write-Ahead Logs (WAL), temporary chunk caching, ingester buffering.
# This is INDEPENDENT from object storage - both are required.
storageClassName: "ocs-storagecluster-ceph-rbd" # Set to the cluster's available StorageClass

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.

How does this relate to the storage config in the Secret? Are these the same endpoint, or completely independent or ??

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

These are two independent entries for two different types and uses of storage. The secret is used to access an S3-compatible long-term storage for compressed log files. The storage class is used instead for short-term buffering (for performance and recovery in case of crash).

Added comments that clarify their use.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Within RDS Core storageClassed are created later in the process (ODF configuration is done in the core-overlay.yaml file file LokiStack.yaml is referenced in the core-baseline.yaml, which means that this referenced storageClass must be created outside? of the RDS policies? Or shall we recommend using SC from the ODF that's configured by the RDS Core manifests and re-shuffle configuration of LockStack resource?

@imiller0 thoughts?

tenants:
mode: openshift-logging
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: loki-operator
namespace: openshift-operators-redhat
spec:
channel: "stable-6.5" # Adapt for compatibility for OpenShift versions.
installPlanApproval: Manual
name: loki-operator
source: redhat-operators-disconnected # For disconnected environments.
sourceNamespace: openshift-marketplace
status:
state: AtLatestKnown
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# If you aren't currently defining any nodeDisruptionPolicies, apply this file directly:
# oc patch machineconfiguration cluster --type=merge --patch-file=node-disruption-policy.yaml
# Otherwise, manually add these entries to .spec.nodeDisruptionPolicy.units and .spec.nodeDisruptionPolicy.files.
---
apiVersion: operator.openshift.io/v1
kind: MachineConfiguration
metadata:
Expand Down
2 changes: 1 addition & 1 deletion telco-core/install/extra-manifests/Network.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ metadata:
spec:
defaultNetwork:
ovnKubernetesConfig:
mtu: 8900 # The cluster MTU must be set lower than machine network MTU. Optional features like encryption may require further lowering the MTU. See the documentation for details: https://docs.redhat.com/en/documentation/openshift_container_platform/latest/html/advanced_networking/changing-cluster-network-mtu
mtu: 8900 # The cluster MTU must be set lower than machine network MTU. Optional features like encryption may require further lowering the MTU. See the documentation for details: https://docs.redhat.com/en/documentation/openshift_container_platform/latest/html/advanced_networking/changing-cluster-network-mtu
2 changes: 1 addition & 1 deletion telco-hub/install/openshift/openshift/Network.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ metadata:
spec:
defaultNetwork:
ovnKubernetesConfig:
mtu: 8900 # The cluster MTU must be set lower than machine network MTU. Optional features like encryption may require further lowering the MTU. See the documentation for details: https://docs.redhat.com/en/documentation/openshift_container_platform/latest/html/advanced_networking/changing-cluster-network-mtu
mtu: 8900 # The cluster MTU must be set lower than machine network MTU. Optional features like encryption may require further lowering the MTU. See the documentation for details: https://docs.redhat.com/en/documentation/openshift_container_platform/latest/html/advanced_networking/changing-cluster-network-mtu
Loading