Overview
Templates define reusable multi-service deployment bundles with environment variables, resource limits, ingress configuration, and visibility scopes. They enable users to deploy complex applications with a single click.Template Structure
A template is defined using YAML and includes metadata, environment variables, services, and ingress configuration:Template Fields
Metadata
| Field | Type | Required | Description |
|---|---|---|---|
displayName | string | Yes | Human-readable template name |
description | string | Yes | Brief description of what the template deploys |
category | string | No | Template category (e.g., “AI & ML”, “Databases”) |
visibility | string | Yes | Access scope: private, team, or org |
Environment Variables
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Environment variable name |
description | string | No | Description shown to users |
required | boolean | No | Whether users must provide a value |
secret | boolean | No | Whether the value should be treated as sensitive |
defaultValue | string | No | Default value if not provided |
Environment variables marked as
secret: true are stored in Vault and never exposed in API responses.Services
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Service name (used as pod and service name) |
image | string | Yes | Container image (e.g., postgres:15) |
containerPort | number | Yes | Port the container listens on |
hasConfigMap | boolean | No | Whether to mount a ConfigMap for this service |
hasSecrets | boolean | No | Whether to inject secrets for this service |
resources.requests.cpu | string | No | CPU request (e.g., “500m”) |
resources.requests.memory | string | No | Memory request (e.g., “1Gi”) |
resources.limits.cpu | string | No | CPU limit |
resources.limits.memory | string | No | Memory limit |
Ingress
| Field | Type | Required | Description |
|---|---|---|---|
service | string | No | Service name to expose via ingress |
port | number | No | Service port to route traffic to |
If
ingress is not specified, the deployment will only be accessible within the cluster.Template Visibility
Visibility controls who can see and use templates:| Visibility | Created By | Visible To | Use Case |
|---|---|---|---|
private | Any user | Only creator | Personal experiments, drafts |
team | Team admin | All team members | Team-specific apps |
org | Org admin | All org members | Organization-wide standards |
| System | Platform | Everyone | Pre-built templates (e.g., WordPress, LibreChat) |
Private Templates
Created by individual users for personal use:- Any user with
developeror higher role can create - Only the creator can view, update, or delete
- Cannot be shared with other users
- Testing new deployment configurations
- Personal development environments
- Experimental setups
Team Templates
Shared across team members:- Only
team_admincan create - All team members can view and use
- Only creator and team admins can update/delete
- Project-specific deployment templates
- Team-standardized tech stacks
- Shared development environments
Organization Templates
Available to all organization members:- Only
org_adminororg_ownercan create - All org members can view and use
- Only creator and org admins can update/delete
- Company-wide infrastructure standards
- Approved technology stacks
- Compliance-vetted configurations
System Templates
Pre-installed templates provided by the platform: Permissions:- Only platform administrators can create
- Visible to all users across all organizations
- Cannot be modified by users (read-only)
- WordPress + MySQL
- LibreChat + MongoDB + Redis
- PostgreSQL + pgAdmin
- NGINX + PHP-FPM
Creating Templates
Via API
Via React UI
The React frontend provides a YAML editor with syntax validation:Using Templates
List Available Templates
Deploy from Template
Template Sync
Templates are stored in PostgreSQL and optionally synced to Kubernetes ConfigMaps for operator access.Database Storage
Templates are stored in thetemplates table:
ConfigMap Sync
Thetemplatesync package keeps ConfigMaps in sync with the database:
Example Templates
WordPress + MySQL
PostgreSQL + pgAdmin
Single-Service Application
Best Practices
Always Set Resource Limits
Define CPU and memory limits to prevent resource exhaustion and ensure fair scheduling.
Use Secrets for Sensitive Data
Mark sensitive environment variables as
secret: true to store them securely in Vault.Provide Clear Descriptions
Write helpful descriptions for environment variables to guide users during deployment.
Test Before Sharing
Create templates as
private first, test thoroughly, then change visibility to team or org.Use Categories
Organize templates with meaningful categories for easier discovery.
Version Your Images
Avoid using
latest tags in production templates. Pin specific versions.Troubleshooting
Template Not Visible
If you can’t see a template:- Check visibility: Only templates at your access level are shown
- Verify team membership: Team templates require team membership
- Check organization: Org templates are only visible within the org
Template Validation Errors
Common YAML errors:- Missing required fields (
displayName,description,services) - Invalid visibility value (must be
private,team, ororg) - Malformed YAML syntax (indentation, missing colons)
- Invalid resource format (e.g.,
cpu: 500instead ofcpu: "500m")
Deployment Fails After Template Update
If deployments fail after updating a template:- Templates are snapshots - existing deployments use the template version from creation time
- Update the deployment to pick up template changes
- Or delete and recreate the deployment
Related Documentation
API - Templates
Template management API reference
Secrets Management
Managing secrets in templates
Multi-Tenancy
Understanding visibility scopes
RBAC
Template creation permissions