db(portal): migrate WAL archiving to the CNPG-I Barman Cloud plugin

CloudNativePG 1.30 deprecates spec.backup.barmanObjectStore and 1.31 removes
it, so the pin on 1.30.0 was a hard gate. This closes that gate:

- Vendors plugin-barman-cloud v0.16.0 verbatim into
  infrastructure/databases/base/upstream/ (the operator manifest's pattern),
  with a kustomize patch only for --log-level=info and resource bounds.
  v0.16.0 requires CNPG >= 1.30 and is registered through Service
  annotations; its operator<->plugin mTLS pair comes from cert-manager
  (previous commit).
- Adds ObjectStore sirius-growth/portal-wal: the literal translation of the
  retired barmanObjectStore block, with retentionPolicy 14d moved off the
  Cluster (in the plugin, retention belongs to the store).
- Cluster portal drops spec.backup entirely and gains spec.plugins
  (barman-cloud.cloudnative-pg.io, isWALArchiver, barmanObjectName
  portal-wal, serverName portal). The server name is the barman prefix, so
  the plugin keeps writing s3://pg-wal-archive/portal/{base,wals}/... — the
  same objects the in-tree archiver left behind; the 14-day window stays
  readable.
- ScheduledBackup portal-daily switches to method: plugin.
- databases waits on cert-manager; apps waits on databases (the ObjectStore
  CRD ships with the plugin).
- CNPG dashboard: the backup timestamp metric family changes name under the
  plugin, so the panel now accepts both.
This commit is contained in:
devops 2026-11-19 17:58:12 -05:00
commit c45255242b
11 changed files with 1312 additions and 51 deletions

View file

@ -1,4 +1,4 @@
# CloudNativePG operator, pinned at 1.30.0.
# CloudNativePG operator, pinned at 1.30.0, plus the CNPG-I Barman Cloud plugin.
#
# The operator was installed by hand at some point and Flux did not own it, so
# a kubectl patch was lost on every reinstall. The upstream release manifest is
@ -7,9 +7,21 @@
# and patched only for the deltas that already existed live plus the widened
# leader-election window. Do not upgrade the version in this directory without
# a separate, tested change: the CRDs are in this bundle.
#
# The Barman Cloud plugin is the replacement for the in-tree barman-cloud
# integration that 1.30 still ships but deprecates (removed in 1.31). Also
# vendored verbatim (sha256
# aee614683892dd4b44ff9f7afaca55254f1c28de17abbaa0552bf2e1228f7155,
# https://github.com/cloudnative-pg/plugin-barman-cloud/releases/download/v0.16.0/manifest.yaml):
# a separate Deployment in cnpg-system, registered with the operator through
# Service annotations, carrying the `ObjectStore` CRD (barmancloud.cnpg.io). Its
# operator<->plugin mTLS pair is issued by cert-manager (Flux Kustomization
# `cert-manager`). v0.16.0 requires CloudNativePG >= 1.30 — satisfied above.
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- upstream/cnpg-1.30.0.yaml
- upstream/plugin-barman-cloud-0.16.0.yaml
patches:
- path: patch-controller-manager.yaml
- path: patch-barman-cloud.yaml

View file

@ -0,0 +1,36 @@
# Delta on the vendored Barman Cloud plugin manifest (0.16.0).
#
# Upstream ships the plugin operator with `--log-level=debug`. On this cluster
# nothing scrapes the plugin's logs and siriussec's root filesystem is the
# tightest disk in the estate, so the arg is lowered to `info`. Everything else
# in the release manifest is used verbatim — including the Service annotations
# (`cnpg.io/pluginName`, `cnpg.io/pluginPort`, `cnpg.io/pluginClientSecret`,
# `cnpg.io/pluginServerSecret`) that are the actual CNPG-I registration.
#
# The whole `args` list is restated because strategic merge replaces a container
# `args` list rather than merging it.
apiVersion: apps/v1
kind: Deployment
metadata:
name: barman-cloud
namespace: cnpg-system
spec:
template:
spec:
containers:
- name: barman-cloud
args:
- operator
- --server-cert=/server/tls.crt
- --server-key=/server/tls.key
- --client-cert=/client/tls.crt
- --server-address=:9090
- --leader-elect
- --log-level=info
resources:
requests:
cpu: 50m
memory: 64Mi
limits:
cpu: 500m
memory: 256Mi

File diff suppressed because it is too large Load diff