Skip to content

Architecture Overview

Varroa manages Jenkins controllers as Kubernetes resources. One namespaced Controller creates one Jenkins StatefulSet, Service, persistent volume, mite sidecar, and optional Ingress.

flowchart LR
    U[User or API client] --> F[Dashboard]
    F --> B[BFF API]
    B <--> N[(NATS JetStream)]
    O[Operator] <--> N
    G[Gateway] <--> N
    O --> K[Kubernetes API]
    K --> P[Jenkins pod]
    P --> J[Jenkins]
    P --> M[mite]
    M <-->|gRPC mTLS| G
    M -->|localhost| J
ComponentFunction
OperatorProvisions Jenkins resources.
GatewayTerminates mite mTLS.
BFFServes APIs and activity.
DashboardProvides the browser client.
NATS JetStreamCarries messages and shared state.
miteObserves and configures Jenkins.
DexBrokers identity into OIDC.
Update centerServes pinned plugins.

Only the dashboard, BFF, and Jenkins routes need external HTTP access. The gateway remains a cluster-internal Service. The mite initiates its connection, so the control plane does not require inbound access to Jenkins.

Varroa resolves a controller from installation defaults, an optional ControllerClass, and the Controller spec. The controller spec has the highest precedence.

Jenkins configuration comes from a ComposedBundle. Its ordered inputs can reference catalog items, Git repositories, or OCI artifacts. An omitted spec.composedBundleRef selects the built-in varroa-starter bundle. A JenkinsVersionProfile supplies the compatible plugin set and any version-specific JCasC overlay. JenkinsRole and JenkinsRoleBinding resources define Jenkins authorization.

See Composed bundles, Jenkins versions, and Jenkins RBAC.

Read status.phase and status.conditions when operating a controller.

PhaseMeaning
PendingWaiting for reconciliation.
ProvisioningResolving configuration or creating Kubernetes resources.
RunningJenkins is running, but the mite stream is not ready.
ConnectedThe mite stream is active. This is the normal steady state.
Stoppedspec.powerState: Stopped scaled the StatefulSet to zero.
HibernatedInactivity policy parked the controller.
FailedA blocking provisioning or operation error occurred.

Reloadable configuration can apply without replacing the pod. Changes to plugins, images, or other restart-class settings can return the controller to Provisioning while Varroa rolls it.

Terminal window
kubectl get controller <name> -n <namespace>
kubectl describe controller <name> -n <namespace>

Use Troubleshooting when a controller does not reach Connected.

All resources use varroa.dev/v1alpha1.

ResourceScopePurpose
ControllerNamespacedDeclares one Jenkins controller.
ComposedBundle, CatalogSource, CatalogItemNamespacedSupply Jenkins configuration.
PodTemplateNamespacedDefines reusable Kubernetes agents.
ProvisioningDefaults, ControllerClassClusterSupply reusable controller defaults.
JenkinsVersionProfileClusterPins Jenkins and plugin compatibility.
VarroaRole, VarroaRoleBindingClusterAuthorize dashboard and API actions.
JenkinsRole, JenkinsRoleBindingClusterAuthorize actions inside Jenkins.
UpdateCenterClusterDeclares the optional plugin service.

Continue with The mite, Scaling, or Your first controller.