Monorepo Structure
LiteFunctions is organized as a monorepo containing all components of the platform. This structure makes development, testing, and deployment more cohesive and manageable.
Directory Overview
litefunctions/
├── operator/ # Kubernetes operator
├── ingestor/ # Function execution ingestor
├── portal/ # Web UI
├── runtimes/ # Language runtimes
│ ├── go/
│ ├── python/
│ └── rust/
├── chart/ # Helm chart for deployment
├── build/ # Build configurations
├── docs/ # Documentation
└── README.mdComponents
Operator
The operator is the core component that manages function deployments on Kubernetes.
Location: operator/
Key Contents:
api/- Custom Resource Definitions (CRDs) and typescmd/- Main operator binary entry pointconfig/- Kubernetes manifests and Kustomize configurationsinternal/- Internal business logicMakefile- Build and deployment targets
Technology: Go with Kubebuilder
Ingestor
The ingestor receives function execution requests and routes them to the appropriate runtime.
Location: ingestor/
Key Contents:
cmd/- Ingestor binary entry pointpkg/- Ingestor business logicgo.mod- Go module dependencies
Technology: Go
Portal
The web UI provides a user-friendly interface for managing functions, viewing logs, and monitoring deployments.
Location: portal/
Technology: litewebservices-portal
Runtimes
Runtimes are containerized environments for executing functions in different languages.
Location: runtimes/
Go Runtime
Location: runtimes/go/
Contains the Go execution environment and standard library for running Go functions.
Python Runtime
Location: runtimes/python/
Contains the Python execution environment with common packages for Python functions.
Rust Runtime
Location: runtimes/rust/
Contains the Rust execution environment with the standard library for running Rust functions.
Build
Build configurations for creating container images and deploying components.
Location: build/
Contents:
ingestor/Dockerfile- Build configuration for ingestorruntimes/Dockerfile.go- Go runtime containerruntimes/Dockerfile.python- Python runtime containerruntimes/Dockerfile.rust- Rust runtime containerruntimes/Dockerfile.rust.base- Base Rust runtime image
Chart
Helm chart for deploying the entire LiteFunctions stack to Kubernetes.
Location: chart/
Key Contents:
Chart.yaml- Helm chart metadata and dependenciesvalues.yaml- Configuration values for all componentstemplates/- Kubernetes templatescrds/- Custom Resource Definitions
Dependencies:
- NATS - Message streaming
- Valkey (Redis) - Caching and state
- PostgreSQL - Database (via PGO)
- Gitea - Git server
- Actions - CI/CD
- Zot - Container registry
- MinIO - Object storage (optional)
Docs
Documentation for the LiteFunctions platform.
Location: docs/
Built with Hugo for LiteFunctions documentation.
Development Workflow
Building Components
# Build operator
cd operator
make build
# Build ingestor
cd ingestor
go build -o bin/ingestor ./cmd/main.go
# Build runtimes
# Use Dockerfiles in build/runtimes/Running Locally
# Deploy to local Kubernetes cluster
cd chart
helm install litefunctions .
# Install CRDs
cd operator
make install
# Deploy operator
make deployTesting
# Run operator tests
cd operator
make test
# Run ingestor tests
cd ingestor
go test ./...Contributing
When contributing to LiteFunctions, follow these guidelines:
- Component Isolation: Changes should be focused on specific components
- API Changes: Update CRDs and regenerate code when modifying APIs
- Runtime Changes: Test runtime changes with sample functions
- Documentation: Update relevant documentation alongside code changes