Skip to content

RollingUpdate of Pooler stuck due to low number of nodes #1600

@haslersn

Description

@haslersn

postgres-operator version: registry.opensource.zalan.do/acid/postgres-operator:v1.7.0

Introduced in #1464: When using

  • pod_antiaffinity_topology_key: "kubernetes.io/hostname",
  • PostgreSQL cluster with spec.connectionPooler.numberOfInstances: 3,
  • K8s cluster with 3 nodes,

the pooler Deployment cannot be updated. The update strategy is RollingUpdate and it attempts to create a fourth instance before terminating any instance. However, the fourth instance cannot be scheduled due to the antiaffinity.

Possible solution

I see two possible solutions, but maybe there are also other solutions:

  • Add an option to configure the pooler Deployment's spec.strategy.rollingUpdate.maxUnavailable setting.
  • Use preferredDuringSchedulingIgnoredDuringExecution instead of requiredDuringSchedulingIgnoredDuringExecution: for poolers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions