Description:
When I create a cluster using operator image docker.io/percona/percona-postgresql-operator:2.5.0 and the example cluster configuration from percona-postgresql-operator/deploy/cr.yaml at b1a4a9dec1779643f1144622a418caa22c340b92 · percona/percona-postgresql-operator · GitHub
The users do not get created
Steps to Reproduce:
- Operator installed by helm via flux:
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: percona-postgres-operator
namespace: flux-system
spec:
chart:
spec:
chart: pg-operator
reconcileStrategy: ChartVersion
sourceRef:
kind: HelmRepository
name: percona
namespace: flux-system
version: '*'
interval: 1h0m0s
releaseName: postgres-operator
targetNamespace: postgres
install:
crds: Create
createNamespace: true
upgrade:
crds: CreateReplace
values:
logLevel: "DEBUG"
- Download cluster defintion and uncomment users section
vi cr.yaml```
3. Apply the cluster definition:
```kubectl -n postgres apply -f cr.yaml```
4. Check for rhino secret
k8sadmin@image-builder:~$ kubectl -n postgres get secret
NAME TYPE DATA AGE
aws-pgbackrest-secret Opaque 1 17m
cluster1-cluster-ca-cert Opaque 2 2m6s
cluster1-cluster-cert Opaque 3 8m52s
cluster1-instance1-b2wm-certs Opaque 6 8m52s
cluster1-instance1-ps6c-certs Opaque 6 8m52s
cluster1-instance1-wkh6-certs Opaque 6 8m52s
cluster1-pgbackrest Opaque 5 8m51s
cluster1-pgbouncer Opaque 6 8m51s
cluster1-pguser-cluster1 Opaque 12 8m52s
cluster1-replication-cert Opaque 3 8m52s
rhino-credentials Opaque 12 2m5s
6. Check for presence of database zoo and user rhino
kp exec -it cluster1-instance1-b2wm-0 – psql
Defaulted container “database” out of: database, replication-cert-copy, pgbackrest, pgbackrest-config, postgres-startup (init), nss-wrapper-init (init)
psql (16.6 - Percona Distribution)
Type “help” for help.
postgres=# \l
List of databases
Name | Owner | Encoding | Locale Provider | Collate | Ctype | ICU Locale | ICU Rules | Access privileges
-----------±---------±---------±----------------±------------±------------±-----------±----------±----------------------
postgres | postgres | UTF8 | libc | en_US.utf-8 | en_US.utf-8 | | |
template0 | postgres | UTF8 | libc | en_US.utf-8 | en_US.utf-8 | | | =c/postgres +
| | | | | | | | postgres=CTc/postgres
template1 | postgres | UTF8 | libc | en_US.utf-8 | en_US.utf-8 | | | =c/postgres +
| | | | | | | | postgres=CTc/postgres
(3 rows)
postgres=# \du
List of roles
Role name | Attributes
--------------±-----------------------------------------------------------
_crunchyrepl | Replication
postgres | Superuser, Create role, Create DB, Replication, Bypass RLS
postgres=#
## Version:
[Insert the version number of the software]
## Logs:
[If applicable, include any relevant log files or error messages]
## Expected Result:
[What the user expected to see or happen before the issue occurred]
I would have expected to see the user and database present in postgres
## Actual Result:
[What actually happened when the user encountered the issue]
User and database not present in postgres
## Additional Information:
[Include any additional information that could be helpful to diagnose the issue, such as browser or device information]