fasit

module
v0.0.0-...-6bc1bc7 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2026 License: MIT, MIT

README

Fasit

Fasit is a multi-tenant feature management platform. It deploys OCI Helm charts — called features — across environments, using label-based targeting and automatic reconciliation.

How it works

  Feature author
       │
       ├─── push chart ───────► OCI Registry
       │                              ▲
       └─── create assignment ──┐     │
                                ▼     │
     ┌────── Fasit ─────────────────────────────┐
     │                                          │
     │  Desired state        Reconciler         │
     │  ┌─────────────┐         │               │
     │  │ assignment  │────► compare ◄──────┐   │
     │  │ config      │         │           │   │
     │  │ env values  │    deploy instr.    │   │
     │  └─────────────┘         │           │   │
     │                          │           │   │
     └──────────────────────────┼───────────┼───┘
                                ▼           │
                      ┌──────────────────┐  │
                      │  Environment     │  │
                      │                  │  │
                      │  naisd ► helm    │  │
                      │                  │  │
                      │  Actual state    │──┘
                      │  feature @ v1.2  │ (status report)
                      └──────────────────┘
  1. A feature is an OCI Helm chart with a Feature.yaml that declares its configurable values and target environment kinds.
  2. A feature author creates an assignment — handing a feature version to Fasit with a set of target labels (e.g. tenant=nav, env=prod).
  3. Fasit matches the assignment to all environments whose labels are a superset of the target.
  4. The reconciler renders helm values for each matched environment and sends deploy instructions to the naisd agent running there.
  5. naisd executes helm install/upgrade and reports status back.

When configs, environment values, or feature versions change, the reconciler detects the drift and re-deploys automatically.

Documentation

  • Concepts — environments, features, assignments, values, reconciliation
  • Authoring a Feature — Feature.yaml spec, templates, template functions

Components

Component Role
fasit HTTP/gRPC server, web UI, reconciler, deployment orchestration
naisd Per-environment agent that executes Helm and reports status

Local development

mise install              # install tools
cp .env.example .env     # configure environment
mise run setup            # start postgres, seed database
mise run dev              # run fasit with auto-reload

Local development runs an in-process fake naisd (FASIT_FAKE_NAISD=true in .env), so no Pub/Sub emulator or separate naisd process is needed. The fake simulates Helm deploys and reports status, release state and health back to the reconciler. FASIT_FAKE_NAISD_FAILING_ENVS / FASIT_FAKE_NAISD_UNHEALTHY_ENVS reproduce a demo mix of FAILED and PENDING features.

See mise run --list for all available tasks.

Testing

mise run test             # unit + integration tests
mise run test:unit        # unit tests only
mise run test:integration # integration tests (requires testcontainers)

JSON Schema

Enable IDE autocompletion/validation for Feature.yaml:

https://storage.googleapis.com/fasit-jsonschema/feature.json

License

MIT

Directories

Path Synopsis
cmd
fasit command
generate_schema command
naisd command
setup_local_env command
internal
api
audit/auditsqlfake
Package auditsqlfake provides a test fake for auditsql.Querier.
Package auditsqlfake provides a test fake for auditsql.Querier.
dbtx
Package dbtx provides a small, generic mechanism for running a function inside a database transaction whose handle is propagated via context.
Package dbtx provides a small, generic mechanism for running a function inside a database transaction whose handle is propagated via context.
fakeagent
Package fakeagent provides an in-process stand-in for naisd used in local development.
Package fakeagent provides an in-process stand-in for naisd used in local development.
ui

Jump to

Keyboard shortcuts

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