Governance

Karma

Dynamic trust scoring for Kubernetes platforms. Teams are granted privileges through demonstrated reliability; not tickets and approvals.

Karma wireframe
01

Overview

Karma transforms how platform teams manage access control. Instead of static RBAC policies and manual approval workflows, Karma calculates dynamic trust scores based on real behavioral signals: successful deployments, test coverage, security scan results, incident frequency, and more. Teams automatically move between tiers as their behavior changes, unlocking or restricting capabilities without manual intervention.

Enforcement happens through native Kubernetes ValidatingAdmissionPolicies. CEL expressions evaluate tier-based rules at admission time, controlling configuration like replica limits, privileged containers, production access, and resource quotas. No sidecars, no external dependencies; just Kubernetes-native policy enforcement driven by earned trust.

02

Features

Modular Signal Collection

Six provider types collect signals from any source: built-in Kubernetes resource watchers, webhooks from CI/CD pipelines, Prometheus metrics, custom CRD status fields, HTTP polling endpoints, and gRPC services.

Seven Signal Categories

Track behavior across deployment success, testing coverage, security posture, code quality, incident frequency, observability compliance, and custom business metrics; each with configurable weights and severity multipliers.

Graduated Trust Tiers

Three tiers with configurable thresholds: trusted (85+), standard (50-84), and probation (below 50). New teams start in a probationary period with clear graduation requirements based on deployment success and incident history.

Native Policy Enforcement

Tier-based entitlements automatically generate ValidatingAdmissionPolicies with CEL expressions. Control replica limits, privileged containers, production access, resource quotas, and custom policies per tier.

Anti-Gaming Protection

Deployment throttling, minimum change size detection, diminishing returns on frequent signals, pattern analysis for bot behavior, and custom CEL rules prevent artificial score inflation.

Multi-Cluster Support

Hub/spoke topology aggregates signals across clusters. Hub clusters distribute policies; spoke clusters report signals and sync tier assignments at configurable intervals.

03

Use Cases

04

Custom Resources

05

Example Workflow

This example demonstrates onboarding a team namespace and configuring tier-based deployment limits that automatically adjust based on the team's earned trust score.

# 1. Create the default KarmaPolicy with tier thresholds
  oc apply -f - <<EOF
  apiVersion: karma.cosmosdevops.co.uk/v1alpha1
  kind: KarmaPolicy
  metadata:
    name: default
  spec:
    tiers:
      trusted: { threshold: 85 }
      standard: { threshold: 50 }
      probation: { threshold: 0 }
  EOF

  # 2. Onboard a team by creating a TeamKarma resource
  oc apply -f - <<EOF
  apiVersion: karma.cosmosdevops.co.uk/v1alpha1
  kind: TeamKarma
  metadata:
    name: frontend-team
  spec:
    namespaceRef: frontend
    policyRef: default
  EOF

  # 3. Create an entitlement for replica limits per tier
  oc apply -f - <<EOF
  apiVersion: karma.cosmosdevops.co.uk/v1alpha1
  kind: KarmaEntitlement
  metadata:
    name: max-replicas
  spec:
    category: resources
    tiers:
      trusted: { maxReplicas: "100" }
      standard: { maxReplicas: "20" }
      probation: { maxReplicas: "5" }
  EOF

  # 4. Check the team's current score and tier
  oc get teamkarma frontend-team -o jsonpath='{.status.score} {.status.tier}'

Build Trust-Based Platforms

Replace manual approvals with earned autonomy. Deploy Karma and let team behavior drive platform access.