Skip to content

Apps (serverless containers)

An app runs one container image behind an HTTPS URL and scales with request load, down to zero when idle (Knative). You bring the image; there is no Kubernetes YAML to write.

Create

Apps → Create: name, image, port, environment variables, CPU and memory requests and limits, and scaling bounds.

  • Scale to zero (minimum scale 0) is the default: the first request after an idle period waits for a cold start. Set a minimum of 1 to keep one instance warm.
  • Private images: add registry credentials under Secrets and select them as the image pull secret. Images in your own registry work the same way.
  • Environment variables can be literal values or references to a secret key.

Deploy from CI

The knative-release GitHub Action creates or updates an app from a workflow, authenticated by a service account:

- uses: theorigamicorporation/auth@v1
  with:
    service_account_name: ${{ secrets.RSO_DEV_SERVICE_ACCOUNT_NAME }}
    service_account_secret: ${{ secrets.RSO_DEV_SERVICE_ACCOUNT_SECRET }}
- uses: theorigamicorporation/knative-release@v1
  with:
    service_name: my-app
    image: ${{ steps.build.outputs.image }}

Billing

Apps are billed on what they use, not on what they request: CPU core-hours and memory GB-hours measured every hour. An app scaled to zero uses nothing.

Terraform

# A serverless app from a public image, always keeping one instance warm.
resource "rso_app" "hello" {
  name  = "tf-example-hello"
  image = "ghcr.io/knative/helloworld-go:latest"
  port  = 8080

  env = {
    TARGET = "Terraform"
  }

  cpu_request    = "50m"
  memory_request = "64Mi"
  cpu_limit      = "250m"
  memory_limit   = "128Mi"

  min_scale = 1
  max_scale = 3
}

output "app_url" {
  value = rso_app.hello.url
}