GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Caproni
  • Getting started
  • For GitLab
  • Source
  • Edit this page →

This view

  • Original page
  • New address

GeezerVison is showing gitlab-org.gitlab.io — Configuration reference

Configuration reference

Configuration reference

This guide describes the v2 configuration format for Caproni.

Configuration File Structure

Caproni uses a YAML configuration file (default: caproni.yaml) with the following top-level sections:

version: 2 # Required: Configuration format version
cluster: # Required: Cluster driver and resource settings
repositories: # Optional: Git repositories containing source code
deployers: # Optional: Applications to deploy to the cluster
reloaders: # Optional: Local development processes with hot-reload

Version Field

version: 2

The version field is required and specifies the configuration format version. The only supported version is 2; a configuration without a version field, or declaring any other version, fails to load.

Cluster Configuration

The cluster section defines the Kubernetes cluster settings:

cluster:
  driver: auto # Options: auto, colima, k3d, external
  network:
    hostname: gitlab.test # Primary hostname for accessing GitLab
    additional_hostnames: # Additional hostnames (optional)
      - registry.gitlab.test
      - pages.gitlab.test
  colima: # Used when driver is colima (or auto on macOS)
    memory: 8GiB
    cores: 4
  k3d: # Used when driver is k3d (or auto on Linux)
    agents: 0
    servers: 1

Network Configuration

  • hostname: The primary hostname for accessing the cluster. Default: gitlab.test
  • additional_hostnames: List of additional hostnames to configure for multi-domain setups
  • cluster_domain: The cluster DNS domain. The k3d, colima, and vcluster drivers create the cluster with it; for an external cluster it declares what the cluster serves. When the key is unset, caproni up, deploy, run, and ca read the domain from the running cluster instead. The value is exposed as ${CAPRONI_CLUSTER_DOMAIN}, and the dev CA covers names such as web.gitlab.svc.corp.example. A key that names a zone the cluster does not serve fails caproni up. Changing it does not alter a running cluster. See examples/cluster-domain.yaml.

To update /etc/hosts with cluster hostnames, use:

caproni update-etc-hosts

With the k3d driver, the same hostnames also resolve inside the cluster: caproni writes a CoreDNS rewrite pointing them at the k3s Traefik service as a coredns-custom ConfigMap in kube-system, under the key caproni-hostnames.override. A rig can still apply its own coredns-custom with other keys, as long as it merges into the ConfigMap (for example kubectl apply). Replacing the object, deleting it on undeploy, or installing it through a Helm release (which can’t adopt an existing object) breaks this; restarting the cluster restores the key. The manifest is updated when the hostnames change on caproni up, and CoreDNS picks the change up within a minute or two without recreating the cluster. Clusters created before this was added need one caproni destroy && caproni up. This is not applied when cluster.k3d.k3s.disable includes traefik.

Dynamic hostnames

Hostnames can be dynamic by using the CAPRONI_CLUSTER_NAME dynamic value.

cluster:
  network:
    hostname: gitlab.$CAPRONI_CLUSTER_NAME.test
    additional_hostnames:
      - registry.$CAPRONI_CLUSTER_NAME.test
      - pages.$CAPRONI_CLUSTER_NAME.test

Cluster naming

The name section controls how the cluster profile name is generated. When omitted, the cluster is always named caproni (the static strategy).

Static (default)

cluster:
  name:
    strategy: static

The static strategy always uses caproni as the cluster name.

Directory hash

cluster:
  name:
    strategy: directory-hash

Generates a deterministic name based on the directory containing caproni.yaml, following the pattern caproni-<dirname>-<hash>. For example, if your config is in /home/user/demo/caproni.yaml, the cluster name will be caproni-demo-9fd39f.

This is useful when running multiple Caproni instances from different directories on the same machine, such as for using git-worktree. The directory name is coerced to be RFC 1123-compliant (lowercase alphanumeric and hyphens, max 32 characters).

Driver-Specific Settings

Auto (recommended)

Use driver: auto to let Caproni pick the right driver for your OS: colima on macOS, k3d on Linux. Always provide both config sections so the config works on either platform:

cluster:
  driver: auto
  colima: # Used on macOS
    memory: 8GiB
    cores: 4
  k3d: # Used on Linux
    agents: 0
    servers: 1

Colima

cluster:
  driver: colima
  colima:
    memory: 8GiB # Memory allocated to the VM
    cores: 4 # CPU cores allocated to the VM
    disk: 60GiB # Optional: VM disk size, rounded to the nearest GiB
    # k3s:                   # Optional: k3s settings for the VM's cluster
    #   disable: [traefik]   #   packaged components k3s must not deploy

VM disk sizing:

Use disk if colima’s default disk space is too low or high for your endeavour. This is useful when spinning up multiple GitLab instances at the same time.

