GitOpsHQ Docs
Reference

Feature Gates and Limits

Plan model, route-level feature gates, runtime license behavior, and effective limits.

Primary sources:

  • pkg/features/features.go
  • pkg/features/community.go
  • cmd/gitopshq/community.go
  • internal/server/routes_protected.go
  • internal/handler/webhook.go
  • internal/handler/features.go

Plan and Feature Model

The product model defines four plan enums:

  • free
  • pro
  • enterprise
  • cloud

Feature constants are grouped as:

  • Free core
  • Pro
  • Pro+ values-governance
  • Enterprise

There are 59 feature constants in pkg/features/features.go.

Route-Level Gates in Active Router

The protected router currently gates these capabilities:

GateFeature ConstantExample Routes
Advanced editorFeatureAdvancedEditorGET /api/v2/projects/{slug}/files/blame
PromotionFeaturePromotion/api/v2/projects/{slug}/promotion/*, /api/v2/promotions/*
Basic rollbackFeatureBasicRollback/revert-preview, /rollback/preview
Advanced rollbackFeatureRollbackselective preview/history/annotate routes
Selective rollbackFeatureSelectiveRollbackfield-level selective revert routes
Rollback approvalFeatureRollbackApproval/api/v2/rollback-requests/*
TeamsFeatureTeams/api/v2/teams/*
Resource permissionsFeatureResourcePermissions/api/v2/permissions/*
NotificationsFeatureNotifications/api/v2/notifications/preferences*
Alert escalationFeatureAlertEscalation/api/v2/notifications/policies*
K8s validationFeatureK8sValidation/api/v2/k8s/*
CRD schemasFeatureCRDSchemasPOST /api/v2/k8s/crd
Values governanceFeatureValuesGovernance/api/v2/policies/*

Community Build Behavior (Important)

Current OSS Runtime Semantics

The default non-enterprise build (cmd/gitopshq/community.go) initializes CommunityLicense, which:

  • reports plan as enterprise,
  • includes all listed features in the active set,
  • reports maxTenants=9999, maxUsers=9999, maxRepos=9999.

This means behavior in the current OSS binary can differ from roadmap/commercial tier narratives unless an enterprise licensing implementation overrides initLicense().

Effective Limits in Current Code Paths

Limit SurfaceSourceRuntime Behavior
Project count guardinternal/handler/project.go + LicenseService.MaxRepos()Uses license service; OSS community build returns 9999
Tenant count guardinternal/handler/tenant.go + LicenseService.MaxTenants()Uses license service; OSS community build returns 9999
Feature/plan APIGET /api/v2/features (internal/handler/features.go)Returns runtime plan + enabled features + max limits
Webhook target capwebhookLimitForPlan() in internal/handler/webhook.gofree:1, pro:10, enterprise:100

Organization Plan vs Runtime Gate

Organizations are created with OrgPlanFree in organization handlers, but route behavior is primarily controlled by the runtime LicenseService feature checks and limit values. Treat /api/v2/features as the runtime truth for active gates.

Operational Check

Use this call to verify the effective runtime state in any environment:

curl -H "Authorization: Bearer <token>" \
  -H "X-Organization-ID: <org-id>" \
  https://<host>/api/v2/features

Expect:

  • plan
  • features[]
  • limits.maxTenants
  • limits.maxUsers
  • limits.maxRepos

On this page