Description
Overview
I'm trying to enable instrumentation instead of pgmonitor inside a cluster that only use S3 bucket as repo for pgbackuprest.
Pods are unable to start due to logrotate-config's key missing inside the associated config map.
I notice, there is not the same condition to setup collector to use logrotate configuration than added it to the config map.
Use logrotate-config map ( didn't check if repo.volume is setup ):
postgres-operator/internal/controller/postgrescluster/instance.go
Lines 1224 to 1226 in 861fac3
Add logroate-config to config map ( check if repo.volume is setup ) :
postgres-operator/internal/controller/postgrescluster/instance.go
Lines 1438 to 1441 in 861fac3
Environment
Please provide the following details:
- Platform: EKS
- Platform Version: 1.31.5
- PGO Image Tag: ubi9-5.8.2-0
- Postgres Version: 17
Steps to Reproduce
REPRO
Create a new cluster with instrumentation enable and a pgbackrest configuration's repo that not use volumes directive ( using s3 or something else )
EXPECTED
Be able to start cluster with pgbackuprest enable without using a repo setup has volume and instrumentation enable.
Additional Information
Postgres cluster's manifest
apiVersion: postgres-operator.crunchydata.com/v1beta1
kind: PostgresCluster
metadata:
name: pg
namespace: pg
spec:
backups:
pgbackrest:
configuration:
- secret:
name: XXXX
global:
repo1-path: /pgbackrest/repo1
repo1-retention-full: "15"
image: registry.developers.crunchydata.com/crunchydata/crunchy-pgbackrest:ubi8-2.54.1-0
repos:
- name: repo1
s3:
bucket: XXX
endpoint: XXX
region: XXX
schedules:
full: 0 5 * * 6
incremental: 0 */4 * * 0-5
image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi9-17.5-3.5-2520
instances:
dataVolumeClaimSpec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 60Gi
name: pgha1
replicas: 2
instrumentation:
logs:
retentionPeriod: 2d
port: 5432
postgresVersion: 17
shutdown: false