Changing memory, cores, or disk on an existing VM:

Colima applies memory, cores, and a larger disk when it boots a stopped VM, so the values take effect on the next caproni down && caproni up. caproni up compares them after the VM is up and fails with that hint when the VM has less than the configuration asks for; a VM with more is fine, and colima cannot shrink a disk. All three are read from colima list. Colima records a requested shrink it cannot perform, so after you lower disk the reported size may be below the real one; raising it again then reports a difference that the next restart clears. caproni doctor reports the same differences as warnings, for a stopped VM too.

Container runtime:

Caproni always starts the colima VM on the containerd runtime (rather than colima’s default docker runtime). This keeps the registry-mirror configuration surface uniform — containerd reads per-host rules from /etc/containerd/certs.d/<host>/hosts.toml, which covers every upstream registry, whereas dockerd’s registry-mirrors knob only covers Docker Hub.

The trade-off: docker context use colima-caproni no longer works for plain docker build / docker run against the caproni VM. Use nerdctl (containerd’s docker-compatible CLI), or a separate colima profile, if you need a docker CLI in this VM. Host Docker Desktop and other colima profiles are unaffected.

If you have an existing caproni-managed colima profile created on the docker runtime, caproni up fails before it boots the VM with an error pointing at caproni destroy && caproni up — colima cannot switch the runtime of an existing profile, so the VM must be recreated.

Traefik:

The VM runs k3s, which includes Traefik as its default ingress controller. Colima turns that Traefik off by default; Caproni turns it back on, so the cluster you get has an ingress controller without you declaring one.

To run your own ingress controller instead, disable k3s’s:

cluster:
  driver: colima
  colima:
    memory: 8GiB
    cores: 4
    k3s:
      disable: [traefik]

Caproni installs no ingress controller of its own, so a cluster configured this way has none until you declare one as a deployer. See examples/own-infrastructure.yaml. The list accepts the same components as k3d: coredns, gateway-api-crd, local-storage, metrics-server, servicelb, and traefik. Values must be literal: variable references are not expanded there, because the list names a closed set the schema validates against.

The list becomes a colima start argument, so it applies when colima provisions the VM. Adding or removing an entry for an existing VM takes caproni destroy && caproni up.

k3d

cluster:
  driver: k3d
  k3d:
    agents: 2 # Number of agent nodes (default: 0)
    servers: 1 # Number of server nodes (default: 1)
    # image: rancher/k3s:v1.27.4-k3s1  # Optional: specific k3s version
    # port_mappings:                   # Optional: host-to-cluster port mappings
    #   - "80:80@loadbalancer"         # Default if not specified
    #   - "443:443@loadbalancer"       # Default if not specified
    # k3s:                             # Optional: k3s settings for the nodes
    #   disable: [traefik]             #   packaged components k3s must not deploy

Traefik:

k3s includes Traefik as its default ingress controller, and Caproni does not disable it. Use k3s’s Traefik directly, or deploy a different ingress controller as a Helm deployer.

To turn k3s’s Traefik off, list it under k3s.disable:

cluster:
  driver: k3d
  k3d:
    k3s:
      disable: [traefik]

k3s.disable names the packaged components k3s must not deploy. Caproni forwards each entry to k3d cluster create as --disable=<component>@server:*. Caproni installs no ingress controller of its own, so a cluster that disables k3s’s Traefik has none until your configuration declares one — see examples/own-infrastructure.yaml for a builtin:traefik-tlsstore deployer that points whichever Traefik is running at the dev CA’s wildcard certificate. Values in this list must be literal: variable expansion skips them, so a ${VAR} reference reaches k3s unexpanded and matches no component.

k3s.disable accepts coredns, gateway-api-crd, local-storage, metrics-server, servicelb, and traefik. Disable gateway-api-crd when a deployer installs its own Gateway API CRDs: k3s 1.37 and later bundle them, and older k3s ignores the entry. The list becomes a k3d cluster create argument, so changing it for an existing cluster takes caproni destroy && caproni up.

Disabling a component through extra_args is deprecated. Caproni cannot tell what such an argument means, so use k3s.disable instead; caproni up warns when it sees one.

Other k3s arguments:

Pass anything else k3s accepts through extra_args, one argv token per list entry:

cluster:
  driver: k3d
  k3d:
    extra_args:
      - --k3s-arg=--tls-san=cluster.example.com@server:*

Port Mappings:

By default, k3d exposes ports 80 and 443 on the host. To use different ports (e.g., for rootless Podman which cannot bind privileged ports), specify custom mappings:

cluster:
  driver: k3d
  k3d:
    port_mappings:
      - "8080:80@loadbalancer" # Host 8080 → Cluster 80
      - "8443:443@loadbalancer" # Host 8443 → Cluster 443

