Skip to content

No additionalVolumes mounted when targetContainers is an empty list #1459

@stephan2012

Description

@stephan2012
  • Which image of the operator are you using? registry.opensource.zalan.do/acid/postgres-operator:v1.6.2
  • Where do you run it - cloud or metal? Kubernetes or OpenShift? Bare Metal K8s (kubeadm)
  • Are you running Postgres Operator in production? yes
  • Type of issue? [Bug report, question, feature request, etc.] Documentation/actual behavior mismatch

For additionalVolumes in the postgres manifest, the docs state:

If targetContainers is empty, additional volumes will be mounted only in the postgres container.

This currently is correct only if you set null for empty. Assigning an empty list ([]) (as I did initially) causes the operator not to mount the volume to the postgres container (but still adds it to volumes).

So, either the code does not show the desired behavior or the docs need an update. IMHO, taking an empty list as empty besides null makes sense.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions