Start with install notes or jump straight into the API.

Operations

InfraRules CRD

InfraRules is the cluster-scoped policy object for Layer-managed runtime infrastructure. The 0.1 surface has exactly one object: InfraRules/default.

Pipelines and Functions do not reference a separate autoscaling resource. They set spec.scaling inline and choose a pool from InfraRules/default.spec.computePools.

InfraRules

apiVersion: hevlayer.com/v1alpha1
kind: InfraRules
metadata:
  name: default
spec:
  computePools:
    - name: cpu
      kind: cpu
      maxReplicasPerWorkload: 20
      nodeSelector:
        karpenter.sh/nodepool: cpu
      tolerations: []
      resources:
        requests:
          cpu: "500m"
          memory: 512Mi
        limits:
          memory: 1Gi
  documentCache:
    capGiB: 256
    replicationFactor: 1
    scaling:
      mode: autoscale
      nodes:
        min: 1
        max: 3

The operator validates that the object is named default. Helm can render the default object with operator.infraRules.create=true.

Compute pools

FieldPurpose
nameReferenced by spec.scaling.pool on Pipeline and Function resources.
kindPool class label such as cpu or gpu.
gpuTypeOptional descriptive GPU type for GPU pools.
nodeSelectorApplied to worker pods that choose the pool.
tolerationsApplied to worker pods that choose the pool.
resourcesContainer resources applied to worker pods.
maxReplicasPerWorkloadHard ceiling for one Pipeline or Function.

If a workload names an unknown pool or asks for more replicas than the pool ceiling, the operator leaves the workload unready and records a condition on its status.

Workload scaling

scaling:
  pool: cpu
  mode: autoscale
  replicas:
    min: 0
    max: 4
ModeBehavior
autoscaleEmit a KEDA ScaledObject and let queue depth scale the Deployment between min and max.
fixedSet Deployment replicas to replicas.min; no KEDA object is emitted.
disabledScale the Deployment to 0; no KEDA object is emitted.

Paused workloads also scale to 0. To keep a cold-start-heavy worker warm, set mode: autoscale and replicas.min: 1.

Document cache rules

documentCache captures the operator-owned document cache envelope: capacity, replication factor, and node count. Helm still renders the document-cache KEDA object directly in 0.1; InfraRules is the declared policy shape the operator reports and validates against.