liveBook · Manning

Deployment frequency

As explained in Platform Engineering on Kubernetes

Deployment frequency is the rate at which an organization deploys software changes to production or other target environments.

Deployment frequency measures how often an organization successfully releases software to customers. It is a DORA software-delivery metric associated with team velocity. Tracking it can help assess whether platform changes improve continuous delivery. section 9.1

A Kubernetes-based calculation can follow three stages:

  • Collect Kubernetes deployment-related Events through a Knative Eventing APIServerSource, convert them to CloudEvents, and store them. section 9.2.4 section 9.2.2
  • Map relevant CloudEvents to CDEvents. One example maps an API-server resource-add event involving a Deployment to dev.cdevents.service.deployed.0.1.0. section 9.2.5
  • Read service-deployed CDEvents, persist each deployment’s service name, timestamp, and deployment name, then calculate counts by service per day, week, or month. Make recalculation idempotent. section 9.2.6

Choose the event mapping to match what you intend to count. Kubernetes internal Events are one input; ArgoCD or Tekton Pipeline events are alternatives. A resource-add event is the example’s counting signal, while the DORA definition concerns successful releases in front of customers. section 9.2.5 section 9.1

Daily counts

A working pipeline uses Knative Serving, Knative Eventing, and PostgreSQL to collect events, transform them, and calculate deployment frequency. Its daily endpoint returns records with a deployment name, count, and date; one sample response reports counts of three and one for two deployments on the same day. section 9.2.7

Figure 9.15 Deployment frequency calculation flow

Follow the deployment-frequency calculation from service-deployed CDEvents through stored deployment records to time-bucketed results. section 9.2.6

Keptn Lifecycle Toolkit offers a complementary way to observe deployment activity and begin measuring early platform initiatives. section 9.3

How Platform Engineering on Kubernetes covers it

How deep it goes
Works through event collection, conversion, storage, and per-service aggregation, while leaving source-specific mappings and calculation mechanisms customizable.
Examples
Demonstrates a Kubernetes-event-to-CDEvents mapping and a daily response containing deployment counts.
What it assumes
Starts with cluster creation and component installation, but expects readers to configure Kubernetes resources and adapt non-CloudEvents inputs.
What you can do after
Build it from scratch with Knative event sources, transformation and calculation functions, and PostgreSQL storage.
How it connects
Connects DORA metrics, CloudEvents, CDEvents, Kubernetes Events, and Knative Eventing.

Also explained in

Compare how 3 books explain deployment frequency →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Platform Engineering on Kubernetes. The section links point to the parts of the book it draws on.