Skip to content

Continuous Delivery and GitOps: CNPA practice questions

GitOps is one way of doing continuous delivery, and in Kubernetes-based platforms it is the most common one. Continuous delivery is the goal: DORA defines it as the ability to release changes of all kinds on demand, quickly, safely and sustainably.

By Ibrahim Yesilay · Published · Updated

Independent community practice, not affiliated with or endorsed by CNCF or The Linux Foundation.

What Continuous Delivery and GitOps covers in CNPA

GitOps is one way of doing continuous delivery, and in Kubernetes-based platforms it is the most common one. Continuous delivery is the goal: DORA defines it as the ability to release changes of all kinds on demand, quickly, safely and sustainably. GitOps is a set of operating principles for reaching that goal, in which the desired state of the system lives in a versioned store such as Git and software agents keep the running system in line with it.

The OpenGitOps project publishes four principles in its version 1.0.0. Declarative: a system managed by GitOps must have its desired state expressed declaratively. Versioned and immutable: desired state is stored in a way that enforces immutability and versioning and retains a complete version history. Pulled automatically: software agents automatically pull the desired state declarations from the source. Continuously reconciled: software agents continuously observe actual system state and attempt to apply the desired state. Each principle matters on its own. Without the history you cannot audit or roll back; without automatic pulling a person or a pipeline has to push changes in; without continuous reconciliation, manual edits in the cluster quietly become the real state.

Argo CD and Flux implement these principles for Kubernetes. Argo CD describes itself as a declarative, GitOps continuous delivery tool and runs as a controller that compares the live state of each application with the target state in Git, marking it OutOfSync when they differ and syncing it automatically or on request. Flux defines GitOps as describing the whole system declaratively under version control, with an automated process that makes the deployed environment match the state in one or more repositories; its sources fetch from Git repositories, OCI repositories, Helm repositories and buckets, and its Kustomization and HelmRelease reconcilers apply what was fetched. Flux also describes what it calls Gitless GitOps, in which OCI registries hold the configuration artifacts while Git stays the authoring interface.

Progressive delivery extends continuous delivery by rolling a change out gradually to a subset of users and watching it before releasing to everyone. Canary and blue-green releases are the usual patterns. Argo Rollouts provides them as a Kubernetes controller with its own custom resources, Flagger offers canary releases alongside Flux, and Argo CD's PreSync, Sync and PostSync hooks can support such rollouts.

Misconceptions are common. GitOps does not strictly require Git; the principles talk about a versioned, immutable source. GitOps does not replace CI: images are still built and tested by pipelines, and GitOps takes over at deployment. Continuous delivery is also not the same as continuous deployment, which DORA describes as deploying every change to production as soon as possible. And storing YAML in a repository is not GitOps by itself if a pipeline still pushes it with kubectl and nothing corrects drift.

At associate level, expect to name or recognize the four principles, to distinguish the pull model from push-based deployment, and to identify what an agent does when the live state differs from the declared state.

Key points

  • The four OpenGitOps principles: declarative, versioned and immutable, pulled automatically, continuously reconciled.
  • Argo CD marks an application OutOfSync when live state differs from the target state in Git.
  • Flux sources include GitRepository, OCIRepository, HelmRepository and Bucket.
  • Progressive delivery rolls changes out gradually, for example as canary or blue-green releases.

Three sample questions

8 CNPA questions on Continuous Delivery and GitOps, 8 with explanations. How practice works

Question 1

Which TWO of the following are among the four OpenGitOps principles (v1.0.0)? (Select TWO.)

Select all that apply.

  1. A.Mutable and Overwritable
  2. B.Pushed from CI on Every Merge
  3. C.Continuously Reconciled
  4. D.Pulled Automatically

Correct answers: C, D

The four OpenGitOps principles v1.0.0 are Declarative, Versioned and Immutable, Pulled Automatically and Continuously Reconciled. Software agents automatically pull the desired state declarations from the source, and continuously observe actual state and attempt to apply the desired state. Why the other options are wrong. "Mutable and Overwritable": The opposite is true: the principle is Versioned and Immutable, with a complete version history. "Pushed from CI on Every Merge": GitOps agents pull desired state; a CI system pushing changes into the cluster is not one of the principles.

Sources: CNCF CNPA curriculum (CNPA_Curriculum.pdf), OpenGitOps principles v1.0.0

Question 2

A team keeps its desired state as files in a bucket that are overwritten in place, with no history of earlier versions. Which OpenGitOps principle does this break?
  1. A.Declarative
  2. B.Pulled Automatically
  3. C.Versioned and Immutable
  4. D.Continuously Reconciled

Correct answer: C

The OpenGitOps principle Versioned and Immutable requires that desired state is stored in a way that enforces immutability and versioning and retains a complete version history. Overwriting files in place with no history fails that requirement. Why the other options are wrong. "Declarative": The files can still express desired state declaratively; the problem is how they are stored. "Pulled Automatically": Agents could still pull from the bucket automatically; the principle broken is about versioning and history. "Continuously Reconciled": Reconciliation concerns agents comparing actual and desired state, which the storage choice does not prevent.

Sources: CNCF CNPA curriculum (CNPA_Curriculum.pdf), OpenGitOps principles v1.0.0

Question 3

How does DORA define continuous delivery?
  1. A.The ability to release changes of all kinds on demand, quickly, safely and sustainably
  2. B.Running unit tests on every commit
  3. C.Releasing once per quarter after a coordinated freeze
  4. D.Automatically deploying every single commit to production, with no other conditions or controls applied

Correct answer: A

DORA defines continuous delivery as the ability to release changes of all kinds on demand quickly, safely and sustainably, so that teams can deploy at any time, including during business hours, without impacting users; it depends on keeping the software deployable throughout its lifecycle. Why the other options are wrong. "Running unit tests on every commit": That is part of continuous integration, which CD builds on but does not equal. "Releasing once per quarter after a coordinated freeze": Code freezes and rare releases are the opposite of releasing on demand. "Automatically deploying every single commit to production, with no ...": DORA's definition is about being able to release on demand; it does not require that every commit goes to production.

Sources: CNCF CNPA curriculum (CNPA_Curriculum.pdf), DORA capability: Continuous delivery

Practice this topic

Focus mode keeps every question on Continuous Delivery and GitOps until you leave it. 10 free guest answers, then a free account; no credit card.

Or open CNPA practice across all topics.

Sources

The explanation above was checked against these official documents.