Skip to content

Deploy in-cluster OCI registry (zot) for artifact transport between tasks #3380

@vdemeester

Description

@vdemeester

Context

Multi-task pipelines on the dogfooding cluster currently use PVC-backed workspaces to pass data between tasks. On OCI/OKE, every volumeClaimTemplate creates a 50 GiB block volume (OCI minimum).

For pipelines that can't be collapsed into single Tasks (#3379) — primarily release pipelines (7-13 tasks), bastion nightly tests, and CD deploy pipelines — we need an alternative cross-task data transport mechanism.

The tekton-experiments repo demonstrates using OCI artifacts (via oras push/pull) for data transport between tasks, eliminating PVCs entirely. This requires an OCI registry to push/pull intermediate artifacts.

Proposal: deploy zot as in-cluster registry

zot is a lightweight, OCI-native registry that fits this use case well:

Deployment

  • Single pod, ~30MB memory footprint
  • emptyDir storage — intermediate CI artifacts are ephemeral, no need for persistence
  • ClusterIP service only (cluster-internal, no ingress needed)
  • No authentication for cluster-internal use (or k8s service account tokens if needed)
  • Namespace: tekton-pipelines or dedicated registry namespace

Cleanup / retention

  • Built-in garbage collection with configurable retention policy
  • Set retain.delay: "24h" to auto-delete unreferenced artifacts
  • Tag retention policy: keep last N tags per repo
  • No CronJob needed — GC runs as part of the registry process

Sample deployment

apiVersion: apps/v1
kind: Deployment
metadata:
  name: zot-registry
spec:
  replicas: 1
  template:
    spec:
      containers:
        - name: zot
          image: ghcr.io/project-zot/zot-linux-amd64:latest
          ports:
            - containerPort: 5000
          resources:
            requests:
              memory: 64Mi
              cpu: 50m
            limits:
              memory: 256Mi
              cpu: 200m
          volumeMounts:
            - name: data
              mountPath: /var/lib/registry
            - name: config
              mountPath: /etc/zot
      volumes:
        - name: data
          emptyDir:
            sizeLimit: 10Gi
        - name: config
          configMap:
            name: zot-config
---
apiVersion: v1
kind: Service
metadata:
  name: zot-registry
spec:
  type: ClusterIP
  ports:
    - port: 5000
  selector:
    app: zot-registry

Usage in pipelines

Tasks would use oras (or the create-oci-artifact / use-oci-artifact StepActions from tekton-experiments) to push/pull artifacts:

# Push task output
oras push zot-registry.tekton-pipelines.svc:5000/artifacts/${PIPELINE_RUN}:source ./source/

# Pull in next task  
oras pull zot-registry.tekton-pipelines.svc:5000/artifacts/${PIPELINE_RUN}:source

Trade-offs

  • Pro: fast (no network egress), no rate limits, self-contained, no external dependency
  • Pro: no auth complexity, artifacts auto-expire
  • Pro: useful beyond artifact transport — local bundle resolution, test image caching
  • Con: if pod restarts, in-flight pipelines may fail (acceptable for CI)
  • Con: another component to maintain (though very low maintenance)

Future: TEP-0164

TEP-0164 (Tekton Artifacts Phase 2) will make OCI artifact transport native to the Tekton controller — no StepActions or explicit registry config needed. The in-cluster registry would still be useful as the backing store for TEP-0164, or could be retired once TEP-0164 ships with its own storage.

Related

/kind feature

Metadata

Metadata

Assignees

Labels

area/dogfoodingIndicates an issue on dogfooding (aka using Pipeline to test Pipeline)kind/featureCategorizes issue or PR as related to a new feature.
No fields configured for Feature.

Projects

Status
No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions