ArenaTemplateSource CRD
The ArenaTemplateSource custom resource defines a source for discovering and fetching project templates. Templates are PromptKit projects that can be customized with variables and rendered to create new Arena projects.
API Version
Section titled “API Version”apiVersion: omnia.altairalabs.ai/v1alpha1kind: ArenaTemplateSourceOverview
Section titled “Overview”ArenaTemplateSource provides:
- Multiple source types: Git, OCI registry, or ConfigMap
- Automatic template discovery: Scans for
template.yamlmetadata files - Variable support: Define configurable parameters for each template
- Periodic sync: Automatically fetches updates at configured intervals
Spec Fields
Section titled “Spec Fields”The source type for fetching templates.
| Value | Description | Use Case |
|---|---|---|
git | Git repository | Version-controlled templates |
oci | OCI registry | Container registry storage |
configmap | Kubernetes ConfigMap | Simple in-cluster storage |
spec: type: gitsyncInterval
Section titled “syncInterval”The interval between sync operations. Uses Go duration format. Default: 1h.
| Format | Example | Description |
|---|---|---|
Xm | 5m | X minutes |
Xh | 1h | X hours |
XmYs | 5m30s | Combined duration |
spec: syncInterval: 30mtemplatesPath
Section titled “templatesPath”The path within the source where templates are located. Default: templates/.
spec: templatesPath: my-templates/Configuration for Git repository sources. Required when type: git.
| Field | Type | Required | Description |
|---|---|---|---|
url | string | Yes | Repository URL (https:// or ssh://) |
ref.branch | string | No | Branch to checkout |
ref.tag | string | No | Tag to checkout |
ref.commit | string | No | Specific commit SHA |
path | string | No | Path within repository (default: root) |
secretRef | object | No | Credentials for private repos |
spec: type: git git: url: https://github.com/acme/arena-templates ref: branch: mainGit Authentication
Section titled “Git Authentication”For private repositories, reference a Secret containing credentials:
HTTPS Authentication:
apiVersion: v1kind: Secretmetadata: name: git-credentialsstringData: username: git-user password: ghp_xxxxxxxxxxxx # GitHub PAT or password---spec: git: url: https://github.com/acme/private-templates secretRef: name: git-credentialsSSH Authentication:
apiVersion: v1kind: Secretmetadata: name: git-ssh-credentialsstringData: identity: | -----BEGIN OPENSSH PRIVATE KEY----- ... -----END OPENSSH PRIVATE KEY----- known_hosts: | github.com ssh-rsa AAAAB3NzaC1yc2...---spec: git: url: ssh://git@github.com/acme/private-templates.git secretRef: name: git-ssh-credentialsConfiguration for OCI registry sources. Required when type: oci.
| Field | Type | Required | Description |
|---|---|---|---|
url | string | Yes | OCI artifact URL |
secretRef | object | No | Registry credentials |
insecure | boolean | No | Allow insecure connections (default: false) |
spec: type: oci oci: url: oci://ghcr.io/acme/templates:v1.0.0configMap
Section titled “configMap”Configuration for ConfigMap sources. Required when type: configmap.
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | ConfigMap name |
spec: type: configmap configMap: name: my-templatessuspend
Section titled “suspend”When true, prevents the source from being reconciled. Useful for maintenance.
spec: suspend: truetimeout
Section titled “timeout”Timeout for fetch operations. Default: 60s.
spec: timeout: 120sStatus Fields
Section titled “Status Fields”| Value | Description |
|---|---|
Pending | Source has not been fetched yet |
Fetching | Currently fetching from source |
Scanning | Templates are being discovered |
Ready | Successfully fetched and templates discovered |
Error | Fetch or discovery failed |
templateCount
Section titled “templateCount”Number of templates discovered in the source.
headVersion
Section titled “headVersion”The current commit SHA or revision hash.
artifact
Section titled “artifact”Information about the fetched content.
| Field | Description |
|---|---|
contentPath | Path where content is stored |
revision | Source revision identifier |
lastUpdateTime | When artifact was last updated |
conditions
Section titled “conditions”| Type | Description |
|---|---|
Ready | Overall readiness of the source |
Fetching | Currently fetching from source |
TemplatesDiscovered | Templates have been discovered |
lastFetchTime
Section titled “lastFetchTime”Timestamp of the last fetch attempt.
nextFetchTime
Section titled “nextFetchTime”Scheduled time for the next fetch.
Template Structure
Section titled “Template Structure”Each template within the source must have a template.yaml file defining its metadata:
# template.yamlname: basic-chatbotversion: 1.0.0displayName: Basic Chatbotdescription: A simple conversational chatbot using PromptKitcategory: chatbottags: - beginner - conversation
variables: - name: agentName type: string description: Name of the agent required: true default: "Assistant"
- name: temperature type: number description: Model temperature (0.0-1.0) default: "0.7" min: "0" max: "1"
- name: provider type: enum description: LLM provider to use options: - openai - anthropic - ollama default: openai
files: - path: prompts/ render: true - path: arena.config.yaml render: true - path: static/ render: falseVariable Types
Section titled “Variable Types”| Type | Description | Validation Fields |
|---|---|---|
string | Text value | pattern (regex) |
number | Numeric value | min, max |
boolean | True/false | - |
enum | Predefined options | options (required) |
Variables use Go template syntax in template files:
# arena.config.yamlname: {{ .agentName }}provider: type: {{ .provider }} temperature: {{ .temperature }}For more information on PromptKit project structure, see the PromptKit documentation.
Complete Examples
Section titled “Complete Examples”Git Repository Source
Section titled “Git Repository Source”apiVersion: omnia.altairalabs.ai/v1alpha1kind: ArenaTemplateSourcemetadata: name: company-templates namespace: workspace-nsspec: type: git syncInterval: 30m templatesPath: templates/
git: url: https://github.com/acme/arena-templates ref: branch: main
status: phase: Ready templateCount: 5 headVersion: abc123def456 artifact: contentPath: "arena/template-content/company-templates" revision: main@sha1:abc123def456 lastUpdateTime: "2025-01-16T10:00:00Z"Community Templates
Section titled “Community Templates”Omnia ships with a built-in community templates source:
apiVersion: omnia.altairalabs.ai/v1alpha1kind: ArenaTemplateSourcemetadata: name: community-templates namespace: workspace-nsspec: type: git syncInterval: 1h
git: url: https://github.com/AltairaLabs/arena-templates ref: branch: mainThis is automatically created when enterprise.communityTemplates.enabled=true in your Helm values.
Private Repository with Credentials
Section titled “Private Repository with Credentials”apiVersion: v1kind: Secretmetadata: name: private-repo-creds namespace: workspace-nsstringData: username: deploy-bot password: ghp_xxxxxxxxxxxx---apiVersion: omnia.altairalabs.ai/v1alpha1kind: ArenaTemplateSourcemetadata: name: private-templates namespace: workspace-nsspec: type: git syncInterval: 15m
git: url: https://github.com/acme/private-templates ref: tag: v2.0.0 secretRef: name: private-repo-credsWorkflow
Section titled “Workflow”- Create ArenaTemplateSource - Define the source location
- Controller fetches content - Source is cloned/downloaded
- Templates discovered - Controller scans for
template.yamlfiles - Templates available - Browse and use templates in the Project Editor
ArenaTemplateSource ──▶ Fetch ──▶ Discover ──▶ Templates Ready │ └──▶ template.yaml metadataRelated Resources
Section titled “Related Resources”- ArenaSource: For fetching PromptKit bundles (not templates)
- ArenaJob: Execute tests using Arena projects
- Project Editor: Create projects from templates