A declarative deployment configuration system for managing workloads across multiple environments and regions.
Leap Deploy provides a JSON schema-based configuration format that allows you to define deployment specifications for your applications in a structured, validated way. The schema supports:
- Multiple workload kinds (APIs, workers)
- Environment-specific overrides
- Region-specific configurations
- Resource management (CPU, memory)
- Autoscaling configuration
- Container image specifications
- Ingress routing
To enable IDE autocomplete, validation, and documentation while editing your configuration files, reference the schema using one of the following methods:
Add a $schema property at the top of your leap-deploy.json:
{
"$schema": "https://github.com/workleap/wl-leap-deploy/releases/latest/download/leap-deploy.v1.schema.json",
"version": "1.0.0",
"id": "my-application",
"workloads": {
"api-service": {
"kind": "api",
"replicas": 3,
"image": {
"registry": "myregistry.azurecr.io",
"repository": "my-app/api",
"tag": "1.2.3"
},
"ingress": {
"pathPrefix": "/api",
"fqdn": "api.example.com"
}
}
}
}Add a YAML language server directive as the first line of your leap-deploy.yaml:
# yaml-language-server: $schema=https://github.com/workleap/wl-leap-deploy/releases/latest/download/leap-deploy.v1.schema.json
version: "1.0.0"
id: my-application
workloads:
api-service:
kind: api
replicas: 3
image:
registry: myregistry.azurecr.io
repository: my-app/api
tag: 1.2.3
ingress:
pathPrefix: /api
fqdn: api.example.com- JSON: Automatically recognizes the
$schemaproperty (no setup needed) - YAML: Install the YAML extension by Red Hat
- JSON: Automatically recognizes the
$schemaproperty (no setup needed) - YAML: Recognizes the
# yaml-language-server: $schema=directive automatically
You can also configure schema mappings in your workspace settings (VS Code .vscode/settings.json):
{
"json.schemas": [
{
"fileMatch": ["**/leap-deploy.json"],
"url": "https://github.com/workleap/wl-leap-deploy/releases/latest/download/leap-deploy.v1.schema.json"
}
],
"yaml.schemas": {
"https://github.com/workleap/wl-leap-deploy/releases/latest/download/leap-deploy.v1.schema.json": "**/leap-deploy.yaml"
}
}Every configuration file must include:
version: Schema version (optional, e.g.,"0","0.1","0.1.0")id: Unique identifier for the deployment configurationworkloads: Map of workload names to their configurations
Each workload supports:
workload-name:
kind: api | worker # Required: workload kind
replicas: 3 # Number of replicas
annotations: {} # Kubernetes annotations
labels: {} # Kubernetes labels
image: # Container image configuration
registry: myregistry.azurecr.io
repository: my-app/service
tag: 1.2.3
resources: # Resource requests
requests:
cpu: "500m"
memory: "512Mi"
autoscaling: # Autoscaling configuration
horizontal:
enabled: true
minReplicas: 2
maxReplicas: 10
vertical:
enabled: false
ingress: # Ingress configuration (for APIs)
pathPrefix: /api
fqdn: api.example.com
regions: # Region-specific overrides
na:
replicas: 5
ingress:
fqdn: api-na.example.com
eu:
replicas: 3
ingress:
fqdn: api-eu.example.com
environments: # Environment-specific overrides
dev:
replicas: 1
prod:
replicas: 5This repository provides several reusable GitHub Actions for working with leap-deploy.yaml files:
- validate - Validates
leap-deploy.yamlagainst the predefined schema to ensure correctness - fold-config - Folds configuration by merging workload configs for a specific environment and region
See ./schemas/v0/examples/leap-deploy.yaml for complete configuration examples.
This project uses semantic versioning for schemas. Schema files are organized in the schemas/ directory:
- v1.x.x: Current stable version (
schemas/v1/)- Schema URL:
https://github.com/workleap/wl-leap-deploy/releases/latest/download/leap-deploy.v1.schema.json - All v1.x.x versions are backward compatible with v1.0.0
- Schema URL:
When v2 is released, the schema will be in schemas/v2/ and accessible via:
https://github.com/workleap/wl-leap-deploy/releases/latest/download/leap-deploy.v2.schema.json
See CONTRIBUTING.md for development guidelines and versioning strategy.
This project is licensed under the terms of the Apache License 2.0. See the LICENSE file for details.