Skip to content

lukacsi/livekit-declarative-operator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Declarative LiveKit Operator

A Kubernetes Operator for managing the lifecycle of LiveKit media servers.

Unlike standard operators built with Kubebuilder, this project utilizes the Delta-Controller framework, allowing for a purely declarative, pipeline-based architecture. It solves the complex "Day-1" and "Day-2" operational challenges of WebRTC infrastructure—specifically Network Discovery (NAT/TURN), state management, and multi-tenancy—without imperative spaghetti code.

Key Features

  • Zero-Touch Provisioning: Automatically discovers public IPs from Cloud LoadBalancers and hydrates the LiveKit configuration. No manual turn_servers setup required.
  • Gateway API Integration: Native support for Stunner and Envoy Gateway to handle UDP/TCP traffic separation.
  • Polymorphic Persistence: Seamlessly switch between embedded Redis (StatefulSet) and external Cloud Redis (Memorystore/Elasticache) with zero downtime.
  • Feature Toggling: Enable/Disable components like Ingress via simple CRD flags; the operator handles the cleanup.
  • Secure by Default: Automated TLS certificate generation via cert-manager and secure credential management.

Installation

Prerequisites

Architecture

This operator implements the \Delta-Controller Pattern, treating the Kubernetes reconciliation loop as a dataflow problem rather than a procedural one.

The Pipeline

Instead of if/else logic, the state is derived through SQL-like transformations:

  1. Decomposition: LiveKitPool -> LiveKitServerView + LiveKitNetworkingView
  2. Network Discovery: NetworkingView + Gateway (K8s) -> Resolved Public IP
  3. Materialization: Views -> Deployments, Services, Secrets

This architecture ensures that the "Inverse Operation" (Teardown/Garbage Collection) is handled automatically. If a resource disappears from the View, it is deleted from the cluster.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Background

This project was developed as part of a BSc Thesis at Budapest University of Technology and Economics (BME), Department of Telecommunications and Media Informatics.

Title: Design and Implementation of a Declarative Kubernetes Operator for the LiveKit Media Server Framework.

Author: Sándor Lukácsi

About

A helm chart for deploying LiveKit server operator, utilizing the declarative delta controller framework.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors