Skip to content

feat(k8s): add cert-manager and the Barman Cloud plugin - #4789

Merged
dan-petty merged 3 commits into
mainfrom
feat/4764-cnpg-barman-plugin
Nov 11, 2026
Merged

dan-petty merged 3 commits into
mainfrom
feat/4764-cnpg-barman-plugin

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

CloudNativePG 1.32.0 removes the in-tree barmanObjectStore, so a database backs up only through the Barman Cloud plugin, and the plugin needs cert-manager. This change adds both as code.

  • Argo CD Applications cert-manager (chart v1.21.3) and plugin-barman-cloud (chart 0.8.1, plugin v0.15.1, namespace cnpg-system). The plugin syncs in wave 1, after cert-manager. Both are Apache-2.0 and older than 14 days.
  • deploy-stack --stack infra installs them after the CloudNativePG operator.
  • Namespace cert-manager enforces Pod Security restricted. NetworkPolicies admit only the metrics scrape to cert-manager, TCP 10250 to its webhook, and only the operator to the plugin pod. Each pod reaches only CoreDNS and the API server.
  • k8s/README.md gets the section "CloudNativePG Backup Plugin".

No database uses the plugin yet.

Closes #4764

Change: openspec/changes/archive/2026-11-11-4764-add-cert-manager-and-the-barman/

CloudNativePG 1.32.0 removes the in-tree barmanObjectStore, so a
database backs up through the Barman Cloud plugin, which needs
cert-manager. Argo CD Applications install cert-manager v1.21.3 and
plugin-barman-cloud 0.8.1 (plugin v0.15.1), and deploy-stack installs
them with stack infra after the CloudNativePG operator. Both are
Apache-2.0 and older than 14 days.

Namespace cert-manager enforces Pod Security restricted. New
NetworkPolicies admit only the metrics scrape and the API server to
cert-manager, TCP 10250 to the webhook pods, and only the operator to
the plugin pod.

Refs #4764
@dan-petty dan-petty added type/feature Type feature: a new function scope/k8s Kubernetes commands, Helm charts, pods, services, and policies labels Nov 11, 2026
@dan-petty

Copy link
Copy Markdown
Owner Author

Checks run in the worktree

  • Test first: without the implementation, 19 of the new tests fail (missing files, namespace, releases and Applications). With it, uv run devops ci test tests/commands/k8s/test_k8s_network_policies.py tests/core/test_k8s_local_path_placement.py tests/invariants/test_k8s_argocd_apps.py tests/invariants/test_k8s_manifests.py tests/commands/k8s/test_k8s.py gives 273 passed.
  • uv run devops ci --check --only k8s: pass. uv run devops openspec check: pass. uv run devops ci docs: pass. uv run devops ci --check --only lint,format: pass.
  • helm template of both charts at the pinned versions with the values of this change: the pod labels and ports match the policies, every container meets Pod Security restricted, and all leader election Roles are in cert-manager.
  • Not run here: the local kubeconform binary is a test stub (fix(tests): test helpers write to the real home outside pytest #4739), so CI does the schema check. Nothing ran against the live cluster.

Live steps after the merge (a person or an agent with cluster access)

Argo CD does the install. Application base applies namespace cert-manager and the three NetworkPolicies; the app-of-apps creates Applications cert-manager and plugin-barman-cloud.

  1. Check the Applications and the CRDs:
    kubectl -n argocd get application base cert-manager plugin-barman-cloud
    kubectl get crd | grep -E 'cert-manager.io|barmancloud.cnpg.io'
    Expect Synced and Healthy, the six cert-manager CRDs and objectstores.barmancloud.cnpg.io.
  2. Check the certificates and the plugin Service:
    kubectl -n cnpg-system get issuer,certificate
    kubectl -n cnpg-system get svc barman-cloud -L cnpg.io/pluginName
    kubectl -n cert-manager get pods
    Expect barman-cloud-client and barman-cloud-server Ready.
  3. If the first sync of plugin-barman-cloud spends its five retries before the cert-manager webhook answers, sync it again from the Argo CD UI or with argocd app sync plugin-barman-cloud.
  4. On a cluster without Argo CD: uv run devops k8s deploy-stack --stack infra --context <context>.

Back out: delete the two Applications. The cert-manager CRDs stay (helm.sh/resource-policy: keep, which Argo CD reads as Delete=false).

@dan-petty
dan-petty marked this pull request as ready for review November 11, 2026 19:57
@dan-petty
dan-petty merged commit cd6fb76 into main Nov 11, 2026
32 checks passed
@dan-petty
dan-petty deleted the feat/4764-cnpg-barman-plugin branch November 11, 2026 19:57
dan-petty pushed a commit that referenced this pull request Nov 11, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.114.0](v0.113.0...v0.114.0)
(2026-11-11)


### Features

* **k8s:** add cert-manager and the Barman Cloud plugin
([#4789](#4789))
([cd6fb76](cd6fb76))
* **roadmap:** collect the git facts of a project review window
([#4794](#4794))
([21d1bc0](21d1bc0))
* **roadmap:** consolidate has a read-only MCP mirror
([#4807](#4807))
([2ec561d](2ec561d))


### Bug Fixes

* **ai:** devops ai agents detects the project manifest
([#4790](#4790))
([e8d1e53](e8d1e53))
* **mcp:** bound the gh resources longer than a GitHub read
([#4844](#4844))
([7f09921](7f09921))
* **roadmap:** run stage before refine on the model lane
([#4841](#4841))
([96c9bee](96c9bee))
* **roadmap:** stop refusing test paths in base docstrings
([#4826](#4826))
([1bbfce0](1bbfce0))
* **telemetry:** key the project gauges by repository
([#4804](#4804))
([9f0e0c8](9f0e0c8))


### Performance Improvements

* **ci:** run the in-image suite nightly and on image pull requests
([#4828](#4828))
([a2cfd9a](a2cfd9a))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/k8s Kubernetes commands, Helm charts, pods, services, and policies type/feature Type feature: a new function

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(k8s): add cert-manager and the Barman Cloud plugin

1 participant