Skip to content

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.

apiVersion: omnia.altairalabs.ai/v1alpha1
kind: ArenaTemplateSource

ArenaTemplateSource provides:

  • Multiple source types: Git, OCI registry, or ConfigMap
  • Automatic template discovery: Scans for template.yaml metadata files
  • Variable support: Define configurable parameters for each template
  • Periodic sync: Automatically fetches updates at configured intervals

The source type for fetching templates.

ValueDescriptionUse Case
gitGit repositoryVersion-controlled templates
ociOCI registryContainer registry storage
configmapKubernetes ConfigMapSimple in-cluster storage
spec:
type: git

The interval between sync operations. Uses Go duration format. Default: 1h.

FormatExampleDescription
Xm5mX minutes
Xh1hX hours
XmYs5m30sCombined duration
spec:
syncInterval: 30m

The path within the source where templates are located. Default: templates/.

spec:
templatesPath: my-templates/

Configuration for Git repository sources. Required when type: git.

FieldTypeRequiredDescription
urlstringYesRepository URL (https:// or ssh://)
ref.branchstringNoBranch to checkout
ref.tagstringNoTag to checkout
ref.commitstringNoSpecific commit SHA
pathstringNoPath within repository (default: root)
secretRefobjectNoCredentials for private repos
spec:
type: git
git:
url: https://github.com/acme/arena-templates
ref:
branch: main

For private repositories, reference a Secret containing credentials:

HTTPS Authentication:

apiVersion: v1
kind: Secret
metadata:
name: git-credentials
stringData:
username: git-user
password: ghp_xxxxxxxxxxxx # GitHub PAT or password
---
spec:
git:
url: https://github.com/acme/private-templates
secretRef:
name: git-credentials

SSH Authentication:

apiVersion: v1
kind: Secret
metadata:
name: git-ssh-credentials
stringData:
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-credentials

Configuration for OCI registry sources. Required when type: oci.

FieldTypeRequiredDescription
urlstringYesOCI artifact URL
secretRefobjectNoRegistry credentials
insecurebooleanNoAllow insecure connections (default: false)
spec:
type: oci
oci:
url: oci://ghcr.io/acme/templates:v1.0.0

Configuration for ConfigMap sources. Required when type: configmap.

FieldTypeRequiredDescription
namestringYesConfigMap name
spec:
type: configmap
configMap:
name: my-templates

When true, prevents the source from being reconciled. Useful for maintenance.

spec:
suspend: true

Timeout for fetch operations. Default: 60s.

spec:
timeout: 120s
ValueDescription
PendingSource has not been fetched yet
FetchingCurrently fetching from source
ScanningTemplates are being discovered
ReadySuccessfully fetched and templates discovered
ErrorFetch or discovery failed

Number of templates discovered in the source.

The current commit SHA or revision hash.

Information about the fetched content.

FieldDescription
contentPathPath where content is stored
revisionSource revision identifier
lastUpdateTimeWhen artifact was last updated
TypeDescription
ReadyOverall readiness of the source
FetchingCurrently fetching from source
TemplatesDiscoveredTemplates have been discovered

Timestamp of the last fetch attempt.

Scheduled time for the next fetch.

Each template within the source must have a template.yaml file defining its metadata:

# template.yaml
name: basic-chatbot
version: 1.0.0
displayName: Basic Chatbot
description: A simple conversational chatbot using PromptKit
category: chatbot
tags:
- 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: false
TypeDescriptionValidation Fields
stringText valuepattern (regex)
numberNumeric valuemin, max
booleanTrue/false-
enumPredefined optionsoptions (required)

Variables use Go template syntax in template files:

# arena.config.yaml
name: {{ .agentName }}
provider:
type: {{ .provider }}
temperature: {{ .temperature }}

For more information on PromptKit project structure, see the PromptKit documentation.

apiVersion: omnia.altairalabs.ai/v1alpha1
kind: ArenaTemplateSource
metadata:
name: company-templates
namespace: workspace-ns
spec:
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"

Omnia ships with a built-in community templates source:

apiVersion: omnia.altairalabs.ai/v1alpha1
kind: ArenaTemplateSource
metadata:
name: community-templates
namespace: workspace-ns
spec:
type: git
syncInterval: 1h
git:
url: https://github.com/AltairaLabs/arena-templates
ref:
branch: main

This is automatically created when enterprise.communityTemplates.enabled=true in your Helm values.

apiVersion: v1
kind: Secret
metadata:
name: private-repo-creds
namespace: workspace-ns
stringData:
username: deploy-bot
password: ghp_xxxxxxxxxxxx
---
apiVersion: omnia.altairalabs.ai/v1alpha1
kind: ArenaTemplateSource
metadata:
name: private-templates
namespace: workspace-ns
spec:
type: git
syncInterval: 15m
git:
url: https://github.com/acme/private-templates
ref:
tag: v2.0.0
secretRef:
name: private-repo-creds
  1. Create ArenaTemplateSource - Define the source location
  2. Controller fetches content - Source is cloned/downloaded
  3. Templates discovered - Controller scans for template.yaml files
  4. Templates available - Browse and use templates in the Project Editor
ArenaTemplateSource ──▶ Fetch ──▶ Discover ──▶ Templates Ready
└──▶ template.yaml metadata