See the Linux Setup Guide for rootless Podman configuration.

External

Use driver: external to point Caproni at a Kubernetes cluster it does not manage — a remote or cloud cluster, or a local one provisioned by another tool. Caproni connects to the cluster and deploys into it, but never controls its lifecycle.

cluster:
  driver: external
  external:
    context: my-cluster # kubeconfig context to target; omit to use the current context
  network:
    hostname: gitlab.example.com

An external cluster that runs no ingress controller needs one declared as a deployer. To pin its Service to a reserved address your DNS already points at, set service.spec.loadBalancerIP:

deployers:
  traefik:
    type: helm
    helm:
      namespace: kube-system
      wait: true
      repository:
        name: traefik
        url: https://traefik.github.io/charts
      release:
        name: traefik
        chart: traefik/traefik
        version: ${GL_TRAEFIK_VERSION}
      dynamic_overrides:
        - type: inline
          value_map:
            service.spec.loadBalancerIP: 203.0.113.10

${GL_TRAEFIK_VERSION} resolves from the versions the Caproni binary embeds. Pin a literal version instead if you want the chart version to change only when you say so.

Prerequisites:

  • The kubeconfig context (or current context, if omitted) must be reachable.
  • Any credential-exec plugin the context uses (for example gke-gcloud-auth-plugin for GKE) must be on PATH, since Caproni runs kubectl/helm against your kubeconfig.

Behavior and constraints:

  • caproni up verifies connectivity, then deploys whatever your configuration declares through the deployer orchestrator, the same install path used on the local drivers. Deployers run Helm and kustomize against your kubeconfig.
  • caproni down and caproni destroy return an error: Caproni does not own the cluster’s lifecycle. Remove the cluster (or its workloads) through whatever provisioned it.
  • registry_mirror is currently unsupported, because Caproni cannot rewrite an unmanaged cluster’s container runtime. Configuring it with driver: external logs a warning and is otherwise ignored.

Ingress and TLS: on the local drivers k3s runs a Traefik ingress controller, and the dev CA terminates TLS there once your configuration declares the builtin:traefik-tlsstore deployer. On an external cluster you bring your own ingress controller. Caproni wires neither ingress nor TLS for you: declare cert-manager and the caproni-ca ClusterIssuer yourself (see examples/own-infrastructure.yaml), point your ingress at the application Services, and reference the caproni-ca ClusterIssuer if you want it to issue your certificates.

Note

GitLab team members can use GitLab Sandbox Cloud to provision a GKE cluster for testing the external driver against real cloud infrastructure. See MR 362 for detailed steps.

Registry mirror

The cluster.registry_mirror section routes the cluster’s container runtime through a pull-through registry cache. Set managed: true to let caproni run and supervise a host-side zot instance for you, or leave managed unset (the default, false) to bring your own cache (zot, distribution, harbor, …) and point caproni at its endpoint. The feature is off when the section is omitted or upstreams is empty.

Caproni-managed — caproni spawns and supervises zot and computes the endpoint:

cluster:
  registry_mirror:
    managed: true
    upstreams:
      - docker.io
      - quay.io
      - registry.gitlab.com

Bring your own — you run the cache; caproni only writes the driver-side mirror config and never touches the cache process:

cluster:
  registry_mirror:
    endpoint: http://host.k3d.internal:5000
    upstreams:
      - docker.io
      - quay.io
      - registry.gitlab.com
      - ghcr.io

managed: true and endpoint are mutually exclusive: when caproni manages zot, it computes the endpoint itself.

Fields

  • managed: when true, caproni runs and supervises a host-side zot cache and computes the endpoint (do not set endpoint). Defaults to false (bring your own).
  • endpoint: URL of the pull-through cache; required when managed is false. Must be reachable from cluster nodes and include an explicit port (no defaults). An https:// endpoint is verified against the system trust store; an http:// endpoint is used with verification skipped.
    • k3d: use http://host.k3d.internal:<port> — k3d injects this name into each node container’s /etc/hosts via the host gateway.
    • colima: use http://host.docker.internal:<port> — colima’s networking layer adds this entry to /etc/hosts inside the VM.
  • upstreams: list of upstream registries (as they appear in image references) whose pulls should route through the mirror. Empty or absent disables the feature. Pulls from any other host go directly to upstream.

How it works on k3d

Caproni writes a k3s registries.yaml to ~/.local/share/caproni/<profile>/k3d-registries.yaml, maps each upstreams entry to the endpoint, and passes --registry-config <path> to k3d cluster create. The file persists outside the cluster, so it survives k3d cluster delete && caproni up. With a managed mirror, caproni also copies the registry CA to ~/.local/share/caproni/<profile>/k3d-registry-ca.crt, bind-mounts it into every node, and sets ca_file so the nodes verify zot against it. k3d reads this file only when the cluster is created. A cluster created before the mirror moved to HTTPS keeps its old config and caproni up warns about it; run caproni destroy && caproni up to recreate it.

