Skip to content

Resource Types

A resource is any workload or service running in an AppBahn environment. Each resource has a type that determines how AppBahn provisions and manages it.

The deployment type runs a container image as a Kubernetes Deployment with a Service and optional Ingress.

FieldTypeDefaultDescription
source.typestringSource type: docker or git
source.imagestringDocker image name (e.g., nginx, registry.example.com/app)
source.tagstringlatestImage tag
networking.ports[].portinteger80Container port to expose
hosting.cpustring"250m"CPU request in Kubernetes quantity format (e.g., “250m”, “1”)
hosting.memorystring"256Mi"Memory request in Kubernetes quantity format (e.g., “256Mi”, “1Gi”)
hosting.replicasinteger1Number of replicas
networking.ports[].exposestringnoneExposure mode: ingress (public HTTP via Ingress + in-cluster ClusterIP service), tcp (raw-TCP LoadBalancer), or none (in-cluster ClusterIP service, no Ingress).
networking.ports[].domainstringautoPer-port domain. Defaults to {slug}.{baseDomain} for the first ingress port and {slug}-{port}.{baseDomain} for additional ones.
runModestringcontinuousRun mode: continuous
healthCheck.readinessobjectReadiness probe (see Health Checks below)
healthCheck.livenessobjectLiveness probe (see Health Checks below)
healthCheck.startupobjectStartup probe (see Health Checks below)
envobject{}Environment variables as key-value pairs
{
"source": {
"type": "docker",
"image": "nginx",
"tag": "1.27"
},
"hosting": {
"cpu": "250m",
"memory": "256Mi",
"replicas": 2
},
"networking": {
"ports": [
{
"port": 80,
"expose": "ingress"
}
]
},
"runMode": "continuous",
"env": {
"APP_ENV": "production"
}
}

Resources go through these status phases:

StatusDescription
PENDINGResource created, waiting for pods
READYAll replicas are available
DEGRADEDSome replicas unavailable
RESTARTINGRolling restart in progress
ERRORNo replicas available — image pull failed, rollout deadline exceeded, or a container is CrashLoopBackOff-ing. statusDetail.lastError shows why.
STOPPEDManually stopped

When a container crash-loops or its previous instance terminated with a non-zero exit code, the latest error is surfaced under statusDetail.lastError (for example container 'app' crash-looped: exited 137 (OOMKilled)).

Each probe (readiness, liveness, startup) supports one action type and optional timing parameters:

FieldTypeDescription
httpGet.pathstringHTTP path to probe (e.g., /healthz)
httpGet.portintegerPort for the HTTP probe
tcpSocket.portintegerPort for a TCP socket check
exec.commandarrayCommand to execute inside the container
initialDelaySecondsintegerSeconds to wait before the first probe
periodSecondsintegerInterval between probes
failureThresholdintegerConsecutive failures before marking unhealthy

Example with health checks:

{
"healthCheck": {
"readiness": {
"httpGet": { "path": "/ready", "port": 8080 },
"initialDelaySeconds": 5,
"periodSeconds": 10
},
"liveness": {
"httpGet": { "path": "/healthz", "port": 8080 },
"periodSeconds": 30,
"failureThreshold": 3
}
}
}

The console’s resource overview shows the latest outcome for each configured probe — a green dot for success, red for failure, and the most recently measured latency in milliseconds. The data lives under statusDetail.probeStatus and is refreshed continuously by the operator:

FieldSource
okFailures are picked up from kubelet Unhealthy events the moment they fire; successes are observed by an operator-side probe that runs against the pod IP every 60 seconds.
lastLatencyMsMeasured by the operator’s own probe run. Kubelet failure events do not carry latency, so this field can be null for a probe that has only ever failed.
lastCheckedAtWall-clock time the most recent observation was recorded.

Exec probes (exec.command) record only lastCheckedAt; their latency is not measured. HTTP and TCP probes record latency in full.

Resource creation and updates may return these additional error codes:

StatusMeaning
402License limit reached — the current license does not allow more resources
422Quota exceeded — workspace, project, or environment quota would be exceeded

These responses include a JSON body with error and message fields describing the specific limit or quota that was exceeded.

Database resource types (PostgreSQL, MongoDB, Valkey, etc.) are available when the corresponding operator is installed on the cluster. Use the /resource-types API endpoint or the console to see available types for your cluster.

  • GET /api/v1/resource-types?cluster={name} — List available types
  • POST /api/v1/resources — Create a resource
  • GET /api/v1/resources/{slug} — Get resource details
  • PATCH /api/v1/resources/{slug} — Update a resource
  • DELETE /api/v1/resources/{slug} — Delete a resource