cluster-logging-operator

module
v0.0.0-...-d2691e4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 17, 2026 License: Apache-2.0

README

Cluster Logging Operator

The Cluster Logging Operator (CLO) is a Kubernetes operator for configuring log collection and forwarding on OpenShift clusters. It manages the deployment of Vector as the log collector and supports complex log routing through inputs, outputs, filters, and pipelines defined via the ClusterLogForwarder CRD.

What This Repository Does

This repository contains the source code and configuration for the Cluster Logging Operator, which:

  • Collects logs from multiple sources (application, infrastructure, and audit logs)
  • Transforms and filters logs using configurable pipelines
  • Forwards logs to various destinations (Loki, Splunk, AWS CloudWatch, Google Cloud Logging, Elasticsearch, Kafka, Azure, and more)
  • Manages log collection through Kubernetes Custom Resources
  • Provides metrics and observability for the logging infrastructure

Building and Running Locally

Prerequisites
  • Go (see go.mod for the required version)
  • Podman or Docker
  • Kubernetes cluster (or local cluster like Kind, minikube, or Code Ready Containers)
  • kubeconfig configured for your target cluster
Quick Start
# Install development tools
make tools

# Build the operator binary
make build

# Run the operator locally (requires kubeconfig)
make run

# Or deploy to a cluster
make deploy

For a full list of development commands and workflows, see CONTRIBUTING.md.

Directory Structure

  • api/ - API definitions and CRD schemas
  • cmd/ - Main entry point for the operator
  • config/ - Kubernetes configuration manifests
  • internal/controller/ - Reconciliation logic
  • internal/generator/ - Configuration generation system for Vector
  • test/ - All testing infrastructure (unit, functional, e2e)
  • hack/ - Development and build scripts
  • docs/ - Detailed documentation including administration and contribution guides

Architecture

The operator uses a multi-layered architecture:

  • Controllers: Manage ClusterLogForwarder and LogFileMetricsExporter resources
  • Configuration Generator: Translates CRD specs into Vector collector configurations
  • Vector Integration: Uses Vector as the log collector/forwarder
  • Kubernetes Integration: Deploys and manages collector components via DaemonSets and Deployments

For detailed architecture information, see ARCHITECTURE.md.

Documentation

For official OpenShift Logging documentation, see the OpenShift Container Platform documentation.

Contributing

We welcome contributions! Please see CONTRIBUTING.md for information on how to:

  • Submit changes via pull requests
  • Follow coding conventions
  • Run tests before submitting
  • Participate in code reviews

License

This repository is licensed under the Apache License 2.0. See LICENSE file for details.

Getting Help

Directories

Path Synopsis
api
logging/v1alpha1
package v1alpha1 custom resources for the cluster logging operator.
package v1alpha1 custom resources for the cluster logging operator.
observability module
internal
datamodels/operator/v1
Package contains API definitions for Cluster logging that can not be added to the apis package +groupName=logging
Package contains API definitions for Cluster logging that can not be added to the apis package +groupName=logging
datamodels/viaq/v1
Package contains API definitions for the logging viaq datamodel +groupName=viaq
Package contains API definitions for the logging viaq datamodel +groupName=viaq
generator/url
package url provides operations on URLs and URL schemes for log forwarding destinations.
package url provides operations on URLs and URL schemes for log forwarding destinations.
tls
client
package client provides a client for tests.
package client provides a client for tests.
e2e/flowcontrol
End-to-End Tests for Log Flow Control LOG-1043: Log Flow Control API Enhancement
End-to-End Tests for Log Flow Control LOG-1043: Log Flow Control API Enhancement
functional/flowcontrol
Functional Tests for Log Flow Control
Functional Tests for Log Flow Control
helpers/fluentd
package fluentd provides a fluentd receiver for use in e2e forwarding tests.
package fluentd provides a fluentd receiver for use in e2e forwarding tests.
runtime
package runtime provides conveniences based on "k8s.io/apimachinery/pkg/runtime"
package runtime provides conveniences based on "k8s.io/apimachinery/pkg/runtime"

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL