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
| Field | Purpose |
|---|---|
name | Referenced by spec.scaling.pool on Pipeline and Function resources. |
kind | Pool class label such as cpu or gpu. |
gpuType | Optional descriptive GPU type for GPU pools. |
nodeSelector | Applied to worker pods that choose the pool. |
tolerations | Applied to worker pods that choose the pool. |
resources | Container resources applied to worker pods. |
maxReplicasPerWorkload | Hard 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
| Mode | Behavior |
|---|---|
autoscale | Emit a KEDA ScaledObject and let queue depth scale the Deployment between min and max. |
fixed | Set Deployment replicas to replicas.min; no KEDA object is emitted. |
disabled | Scale 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.