How it works on colima

Caproni renders hosts.toml for each upstreams entry on the host under ~/.local/share/caproni/<profile>/certs.d/<upstream>/hosts.toml, pointing at the configured endpoint. colima’s default virtiofs home mount surfaces this directory inside the VM at the same path, and caproni symlinks /etc/containerd/certs.d to it. With a managed mirror, each upstream directory also holds a copy of the registry CA as ca.crt, which containerd uses to verify zot.

containerd only consults certs.d when its registry config_path points there, and colima’s containerd leaves config_path empty by default. So before starting the VM, caproni writes colima’s per-profile containerd override at <colima config dir>/<profile>/containerd/config.toml, setting config_path = "/etc/containerd/certs.d". The colima config directory honours COLIMA_HOME and XDG_CONFIG_HOME, and defaults to ~/.colima on macOS or ~/.config/colima on Linux. colima provisions the VM’s /etc/containerd/config.toml from this file, so the setting is present on first boot and containerd reads the per-host rules at image-pull time — no containerd or k3s restart is needed.

Reconciliation: re-running caproni up against a running profile re-renders the host hosts.toml files (clearing any upstreams removed from caproni.yaml), so editing the upstreams of an existing mirror takes effect without destroying the VM. Because config_path is applied at VM provision time, enabling registry_mirror on a VM that was created without it requires recreating the VM (caproni destroy && caproni up).

Using the cache from your host docker

The managed cache serves HTTPS on https://localhost:5555 using the registry CA at ~/.local/share/caproni/registry/pki/current/ca.crt. To use it from your host Docker:

  1. Run caproni ca trust so your host trusts the registry CA.

  2. Point Docker at the cache in daemon.json:

    {
      "registry-mirrors": ["https://localhost:5555"]
    }
  3. Restart Docker to apply the change.

Docker only uses the mirror for docker.io images. Images from other registries are pulled directly.

Running zot as the pull-through cache

Any pull-through registry (zot, distribution, harbor, …) works. zot is the example we test against; it has first-class on-demand sync and a small footprint.

Save the following as zot-config.json somewhere on your host:

{
  "distSpecVersion": "1.1.1",
  "storage": {
    "rootDirectory": "/var/lib/registry"
  },
  "http": {
    "address": "0.0.0.0",
    "port": "5000"
  },
  "log": {
    "level": "info"
  },
  "extensions": {
    "sync": {
      "enable": true,
      "registries": [
        {
          "urls": ["https://registry-1.docker.io"],
          "onDemand": true,
          "tlsVerify": true,
          "content": [{ "prefix": "**" }]
        },
        {
          "urls": ["https://registry.gitlab.com"],
          "onDemand": true,
          "tlsVerify": true,
          "content": [{ "prefix": "**" }]
        }
      ]
    }
  }
}

Add one block under sync.registries per upstream you list in caproni.yaml. The urls for docker.io must be https://registry-1.docker.io; for every other upstream, use the hostname as it appears in image references.

Start zot, persisting its cache to a named volume so it survives container restarts:

docker volume create zot-data
docker run -d --name zot \
  -p 5000:5000 \
  -v "$PWD/zot-config.json:/etc/zot/config.json:ro" \
  -v zot-data:/var/lib/registry \
  ghcr.io/project-zot/zot-linux-amd64:v2.1.2

Note

Replace amd64 with arm64 on Apple Silicon.

Verify it is reachable from the host:

curl -fsS http://localhost:5000/v2/   # → {}

Then point caproni.yaml at it. Cluster nodes can’t reach localhost:5000 directly; use the host-gateway name your driver injects:

  • k3d: endpoint: http://host.k3d.internal:5000
  • colima: endpoint: http://host.docker.internal:5000 (landing in a follow-up MR)

Pulling from authenticated upstreams

For private upstreams (a private GitLab project’s registry, a private Docker Hub namespace, …), add credentialsFile and a credentials.json to the zot config. See zot’s sync extension docs for the full schema. Caproni does not touch zot credentials — that’s the “bring your own” boundary.

Repositories

The repositories section defines Git repositories containing source code. Caproni clones these repositories when they’re needed by deployers or reloaders with edit_mode: true.

repositories:
  gitlab-chart:
    repository: https://gitlab.com/gitlab-org/charts/gitlab.git
    directory: ./gitlab-chart/

  gitaly:
    repository: https://gitlab.com/gitlab-org/gitaly.git
    directory: ./gitaly/
    ref: ${CAPRONI_GITALY_SHA}

