zalando / postgres-operator

Postgres operator creates and manages PostgreSQL clusters running in Kubernetes
https://postgres-operator.readthedocs.io/
MIT License
4.35k stars 980 forks source link

disable WAL archiving not work as indicated on administrator.md guide #2372

Open mug3n451 opened 1 year ago

mug3n451 commented 1 year ago

From the doc Or you want to disable WAL archiving for a certain cluster by setting WAL_S3_BUCKET, WAL_GS_BUCKET or AZURE_STORAGE_ACCOUNT to an empty string.

My postgresql-cluster manifest:

apiVersion: "acid.zalan.do/v1"
kind: "postgresql"
metadata:
  name: "cl1-postgresql"
  namespace: "infra"
  labels:
    team: cl1
spec:
  env:
  - name: wal_s3_bucket
    value: ""
  dockerImage: ghcr.io/zalando/spilo-15:3.0-p1
  teamId: "cl1"
  postgresql:
    version: "12"
  numberOfInstances: 3
  volume:
    size: "20G"
    storageClass: "gp2"
  users:
    {}
  databases:
    {}
  resources:
    limits:
      cpu: 500m
      memory: 500Mi
    requests:
      cpu: 10m
      memory: 100Mi
  patroni:
    initdb:
      encoding: "UTF-8"
      locale: "en_US.UTF-8"
      data-checksums: "true"
    ttl: 30
    loop_wait: &loop_wait 10

I expect that WAL archive is disabled but it works and creates files in the local data filesystem under pg_wal directory.

PGPAWAN commented 1 year ago

To disable the archive mode, you have provide empty value in postgresql-operator-default-configuration.yaml file. https://github.com/zalando/postgres-operator/blob/master/manifests/postgresql-operator-default-configuration.yaml#L154

mug3n451 commented 1 year ago

is it the same if i set that value in the operator's values.yaml? Or i must use the postgresql-operator-default-configuration.yaml? thanks

PGPAWAN commented 1 year ago

Not sure, about operator's values.yaml but it will definitely work when you hv empty value in postgresql-operator-default-configuration.yaml.