ArenaTemplateSource CRD
EnterpriseThe 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: ArenaTemplateSourceShort name: ats (e.g. kubectl get ats).
Overview
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:
name: 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:
name: {{ .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
flowchart LR ATS[ArenaTemplateSource] --> Fetch --> Discover --> Ready["Templates ready"] Discover --> Meta["template.yaml metadata"]Related resources
Section titled “Related resources”- ArenaSource: For fetching PromptKit bundles (not templates)
- ArenaJob: Execute tests using Arena projects
- Project Editor: Create projects from templates