Repositories support lifecycle hooks.

Repository Fields

  • repository: Git repository URL (HTTPS or SSH)
  • directory: Local path where the repository will be cloned
  • ref: Optional commit SHA, tag, or branch to check out. When omitted, Caproni uses the remote default branch. See Pinning to a ref.
  • edit_reloaders: Optional list of reloaders to run in edit mode. This also enables edit mode for the repository, so you don’t need to set edit_mode separately.

Cloning Strategy

Repositories are cloned automatically when:

  1. Referenced by a deployer or reloader with edit_mode: true
  2. The directory doesn’t already exist

To manually update repositories, use:

caproni update

Pinning to a ref

By default a repository tracks its remote default branch: Caproni clones it and, on caproni update, fast-forwards it to the latest commit. Set ref to run against a specific point in history instead. This matters most in CI, where a pipeline can pin a repository to the exact commit under test:

repositories:
  gitlab:
    repository: https://gitlab.com/gitlab-org/gitlab.git
    directory: ./gitlab/
    ref: ${CI_COMMIT_SHA}

The value of ref determines how caproni update treats the repository:

  • A commit SHA or tag is a pin. Caproni checks it out and leaves it in place; update never advances it. This is the immutable point you want in CI.
  • A branch is tracked. Caproni checks it out and fast-forwards it to the branch tip on each update, the same way the default branch behaves.

ref accepts variable references such as ${CI_COMMIT_SHA}. If the variable is unset, Caproni reports an error rather than silently falling back to the default branch, so a misconfigured pipeline fails loudly.

Caproni still protects local work: it never force-resets and never discards uncommitted changes. A repository with uncommitted changes is skipped with a warning, whether or not ref is set.

Deployers

The deployers section defines applications to deploy to the Kubernetes cluster.

Deployer dependencies

Deployers are executed in non-defined order. If a deployer needs to run after another prerequisite deployer, use the needs keyword to define dependencies between deployers.

deployers:
  gitlab:
    needs: [gitlab-dev-stack]
  gitlab-dev-stack: {}

Helm Deployer

Deploy Helm charts to the cluster:

deployers:
  gitlab:
    type: helm
    repository: gitlab-chart # References repository above (optional)
    helm:
      namespace: gitlab
      values_file: ./gitlab-chart-values.yaml
      repository:
        name: gitlab
        url: https://charts.gitlab.io
      release:
        name: gitlab
        chart: gitlab/gitlab

Helm Deployer Fields

  • type: Must be helm
  • repository: Name of repository from repositories section (optional - can deploy remote charts without local source). With edit_mode: true the clone is deployed directly, and caproni fetches any dependencies it declares but does not vendor, as Chart.lock pins them.
  • helm.namespace: Kubernetes namespace for deployment
  • helm.wait: If true, passes --wait to helm install/helm upgrade so Helm waits for all resources to be ready before returning (default: false). Useful when other deployers depend on this one being fully ready (for example, a CRD provider that must be ready before a chart consuming those CRDs).
  • helm.timeout: Passed to helm install/helm upgrade via --timeout. Accepts Go duration syntax (for example 10m, 1h30m). Bounds how long Helm waits for any individual Kubernetes operation, most visibly in combination with helm.wait: true on slow-to-converge charts. Helm’s default is 5m.
  • helm.values_file: Path to a Helm values file, or a list of paths (relative to config file location). Caproni passes a list to Helm in order, so a later file wins. See Several values files.
  • helm.dynamic_overrides: List of Helm value overrides computed at deploy time and layered on top of helm.values_file. See Dynamic overrides.
  • helm.repository.name: Helm repository name for helm repo add
  • helm.repository.url: Helm repository URL
  • helm.release.name: Helm release name
  • helm.release.chart: Chart reference — repo/chart for repository charts, an OCI URI (oci://registry/path/chart or oci://registry/path/chart:version) for OCI registry charts, an absolute http(s) URL (https://example.com/charts/my-app-1.2.3.tgz), or a local path to a packaged chart (./dist/my-app-1.0.0.tgz)

Several values files

When a chart takes its values from more than one file, as helm -f a.yaml -f b.yaml does, list the files under helm.values_file:

caproni.yaml
deployers:
  app:
    type: helm
    helm:
      namespace: app
      values_file:
        - ./values/base.yaml
        - ./values/ci.yaml # Overwrites values from base.yaml
      release:
        name: app
        chart: oci://registry.example.com/charts/app

Helm gets the files in list order, then the dynamic overrides. Every file must exist when Caproni loads the configuration.

A later config layer replaces each value it defines, whether it’s a list or an atomic value. To pick the files per environment, write the list in caproni.local.yaml. A relative entry from a remote fragment is fetched relative to that fragment’s URL. An entry that holds a variable reference resolves against your config directory instead. See Composition. A list entry whose variable is unset fails validation, and Caproni warns about the unset variable. A single path that expands to an empty string means no values file.

See examples/helm-values-files.yaml.

Dynamic overrides

helm.dynamic_overrides allows overriding the Helm values that are set in the static helm.values_file values file with dynamic data, such as environment variables, another values file, or a secret on disk.

Each override has a type, which allows for a different data source:

TypeRequired fieldsWhat it does
inlinevalue_mapSets each key to the value written in the config.
inline_filevalue_mapSets each key to the contents of the file at the given path.
gitlab_repo_version_filesrepository, version_mapSets image tags from *_VERSION files defined in a version mapping file in a GitLab checkout.
caproni.yaml
deployers:
  my-app:
    type: helm
    helm:
      namespace: my-app
      values_file: ./chart-values.yaml
      release:
        name: my-app
        chart: my-app/my-app
      dynamic_overrides:
        - type: gitlab_repo_version_files
          repository: ./my-app/
          version_map: version_map.yaml
        - type: inline
          value_map:
            global.hosts.domain: $MY_APP_DOMAIN
            global.version: edge
        - type: inline_file
          value_map:
            other_service.config: ./config/other-service.toml

Caproni trims whitespace from each file’s content before using it. If repository does not exist yet, for example before edit mode clones it, Caproni logs a warning and skips the override. A missing version file or an empty version_map fails the override.

The gitlab_repo_version_files type is a GitLab-specific override that reads a helm values mapping from disk that declares version files, which will be read into the values as a string.

gitlab_cng_version_map.yaml
version_map:
  other_service.image.tag: OTHER_SERVICE_VERSION
  openbao.image.tag: OPENBAO_VERSION
OTHER_SERVICE_VERSION
abcdefd06f00ddeadbeeffeedfacecafebabe690

If an override fails to resolve, caproni deploy skips that chart and continues with the rest. See caproni deploy for the full deploy flow.

Deploying Remote Charts

You can deploy Helm charts without local source code:

deployers:
  traefik:
    type: helm
    # No repository reference needed
    helm:
      namespace: kube-system
      repository:
        name: traefik
        url: https://traefik.github.io/charts
      release:
        name: traefik
        chart: traefik/traefik

Deploying OCI Registry Charts

You can deploy charts hosted in OCI-compatible registries (e.g., GitLab Container Registry, GitHub Container Registry, Docker Hub) without configuring a Helm repository:

deployers:
  my-app:
    type: helm
    helm:
      namespace: my-app
      release:
        name: my-app
        chart: oci://registry.gitlab.com/gitlab-org/software-delivery/release-platform-canary/chart/release-platform-canary

OCI charts use oci:// URIs instead of repo/chart references and do not require helm.repository configuration. To pin a specific version, append a tag to the URI (e.g., oci://registry.example.com/charts/my-app:1.2.3). Without a tag, helm resolves to the latest release.

Authentication is handled through your Docker/OCI credentials (~/.docker/config.json or $DOCKER_CONFIG).

Deploying Charts From a URL

You can deploy a chart from an absolute http(s) URL:

deployers:
  gitlab:
    type: helm
    helm:
      namespace: gitlab
      release:
        name: gitlab
        chart: https://gitlab.com/gitlab-org/charts/gitlab/-/archive/${GITLAB_HELM_CHART_REF}/gitlab-${GITLAB_HELM_CHART_REF}.tar.gz

The URL may serve a packaged chart, or a chart repository’s source archive which declares dependencies without vendoring them. Caproni will run helm dependency build before deployment and register any repository Helm does not know. The chart is fetched on every deploy, since Helm caches nothing it downloads from an absolute URL.

Deploying Local Packaged Charts

You can deploy a locally packaged chart (.tgz file) without configuring a Helm repository. The path is relative to the caproni.yaml file location:

deployers:
  my-app:
    type: helm
    helm:
      namespace: my-app
      release:
        name: my-app
        chart: ./dist/my-app-1.0.0.tgz

This is useful when building and testing charts locally before publishing them to a registry.

Kustomize deployer

Build a kustomization directory and apply the rendered manifests. Use this for non-chart supporting manifests you want to declare in caproni.yaml:

deployers:
  cert-issuer:
    type: kustomize
    kustomize:
      path: ./infra/cert-issuer
      namespace: cert-manager

Kustomize deployer fields

  • type: Must be kustomize
  • repository: Name of repository from repositories section (optional - use when the kustomization lives inside a cloned repository)
  • kustomize.path: Path to a kustomization directory (one containing a kustomization.yaml), relative to the config file location, or a remote target.
  • kustomize.namespace: Optional target namespace. When omitted, each object is applied using its own metadata.namespace.
  • kustomize.files: Optional map of file names to content, generated into the kustomization before it is built. See Generating files at build time.

A local kustomization path must exist and be a directory at validation time; a missing path is a configuration error. caproni down deletes the rendered manifests by name.

Generating files at build time

A secretGenerator or configMapGenerator reads its inputs from files inside the kustomization directory. When those inputs only exist as variables, such as credentials exported in your shell or in CI, declare them under kustomize.files instead of writing them into your repository:

variables:
  OAUTH_APP_ID: ${OAUTH_APP_ID:?export OAUTH_APP_ID}
  OAUTH_APP_SECRET: ${OAUTH_APP_SECRET:?export OAUTH_APP_SECRET}

deployers:
  oauth-secret:
    type: kustomize
    kustomize:
      path: ./manifests/oauth
      namespace: gitlab
      files:
        provider.yaml: |
          name: 'github'
          app_id: '${OAUTH_APP_ID}'
          app_secret: '${OAUTH_APP_SECRET}'

Caproni copies the kustomization directory to a temporary directory that only your user can read, writes each entry into it with the variables resolved, runs the build there, and removes the copy. The kustomization itself stays unchanged: it references provider.yaml in its generator like any other file, and the file never appears in your working tree.

Each key must be a bare file name; subdirectories and .. are rejected. Only a local path takes files, not a builtin: overlay or a remote target. The kustomization must also be self-contained, because a relative reference such as ../base points outside the copy. See examples/kustomize-deployer.yaml for a complete example.

Remote kustomize targets

kustomize.path can point at a git repository instead of a local directory, using kustomize’s remote target syntax:

deployers:
  shared-overlay:
    type: kustomize
    kustomize:
      path: https://gitlab.com/org/infra.git//overlays/dev?ref=v1.2.0

A remote target must be a URL with an http, https, ssh, or file scheme; anything else is treated as a local path. The // separates the repository from the kustomization directory inside it. For repositories in GitLab subgroups, use the explicit .git// form.

Pin a git ref with ?ref=; caproni logs a reproducibility warning for an unpinned target. Private repositories use your regular git credentials. Every build clones the repository afresh — nothing is cached, so builds fail without network access to the git host.

Namespace deployer

Pre-create Kubernetes namespaces so that later deployers can write into them:

deployers:
  prerequisites:
    type: namespace
    namespace:
      namespaces:
        - gitlab
      delete_on_undeploy: false
  gitlab:
    needs: [prerequisites]
    type: helm
    # ...

Namespace deployer fields

  • type: Must be namespace
  • namespace.namespaces: Namespaces to create. At least one entry is required, and each name must be a DNS-1123 label of at most 63 characters.
  • namespace.delete_on_undeploy: When true, undeploying this deployer deletes the listed namespaces, cascading to every resource inside them. Defaults to false, which treats the namespaces as shared infrastructure that sibling deployers may still be using.

Creation is idempotent, so re-running caproni up on existing namespaces is a no-op. Caproni waits up to 60 seconds for each namespace to reach phase=Active and for its default ServiceAccount to exist. This is the usual source of “namespace not found” and missing-ServiceAccount races in follow-up deployers.

Use needs on the deployers that depend on these namespaces. Declaring the namespace deployer first in the YAML is not enough: deployers without a dependency edge run in an undefined order.

Reloaders

The reloaders section defines local development processes with hot-reload capabilities.

Reloaders support lifecycle hooks.

Mirror Reloader

Use mirrord to run local processes that mirror a Kubernetes pod:

reloaders:
  gitaly:
    type: mirror
    repository: gitaly # References repository above
    edit_mode: true
    mirror:
      target:
        namespace: gitlab
        kubernetes_type: pod # Options: pod, deployment
        name: gitlab-gitaly-0
      filesystem:
        read_write:
          - "^/home/git/repositories"
        read_only:
          - "^/etc/gitaly"
          - "^/srv/gitlab-shell"
          - "^/etc/gitlab-secrets"
      processes:
        gitaly:
          command: _build/bin/gitaly /etc/gitaly/config.toml

Mirror Reloader Fields

  • type: Must be mirror
  • repository: Name of repository from repositories section
  • edit_mode: Must be true to enable local development
  • mirror.target.namespace: Kubernetes namespace of target pod
  • mirror.target.kubernetes_type: Type of Kubernetes resource (pod or deployment)
  • mirror.target.name: Name of target pod or deployment
  • mirror.filesystem.read_write: Paths to mirror with read-write access (regex patterns)
  • mirror.filesystem.read_only: Paths to mirror with read-only access (regex patterns)
  • mirror.network.incoming.mode: How mirrord intercepts incoming traffic. Options: steal (default), mirror, off. Use mirror when multiple reloaders target the same pod.
  • mirror.network.incoming.port_mapping: List of local:remote port strings (1-65535), like Docker’s host:container, for example 18075:8075. A process listening on the local port receives the traffic intercepted for the remote port of the target pod. Use it when several Caproni instances run edit mode on one host and would otherwise collide on the same local port. The schema rejects only identical entries; mirrord rejects a repeated local or remote port when it starts. Make sure the process really listens on the local port, for example through its own config file or an env entry it reads (see Edit Mode Processes).
  • mirror.processes: Map of process names to commands

Recommended for most development workflows - provides fast hot-reload without rebuilding containers.

Skaffold Reloader

Use Skaffold for development when mirrord doesn’t support your use case (e.g., applications using mmap):

reloaders:
  gitaly:
    type: skaffold
    repository: gitaly
    edit_mode: true
    skaffold:
      namespace: gitlab
      config_file: skaffold.yaml

Skaffold Reloader Fields

  • type: Must be skaffold
  • repository: Name of repository from repositories section
  • edit_mode: Must be true
  • skaffold.namespace: Kubernetes namespace for Skaffold deployment
  • skaffold.config_file: Path to skaffold.yaml relative to repository directory

Use Skaffold when:

  • Applications use mmap (like Gitaly’s git processes)
  • Applications have complex filesystem requirements that mirrord doesn’t support

Working with Edit Mode

For a complete walkthrough of the edit mode development workflow, see the Edit Mode Workflow Guide.

Enable Edit Mode

To run reloaders in edit mode, add them to edit_reloaders under their repository in caproni.local.yaml. This file only affects your local setup.

# caproni.local.yaml
repositories:
  gitlab:
    edit_reloaders: [gitlab, sidekiq]

Running Reloaders

Start all reloaders with edit_mode: true:

caproni run

This command:

  1. Clones repositories if needed
  2. Starts all reloaders concurrently
  3. Streams process output to logs
  4. Blocks until Ctrl-C is pressed
  5. Gracefully shuts down all processes

Typical Workflow

# Start cluster and deploy applications
caproni up

# In another terminal, run local development processes
caproni run

# Make code changes - they hot-reload automatically

# When done, stop reloaders with Ctrl-C
# Then stop the cluster
caproni down

Complete Example

version: 2

cluster:
  driver: auto
  network:
    hostname: gitlab.test
    additional_hostnames:
      - registry.gitlab.test
  colima:
    memory: 8GiB
    cores: 4
  k3d:
    agents: 0
    servers: 1
    # port_mappings:        # Uncomment for rootless Podman
    #   - "8080:80@loadbalancer"
    #   - "8443:443@loadbalancer"

repositories:
  gitlab-chart:
    repository: https://gitlab.com/gitlab-org/charts/gitlab.git
    directory: ./gitlab-chart/

  gitaly:
    repository: https://gitlab.com/gitlab-org/gitaly.git
    directory: ./gitaly/

deployers:
  gitlab:
    type: helm
    repository: gitlab-chart
    helm:
      namespace: gitlab
      values_file: ./gitlab-chart-values.yaml
      repository:
        name: gitlab
        url: https://charts.gitlab.io
      release:
        name: gitlab
        chart: gitlab/gitlab

reloaders:
  gitaly:
    type: mirror
    repository: gitaly
    edit_mode: true
    mirror:
      target:
        namespace: gitlab
        kubernetes_type: pod
        name: gitlab-gitaly-0
      filesystem:
        read_write:
          - "^/home/git/repositories"
        read_only:
          - "^/etc/gitaly"
          - "^/srv/gitlab-shell"
          - "^/etc/gitlab-secrets"
      processes:
        gitaly:
          command: _build/bin/gitaly /etc/gitaly/config.toml

JSON Schema Validation

Caproni provides JSON schemas for configuration validation. Configure your editor to use the schema:

# yaml-language-server: $schema=../schema/config.v2.schema.json
version: 2
# ... rest of configuration

Most editors with YAML language server support will provide:

  • Autocomplete for configuration fields
  • Validation errors for incorrect configuration
  • Documentation tooltips

Local overrides

Place a caproni.local.yaml in the same directory as caproni.yaml to apply personal or machine-specific settings without committing them to version control:

# caproni.local.yaml — add to .gitignore
cluster:
  colima:
    memory: 16GiB
    cores: 8

Only the keys you specify are changed — the rest of your base config is preserved. See Config Composition for merge rules and more examples.

See Also

  • Command Reference
  • Config Composition
  • Variable Interpolation
  • Design: Repository, Deployer, and Reloader Architecture
Last updated on November 24, 2026
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.