Use cert manager for cnpg's ca

This commit is contained in:
2025-07-16 10:53:00 +02:00
parent 16a8ec69be
commit f6dc7fcfd6
2 changed files with 36 additions and 6 deletions
+34 -4
View File
@@ -1,9 +1,39 @@
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: postgres-cluster-ca
name: postgres-ca
namespace: postgres
spec:
secretName: postgres-cluster-ca
isCA: true
secretTemplate:
labels:
cnpg.io/reload: ""
commonName: postgres-ca
secretName: postgres-ca
privateKey:
algorithm: ECDSA
size: 256
issuerRef:
name: selfsigned
kind: ClusterIssuer
group: cert-manager.io
---
apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
name: postgres-ca
namespace: postgres
spec:
ca:
secretName: postgres-ca
---
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: postgres-replication-cert
namespace: postgres
spec:
secretName: postgres-replication-cert
secretTemplate:
labels:
cnpg.io/reload: ""
@@ -11,6 +41,6 @@ spec:
- client auth
commonName: streaming_replica
issuerRef:
name: selfsigned
kind: ClusterIssuer
name: postgres-ca
kind: Issuer
group: cert-manager.io
+2 -2
View File
@@ -10,8 +10,8 @@ spec:
size: 10Gi
certificates:
clientCASecret: postgres-cert-ca
replicationTLSSecret: postgres-cert-ca
clientCASecret: postgres-ca
replicationTLSSecret: postgres-replication-cert
# this is here because no `Role` crd exsists yet.
# see https://github.com/cloudnative-pg/cloudnative-pg/issues/5341