Skip to content

Add Flipt + OpenFeature integration for runtime feature flags #120

Description

@haasonsaas

Context

Feature flags are currently file-based only (featureflags/file_store.go). Services can't toggle features without a deploy. This blocks:

  • Kill switches for new features during incidents
  • Gradual rollouts to specific orgs/teams
  • A/B testing (relevant for evalops/prompts#28)
  • Runtime configuration changes

Why Flipt + OpenFeature

  • Flipt: Open-source, written in Go, self-hosted, supports Git-based flag definitions (GitOps-native). Uses Postgres or embedded SQLite — no additional infrastructure for small deployments. Native gRPC and HTTP APIs.
  • OpenFeature: CNCF vendor-neutral SDK. Abstracts the flag backend so we can swap providers later without changing application code.

Requirements

service-runtime integration

  • Add github.com/open-feature/go-sdk dependency
  • Add github.com/open-feature/go-sdk-contrib/providers/flipt provider
  • Create featureflags/openfeature.go that initializes the Flipt provider from env vars (FLIPT_URL)
  • Maintain backward compatibility with file-based store (fallback when FLIPT_URL is unset)
  • Add ConnectRPC interceptor that extracts user/org context from request metadata and populates OpenFeature evaluation context automatically

Flipt deployment

  • Add Flipt deployment to evalops/deploy (single replica, Postgres-backed, using existing cluster Postgres)
  • Configure Git-based flag definitions: flags defined in a flags/ directory in the deploy repo, synced to Flipt via GitOps
  • Add Flipt ServiceMonitor for Prometheus scraping
  • Add basic Grafana dashboard for flag evaluation metrics

Migration path

  • Migrate existing file-based flags to Flipt definitions
  • Add FLIPT_URL to service environment configs
  • Document flag lifecycle: creation, ownership, expected removal date, stale flag policy (>90 days → review)

Usage pattern

client := openfeature.NewClient("meter")
enabled, _ := client.BooleanValue(ctx, "budget-alerts-v2", false,
    openfeature.NewEvaluationContext("", map[string]interface{}{
        "targetingKey": orgID,
        "tier":         orgTier,
    }),
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions