Skip to content

APISix Factories

Experimental

APISix factories are experimental. The API may change in future releases.

Factory functions for deploying APISix Ingress Controller via Helm.

Installation

typescript
import * as apisix from 'typekro/apisix';

Quick Example

typescript
import * as apisix from 'typekro/apisix';

// Bootstrap APISix with Helm
const bootstrap = apisix.apisixBootstrap({
  namespace: 'apisix',
  config: {
    gateway: { type: 'LoadBalancer' },
    dashboard: { enabled: true }
  }
});

Available Factories

FactoryDescription
apisixBootstrapDeploy APISix via Helm with sensible defaults
apisixHelmReleaseFull HelmRelease configuration for APISix

Bootstrap Configuration

typescript
interface APISixBootstrapConfig {
  namespace?: string;
  version?: string;
  config?: {
    gateway?: {
      type?: 'ClusterIP' | 'NodePort' | 'LoadBalancer';
      replicas?: number;
    };
    dashboard?: {
      enabled?: boolean;
    };
    ingress?: {
      enabled?: boolean;
      className?: string;
    };
  };
}

Usage in Compositions

typescript
import { kubernetesComposition } from 'typekro';
import * as apisix from 'typekro/apisix';

const infrastructure = kubernetesComposition(definition, (spec) => {
  apisix.apisixBootstrap({
    namespace: 'apisix',
    config: {
      gateway: { type: 'LoadBalancer', replicas: spec.replicas }
    }
  });

  return { ready: true };
});

Prerequisites

APISix bootstrap requires Flux CD installed in your cluster. See Kro Runtime Bootstrap for setup.

Next Steps

Released under the Apache 2.0 License.