OLM install: let the plugin create its mTLS certificates

Aperta
#1,268 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
47/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
go, kubernetes, postgresql

Direzione di ricerca

Start by locating the plugin's /readyz handler and readiness probe, then trace how it loads the barman-cloud-server-tls and barman-cloud-client-tls secrets. The smaller proposal is done when readiness reports failure if certificate files are missing. The certificate-generation proposal also needs decisions about CA and certificate creation, renewal, and compatibility with existing cert-manager secrets.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

First, thanks for the great work on CloudNativePG and the plugin! We use CloudNativePG in many projects, and it hugely
simplifies our PostgreSQL setups!

We installed the plugin from OperatorHub (v0.16.0, AllNamespaces) next to CloudNativePG 1.30.2 installed the
same way.

After the Subscription everything looks healthy: the CSV is Succeeded and the barman-cloud pod is 1/1 Ready.
But the plugin is not usable. The CNPG operator registers it only after we create barman-cloud-server-tls and
barman-cloud-client-tls ourselves (we used the cert-manager example from the docs). Until then the only signal is a
ServerSecretNotFound warning event on the barman-cloud Service and an error in the CNPG operator log.

Proposal 1: create the certificates when they are missing

When the two secrets do not exist, the plugin creates a CA, a server certificate for the barman-cloud Service and a
client certificate, and renews them before they expire. If the secrets already exist, it leaves them alone, so
cert-manager setups keep working. With this, an OLM install is complete with just a Subscription.

Proposal 2 (smaller): do not report Ready without certificates

If self-generated certificates are not wanted, the pod should not look healthy.

Today the readiness probe is tcpSocket: 9090. That port is open even without certificates.

Possible change: add a check to the existing /readyz endpoint (port 8081, today only a ping) that loads the
certificate files, and use /readyz as the readiness probe.

Environment

  • Kubernetes 1.36, OLM
  • CloudNativePG 1.30.2 and plugin-barman-cloud 0.16.0, both from OperatorHub.io
Lingua principale
Go
Stelle
214
Fork
91
Merge medio
2g 11h
PR unite (30g)
38

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di cloudnative-pg/plugin-barman-cloud

Tutte le issue di cloudnative-pg/plugin-barman-cloud

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.