percona / percona/percona-postgresql-operator
`pgo-root-cacert` secret shared across `PerconaPGCluster` installations ?
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 385
- Forks
- 83
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 39
Description
About the context:
In a single namespace named postgres, i have two PerconaPGCluster CR which created two different Postgres databases named archive and analytics
I did not specify any certificates in the CR, so that Postgres Operator generates them automatically
My Postgres Operator runs cluster wide in a namespace named postgres-operator
Observations:
All secrets created by the Operator in namespace postgres are prefixed with each cluster name. But there is a secret pgo-root-cacert which is not prefixed, and which contains two Owner references (might have been added by Kapp deployer)
I am not sure if this is a problem, or if that means that both Postgres clusters share the same certificates, or if that simply means that cluster certificates are different but simply signed by the same CA
NAME TYPE DATA AGE
analytics-analytics-hcdj-certs Opaque 4 13h
analytics-cluster-cert Opaque 3 13h
analytics-pgbackrest Opaque 1 13h
analytics-pgbouncer Opaque 6 13h
analytics-pguser-cocolis-analytics Opaque 12 13h
analytics-replication-cert Opaque 3 13h
archive-archive-mww4-certs Opaque 4 2m2s
archive-cluster-cert Opaque 3 2m2s
archive-pgbackrest Opaque 1 2m3s
archive-pgbouncer Opaque 6 2m1s
archive-pguser-cocolis-archive Opaque 12 2m2s
archive-replication-cert Opaque 3 2m3s
pgo-root-cacert Opaque 2 13h <- here
[alex@adell] k8s $ kubectl -n postgres get secret/pgo-root-cacert -o yaml
apiVersion: v1
data:
root.crt: blabla==
root.key: blabla=
kind: Secret
metadata:
creationTimestamp: "2023-11-27T21:09:39Z"
name: pgo-root-cacert
namespace: postgres
ownerReferences:
- apiVersion: postgres-operator.crunchydata.com/v1beta1
kind: PostgresCluster
name: analytics <- here
uid: d0398d46-b70c-49bb-950c-75c98b6cb92c
- apiVersion: postgres-operator.crunchydata.com/v1beta1
kind: PostgresCluster
name: archive <- here
uid: 70bc1488-aeb1-421c-b36b-5670025f21f5
resourceVersion: "3699654823"
uid: 268a0f49-aef4-416f-958d-23efa9fef550
type: Opaque
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the setup in the issue with two PerconaPGCluster resources in one namespace and inspect the generated pgo-root-cacert Secret and its ownerReferences using the shown kubectl commands. Determine whether the clusters share a CA or certificates, and whether that behavior is expected; done means the certificate ownership and sharing behavior is documented or corrected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kubernetes, postgres
- Domain
- databases, infrastructure, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100