Reusable components for Kubernetes operators and controllers, eliminating code duplication across zen-flow, zen-lock, zen-watcher, and other Zen tools
zen-sdk provides reusable components for Kubernetes operators and controllers, eliminating code duplication across zen-flow, zen-lock, zen-watcher, and other Zen tools.
Philosophy: Do not create a monorepo. Create a shared library. Each tool is a separate repository, but they share common code through zen-sdk.
Simple, consistent API for enabling HA with controller-runtime's built-in leader election
Standard Prometheus metrics setup and common metrics for Kubernetes controllers
Consistent structured logging configuration across all tools
Standardized graceful shutdown helpers for HTTP servers, gRPC servers, and worker services
Exponential backoff retry logic with context cancellation support for Kubernetes operations
Event deduplication package for preventing duplicate observations within configurable time windows
go get github.com/kube-zen/zen-sdk@latest
import (
"github.com/kube-zen/zen-sdk/pkg/leader"
"github.com/kube-zen/zen-sdk/pkg/metrics"
"github.com/kube-zen/zen-sdk/pkg/logging"
)Ready to build Kubernetes controllers? Check out the Hello Controller example and start using zen-sdk today.