Skip to content

Inngest Factories

Deploy Inngest on Kubernetes using the official Helm chart. Inngest is a workflow orchestration platform with no CRDs — all configuration is through Helm values.

Import

typescript
import { inngestBootstrap } from 'typekro/inngest';

Quick Example

typescript
import { inngestBootstrap } from 'typekro/inngest';

// 'kro' = KRO mode (continuous reconciliation via ResourceGraphDefinition)
// 'direct' = Direct mode (immediate apply, no KRO controller needed)
const factory = inngestBootstrap.factory('kro', {
  namespace: 'inngest',
  waitForReady: true,
});

await factory.deploy({
  name: 'inngest',
  namespace: 'inngest',
  inngest: {
    eventKey: 'your-event-key',
    signingKey: 'your-signing-key',
  },
});

Available Factories

FactoryKindDescription
inngestHelmRepositoryHelmRepositoryOCI chart registry
inngestHelmReleaseHelmReleaseInngest deployment via Helm

Bootstrap Composition

Basic (bundled PostgreSQL + Redis)

typescript
await factory.deploy({
  name: 'inngest',
  namespace: 'inngest',
  inngest: {
    eventKey: 'your-event-key',
    signingKey: 'your-signing-key',
  },
});

With external databases (CNPG + Valkey)

Disable bundled databases and provide connection URIs:

typescript
await factory.deploy({
  name: 'inngest',
  namespace: 'inngest',
  inngest: {
    eventKey: 'your-event-key',
    signingKey: 'your-signing-key',
    postgres: { uri: 'postgresql://inngest:password@my-db-rw:5432/inngest' },
    redis: { uri: 'redis://my-cache:6379' },
    sdkUrl: ['http://my-app:5173/api/inngest'],
  },
  postgresql: { enabled: false },
  redis: { enabled: false },
  resources: {
    requests: { cpu: '500m', memory: '1Gi' },
    limits: { cpu: '2', memory: '4Gi' },
  },
});

With ingress and autoscaling

typescript
await factory.deploy({
  name: 'inngest',
  namespace: 'inngest',
  inngest: {
    eventKey: 'your-event-key',
    signingKey: 'your-signing-key',
    host: 'inngest.example.com',
  },
  ingress: {
    enabled: true,
    className: 'nginx',
    hosts: [{ host: 'inngest.example.com' }],
    tls: [{ secretName: 'inngest-tls', hosts: ['inngest.example.com'] }],
  },
  keda: {
    enabled: true,
    minReplicas: 2,
    maxReplicas: 20,
  },
});

Bootstrap Status

typescript
instance.status.ready    // boolean — Inngest is processing events
instance.status.phase    // 'Ready' | 'Installing'
instance.status.failed   // boolean — true if HelmRelease Ready=False
instance.status.version  // deployed chart version (static, deploy-time)

Note: phase cannot distinguish 'Failed' from 'Installing' due to a CEL evaluator limitation. Use the failed field to detect deployment failures.

Key Configuration

FieldRequiredDescription
inngest.eventKeyYesEvent authentication key
inngest.signingKeyYesRequest signing key
inngest.postgres.uriNoExternal PostgreSQL URI (disables bundled PG)
inngest.redis.uriNoExternal Redis/Valkey URI (disables bundled Redis)
inngest.sdkUrlNoSDK URLs to auto-sync functions from
postgresql.enabledNoBundled PostgreSQL (default: true)
redis.enabledNoBundled Redis (default: true)

Usage in Compositions

Note: This example uses CloudNativePG and Valkey for external databases. See their respective docs for setup.

typescript
import { type } from 'arktype';
import { kubernetesComposition } from 'typekro';
import { inngestBootstrap } from 'typekro/inngest';
import { cluster } from 'typekro/cnpg';
import { valkey } from 'typekro/valkey';

const MyPlatform = kubernetesComposition({
  name: 'my-platform',
  kind: 'MyPlatform',
  spec: type({ name: 'string', image: 'string' }),
  status: type({ ready: 'boolean' }),
}, (spec) => {
  // PostgreSQL via CNPG
  const db = cluster({
    id: 'database',
    name: `${spec.name}-db`,
    spec: {
      instances: 3,
      storage: { size: '50Gi' },
      bootstrap: { initdb: { database: 'inngest', owner: 'inngest' } },
    },
  });

  // Valkey cache
  const cache = valkey({
    id: 'cache',
    name: `${spec.name}-cache`,
    spec: { shards: 3, volumePermissions: true },
  });

  // Inngest with external DBs
  const inngest = inngestBootstrap({
    name: `${spec.name}-inngest`,
    inngest: {
      eventKey: 'your-key',
      signingKey: 'your-signing-key',
      postgres: { uri: `postgresql://inngest:password@${spec.name}-db-rw:5432/inngest` },
      redis: { uri: `redis://${spec.name}-cache:6379` },
    },
    postgresql: { enabled: false },
    redis: { enabled: false },
  });

  return {
    ready: db.status.readyInstances > 0 && cache.status.ready,
  };
});

Prerequisites

No operator installation needed — Inngest is deployed directly via Helm. Requirements:

  • Flux CD — for HelmRelease reconciliation
  • PostgreSQL — bundled or external (e.g., CloudNativePG)
  • Redis/Valkey — bundled or external (e.g., Valkey)
  • KEDA — optional, for queue-depth autoscaling
  • cert-manager — optional, for TLS ingress

Next Steps

Released under the Apache 2.0 License.