Author a Custom Bundle
Replace the starter configuration on the demo controller with a Git-backed bundle.
Create the Bundle
Section titled “Create the Bundle”Add these files to a Git repository:
bundles/demo/├── bundle.yaml├── jenkins.yaml└── items.yamlbundle.yaml:
id: demoversion: "1"apiVersion: "2"jcasc: - jenkins.yamlitems: - items.yamljenkins.yaml:
jenkins: systemMessage: "Managed by Varroa: ${varroa_controller_name}"items.yaml:
items: - kind: pipeline name: hello definition: script: | pipeline { agent any stages { stage('Hello') { steps { echo 'hello from Varroa' } } } }Varroa resolves injected controller variables before applying the bundle. Any unresolved Varroa variable blocks provisioning. Jenkins secret-source expressions remain available for Jenkins to resolve.
Do not set jenkins.authorizationStrategy or unclassified.location.url. Varroa owns Jenkins authorization and derives the controller URL from routing configuration. Use version profiles for compatible Jenkins core and plugin versions.
Commit and push the files. Prefer an immutable tag or commit for production bundles.
Create a ComposedBundle
Section titled “Create a ComposedBundle”apiVersion: varroa.dev/v1alpha1kind: ComposedBundlemetadata: name: demo namespace: jenkins-demospec: inputs: - gitSource: repoURL: https://github.com/example/casc-bundles.git path: bundles/demo revision: mainkubectl apply -f composed-bundle.yamlkubectl get composedbundle demo -n jenkins-demo -wWait for status.phase to become Ready. A private Git repository requires gitSource.secretRef naming a Secret in jenkins-demo. See Bundle sources.
Each input must set exactly one of itemRef, gitSource, or ociSource. Inputs merge in order. The default jcascMergeStrategy rejects conflicting keys; set it to override only when later inputs should replace earlier values.
Attach the Bundle
Section titled “Attach the Bundle”kubectl patch controller demo -n jenkins-demo --type=merge \ -p '{"spec":{"composedBundleRef":{"name":"demo"}}}'kubectl get controller demo -n jenkins-demo -wReloadable JCasC and item changes apply through the mite. Plugin, image, and other restart-class changes can roll the Jenkins pod according to its reconciliation policy.
Verify that the controller returns to Connected, the system message names demo, and the hello pipeline runs. Item removal follows the bundle’s item removal strategy. See Managed items.
Continue with Composed bundles, Catalog items, or Plugin pinning.