Skip to content

Compose controller bundles

A ComposedBundle merges catalog items, Git bundles, and OCI bundles in a defined order.

apiVersion: varroa.dev/v1alpha1
kind: ComposedBundle
metadata:
name: platform-baseline
namespace: teams-platform
spec:
inputs:
- itemRef:
name: standard-theme
variables:
organization: example
- gitSource:
repoURL: https://github.com/example/casc-bundles.git
path: bundles/team-platform
revision: main
- ociSource:
ref: ghcr.io/varroaci/casc-bundles:v1
variables:
timezone: UTC
jcascMergeStrategy: errorOnConflict

Each input sets exactly one of itemRef, gitSource, or ociSource. Inputs merge from top to bottom. errorOnConflict rejects conflicting scalar JCasC values. override lets a later input replace an earlier value.

Attach the bundle:

spec:
composedBundleRef:
name: platform-baseline

An omitted namespace means the controller namespace. A controller with no reference uses the built-in varroa-starter bundle. An explicit reference replaces that bundle.

spec.variables applies across the composition. Variables on an itemRef take precedence. Varroa also supplies:

VariableValue
varroa_controller_nameController name
varroa_controller_namespaceController namespace
varroa_controller_endpointIn-cluster Jenkins URL
varroa_controller_external_urlExternal Jenkins URL
varroa_controller_path_prefixPath ingress prefix or empty string
varroa_frontend_urlDashboard URL
varroa_oidc_issuerConfigured OIDC issuer
varroa_oidc_client_idConfigured OIDC client ID
varroa_login_urlConfigured login URL

Unresolved required variables prevent a controller from applying the new content. The last valid configuration remains active.

- itemRef:
name: standard-theme
pinnedContentHash: <sha256>

When the catalog item changes, the composed bundle enters Drifted until the pin is updated. Unpinned items track current catalog content.

Status fieldUse
phasePending, Ready, Drifted, or Invalid
resolvedHashDigest of merged unresolved content
contentRefConfigMap containing that content
observedRevisionsResolved item hashes, Git commits, and OCI digests
missingItems, errors, warningsResolution and validation findings

Pause dependent controller rollout during review:

Terminal window
kubectl annotate composedbundle platform-baseline -n teams-platform \
varroa.dev/rollout-paused=true

Remove the annotation to resume. See rollout waves for staged application.

SymptomCheck
Merge conflictInput order or deliberate override strategy
Missing itemstatus.missingItems and namespace resolution
Ready bundle is not appliedVariables, rollout pause, waves, and reconciliation mode
Authorization content disappearsConfigure Jenkins RBAC