Skip to content

ArenaSource CRD

The ArenaSource custom resource defines a source for fetching PromptKit bundles from external repositories. It supports Git repositories, OCI registries, and Kubernetes ConfigMaps as sources, enabling GitOps-friendly bundle management for Arena Fleet.

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

ArenaSource provides:

  • Multiple source types: Git, OCI registry, or ConfigMap
  • Automatic polling: Configurable interval for detecting changes
  • Revision tracking: Tracks source revisions for reproducibility
  • Artifact serving: Provides URLs for workers to download bundles

The source type for fetching PromptKit bundles.

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

The reconciliation interval for polling the source. Uses Go duration format.

FormatExampleDescription
Xm5mX minutes
Xh1hX hours
XmYs5m30sCombined duration
spec:
interval: 5m

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/prompt-library
ref:
branch: main
path: ./customer-support

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-prompts
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-prompts.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/prompts:v1.0.0
FormatExample
Tagoci://registry/repo:tag
Digestoci://registry/repo@sha256:abc123...
apiVersion: v1
kind: Secret
metadata:
name: registry-credentials
type: kubernetes.io/dockerconfigjson
stringData:
.dockerconfigjson: |
{
"auths": {
"ghcr.io": {
"username": "user",
"password": "token"
}
}
}
---
spec:
oci:
url: oci://ghcr.io/acme/prompts:latest
secretRef:
name: registry-credentials

Configuration for ConfigMap sources. Required when type: configmap.

FieldTypeRequiredDefaultDescription
namestringYes-ConfigMap name
keystringNopack.jsonKey containing the bundle
spec:
type: configmap
configMap:
name: my-prompts
key: pack.json

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
ReadySuccessfully fetched and artifact available
ErrorFetch failed

Information about the last successfully fetched artifact.

FieldDescription
revisionSource revision identifier
urlDownload URL for workers
checksumSHA256 checksum
sizeArtifact size in bytes
lastUpdateTimeWhen artifact was last updated
TypeDescription
ReadyOverall readiness of the source
FetchingCurrently fetching from source
ArtifactAvailableArtifact is available for download

Timestamp of the last fetch attempt.

Scheduled time for the next fetch.

apiVersion: omnia.altairalabs.ai/v1alpha1
kind: ArenaSource
metadata:
name: customer-support-prompts
namespace: arena
spec:
type: git
interval: 5m
git:
url: https://github.com/acme/prompt-library
ref:
branch: main
path: ./customer-support
status:
phase: Ready
artifact:
revision: main@sha1:abc123def456
url: http://source-controller/artifacts/abc123.tar.gz
checksum: sha256:789xyz...
size: 12345
lastUpdateTime: "2025-01-16T10:00:00Z"
apiVersion: omnia.altairalabs.ai/v1alpha1
kind: ArenaSource
metadata:
name: production-prompts
namespace: arena
spec:
type: oci
interval: 1h
oci:
url: oci://ghcr.io/acme/prompts:v2.0.0
secretRef:
name: ghcr-credentials
status:
phase: Ready
artifact:
revision: v2.0.0@sha256:abc123...
url: http://source-controller/artifacts/v2.0.0.tar.gz
apiVersion: v1
kind: ConfigMap
metadata:
name: test-prompts
namespace: arena
data:
pack.json: |
{
"$schema": "https://promptpack.org/schema/latest/promptpack.schema.json",
"id": "test-prompts",
"name": "Test Prompts",
"version": "1.0.0",
"prompts": {
"default": {
"id": "default",
"name": "Test",
"version": "1.0.0",
"system_template": "You are a helpful assistant."
}
}
}
---
apiVersion: omnia.altairalabs.ai/v1alpha1
kind: ArenaSource
metadata:
name: test-prompts
namespace: arena
spec:
type: configmap
interval: 1m
configMap:
name: test-prompts
status:
phase: Ready
artifact:
revision: "12345" # ConfigMap resourceVersion
url: http://source-controller/artifacts/test-prompts.tar.gz

The revision field format varies by source type:

Source TypeFormatExample
Git (branch)branch@sha1:commitmain@sha1:abc123
Git (tag)tag@sha1:commitv1.0.0@sha1:abc123
OCI (tag)tag@sha256:digestv1.0.0@sha256:abc123
OCI (digest)@sha256:digest@sha256:abc123
ConfigMapresourceVersion12345
  • ArenaConfig: Defines test configuration using sources
  • ArenaJob: Executes tests using configurations