$ show fission/fission
Fission is a Kubernetes-native serverless framework (FaaS) that deploys and manages functions triggered by HTTP requests, message queues (Kafka, NATS, etc.), cron schedules, and Kubernetes events. The system is composed of multiple microservices: a router that proxies HTTP requests to function pods, an executor that manages warm-pool and per-function deployment backends, a builder that compiles function packages, a fetcher sidecar that materializes code into pods, and a storage service for archive management. All resources (Function, Environment, HTTPTrigger, Workflow, etc.) are defined as Kubernetes Custom Resource Definitions (CRDs) and reconciled by controller-runtime controllers. The architecture supports multi-tenant namespaces, canary deployments via FunctionAlias and CanaryConfig CRDs, a workflow engine with event sourcing, and a pluggable state store (memory, SQLite, Postgres) for durable queues and key-value storage. Internal service-to-service communication is authenticated via HMAC signing. Observability is built on OpenTelemetry (traces, metrics, logs) and Prometheus. The CLI tool (`fission`) provides full lifecycle management and a GitOps-friendly spec system. The codebase is RFC-driven with formal verification (TLA+ specs) for critical subsystems like the workflow event log and queue lease protocol.
The LLM identified 5 files worth highlighting for reuse:
Provides HMAC-SHA256 signing and verification for internal Fission service calls. Includes key derivation per service/namespace, master key rotation support, a transport wrapper that automatically signs outgoing requests, and a verifier for incoming requests. The package is self-contained, well-tested (including streaming and namespace key tests), and can be extracted for any microservice mesh requiring lightweight, symmetric authentication without external dependencies.
Defines interfaces for KV store, queue, and event log with pluggable backends (memory, SQLite, Postgres). Includes a conformance test suite (`statestoretest`) that verifies linearizability (via Porcupine) and driver correctness. The SQL driver provides a migration framework with additive-only DDL and checksum-pinned migrations. This abstraction is reusable for any application needing a durable, transactional state layer with formal correctness guarantees.
A lightweight HTTP request multiplexer that supports path template matching with variable extraction (e.g., /api/{version}/foo) and WebSocket upgrade detection. It is independent of any framework, uses standard `net/http` handlers, and includes benchmarks and edge-case tests. Can be extracted as a standalone library for any Go HTTP server needing clean path routing without the overhead of full routers like gorilla/mux.
Implements an HTTP client transport with configurable retry logic: rewinds request bodies for each attempt, retries on 5xx and 429 status codes, respects Retry-After headers, and supports context cancellation. The retry policy is parameterized (max attempts, backoff function). This is a reusable pattern for any Go service needing resilient HTTP calls to external APIs or internal microservices.
A small, focused utility for managing Kubernetes status conditions on custom resources. Provides functions to set, remove, and find conditions by type, with proper LastTransitionTime handling. It abstracts the boilerplate of condition slice manipulation and is reusable in any Kubernetes controller that needs to report status conditions.