Create a template source
EnterpriseCreate an ArenaTemplateSource so the dashboard’s New project gallery has templates to list. See Arena templates for how the controller discovers templates inside the source.
Prerequisites
Section titled “Prerequisites”- Enterprise features enabled (
enterprise.enabled=true, which defaults tofalse). - Workspace content storage, which the chart always configures. An
arena-controller started without
--workspace-content-pathputs every source inphase: Error, and it never syncs. - A workspace namespace to put the source in. A template source belongs to one workspace, and the gallery lists only the current workspace’s sources.
- For a private repository: the credentials to give it.
Create a source for a public repository
Section titled “Create a source for a public repository”-
Save the manifest, replacing the namespace and URL with your own (the values shown are illustrative):
apiVersion: omnia.altairalabs.ai/v1alpha1kind: ArenaTemplateSourcemetadata:name: company-templatesnamespace: workspace-nsspec:type: gitsyncInterval: 30mtemplatesPath: templates/git:url: https://github.com/acme/arena-templatesref:branch: mainrefacceptsbranch,tagorcommit.syncIntervaldefaults to1handtemplatesPathtotemplates/. -
Apply it:
Terminal window kubectl apply -f company-templates.yaml
For oci and configmap sources, see the
ArenaTemplateSource reference.
Git authentication
Section titled “Git authentication”For a private repository, put the credentials in a Secret in the source’s
namespace and reference it from spec.git.secretRef. To fetch through a
Connection instead, use spec.git.connectionRef; see the
reference for its rules.
-
Create the Secret. For HTTPS, use
usernameandpasswordkeys (the token below is a placeholder):apiVersion: v1kind: Secretmetadata:name: git-credentialsnamespace: workspace-nsstringData:username: git-userpassword: <personal-access-token>For SSH, use
identityandknown_hostskeys:apiVersion: v1kind: Secretmetadata:name: git-ssh-credentialsnamespace: workspace-nsstringData:identity: |-----BEGIN OPENSSH PRIVATE KEY-----...-----END OPENSSH PRIVATE KEY-----known_hosts: |github.com ssh-rsa AAAAB3NzaC1yc2... -
Reference it from the source. For an SSH Secret, use an
ssh://URL:spec:git:url: https://github.com/acme/private-templatesref:tag: v2.0.0secretRef:name: git-credentials
Variable syntax
Section titled “Variable syntax”Template files use Go template syntax to reference the variables declared in
template.yaml:
name: {{ .agentName }}provider: type: {{ .provider }} temperature: {{ .temperature }}Only files marked render: true are rendered. See the
template.yaml format
for the variable types.
Add the community templates to another workspace
Section titled “Add the community templates to another workspace”With enterprise.enabled=true and defaultWorkspace.enabled=true, the
operator installs a community templates source in the default workspace, in its
omnia-resources release. Set
enterprise.communityTemplates.enabled=false for an air-gapped cluster. Its
name, URL, branch, templatesPath, syncInterval and timeout come from
enterprise.communityTemplates.*.
Any other workspace that wants the community templates needs this resource in its own namespace:
apiVersion: omnia.altairalabs.ai/v1alpha1kind: ArenaTemplateSourcemetadata: name: community-templates namespace: workspace-nsspec: type: git git: url: https://github.com/AltairaLabs/promptkit-templates.git ref: branch: main templatesPath: "" syncInterval: 1h timeout: 2mVerify
Section titled “Verify”-
List the sources in the namespace:
Terminal window kubectl get arenatemplatesource -n workspace-nsPHASEshowsReadyandTEMPLATESshows a number greater than zero once the source has fetched and found at least onetemplate.yaml. -
Open the dashboard’s New project page. The gallery lists the templates under “Start something new”. The gallery reads only sources in
Ready.
Troubleshooting
Section titled “Troubleshooting”The phase is Error
Section titled “The phase is Error”Read the cause:
kubectl get arenatemplatesource company-templates -n workspace-ns -o jsonpath='{.status.message}'A missing Secret, wrong credentials or an unreachable URL all appear here.
Confirm the Secret is in the source’s namespace and has the keys the auth
method needs. When workspace content storage is disabled, status.message is
empty; read the message on the Ready condition instead.
The phase is Ready but TEMPLATES is 0
Section titled “The phase is Ready but TEMPLATES is 0”Either no template.yaml sits under templatesPath, or each one is missing
metadata.name, which makes the controller skip it. When templatesPath is
left at its default and no templates/ directory exists, the controller scans
from the source root, so templates kept elsewhere are not found. Check the path
against the repository layout.
A templatesPath you set that does not exist in the source is an error: the
phase is Error and status.message reads templatesPath "<path>" not found in source.
A change in the repository does not show up
Section titled “A change in the repository does not show up”The controller checks for a new revision every syncInterval. Wait for the
interval, or lower it.
Related pages
Section titled “Related pages”- Arena templates — discovery and rendering
- ArenaTemplateSource reference
- Use the Arena project editor — working in a project once it exists