Skip to content

Limits of cluster resource is not respected by the instance created by it. #2790

Closed

Description

@nitishchauhan0022

Greetings,
The instances created by postgresql.cnpg.io/v1 is not respecting the limits that has been set on the cluster resource.
For Example:

apiVersion: v1
items:
- apiVersion: postgresql.cnpg.io/v1
  kind: Cluster
  metadata:
    annotations:
    creationTimestamp: "2023-06-26T10:52:26Z"
    generation: 4
    labels:
    name: oncall-pgsql
    namespace: postgres
  spec:
    affinity:
      podAntiAffinityType: preferred
      topologyKey: ""
  bootstrap:
      initdb:
        database: oncall
        encoding: UTF8
        localeCType: C
        localeCollate: C
        owner: oncall
    enableSuperuserAccess: true
    failoverDelay: 0
    imageName: ghcr.io/cloudnative-pg/postgresql:15.3
    instances: 2
    logLevel: info
    maxSyncReplicas: 0
    minSyncReplicas: 0
    postgresql:
      parameters:
        archive_mode: "on"
        archive_timeout: 5min
        dynamic_shared_memory_type: posix
        log_destination: csvlog
        log_directory: /controller/log
        log_filename: postgres
        log_rotation_age: "0"
        log_rotation_size: "0"
        log_truncate_on_rotation: "false"
        logging_collector: "on"
        max_parallel_workers: "32"
        max_replication_slots: "32"
        max_worker_processes: "32"
        shared_memory_type: mmap
        shared_preload_libraries: ""
        wal_keep_size: 512MB
        wal_receiver_timeout: 5s
        wal_sender_timeout: 5s
      syncReplicaElectionConstraint:
        enabled: false
    primaryUpdateMethod: restart
    primaryUpdateStrategy: unsupervised
    resources:
      limits:
        memory: 800Mi
      requests:
        cpu: 100m
        memory: 500Mi
    startDelay: 30
    stopDelay: 30
    storage:
      resizeInUseVolumes: true
      size: 2Gi
    switchoverDelay: 40000000

One of the instance created by it, has this limit:
oncall-pgsql-1:

    resources:
      limits:
        cpu: 100m
        memory: 800Mi
      requests:
        cpu: 100m
        memory: 500Mi

oncall-pgsql-2:

    resources:
      limits:
        memory: 800Mi
      requests:
        cpu: 100m
        memory: 500Mi

Activity

  1. self-assigned this
    on Sep 15, 2023
  2. sxd commented on Apr 6, 2024

    @sxd
    Contributor

    Closing this was fixed on #2840 please open a new issue if still happening

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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