Skip to content

[Bug]: pooler bootstrap-controller setting resources to {} #8393

@chris-gooch

Description

@chris-gooch

Is there an existing issue already for this bug?

  • I have searched for an existing issue, and could not find anything. I believe this is a new bug.

I have read the troubleshooting guide

  • I have read the troubleshooting guide and I think this is a new bug.

I am running a supported version of CloudNativePG

  • I have read the troubleshooting guide and I think this is a new bug.

Contact Details

chris.gooch@hotmail.co.uk

Version

1.27 (latest patch)

What version of Kubernetes are you using?

1.31

What is your Kubernetes environment?

Cloud: Amazon EKS

How did you install the operator?

Helm

What happened?

As per #7822 and #7922 this issue should be fixed.
However, in our environment it has caused a regression, and the generated deployment is now setting the pooler bootstrap-controller resources to {} causing excessive resources to be wasted when the pods schedule.
My earlier workaround of forcing the bootstrap-controller resources in the pooler manifest also no longer works.

pooler manifest example:

apiVersion: postgresql.cnpg.io/v1
kind: Pooler
metadata:
  name: pooler-ro
spec:
  cluster:
    name: cluster
  instances: 2
  type: ro
  serviceTemplate:
    spec:
      type: LoadBalancer
      loadBalancerClass: service.k8s.aws/nlb
  template:
    spec:
      initContainers:
        - name: bootstrap-controller
          resources:
            limits:
              cpu: "1"
              memory: 100Mi
            requests:
              cpu: 2m
              memory: 30Mi
      containers:
        - name: pgbouncer
          resources:
            requests:
              cpu: 2m
              memory: 30Mi
            limits:
              cpu: "1"
              memory: 100Mi

v1.27.0 generated deployment example:

initContainers:
- command:
  - /manager
  - bootstrap
  - /controller/manager
  image: ghcr.io/cloudnative-pg/cloudnative-pg:1.27.0
  imagePullPolicy: IfNotPresent
  name: bootstrap-controller
  resources: {}
  securityContext:
    allowPrivilegeEscalation: false
    capabilities:
      drop:
      - ALL
    privileged: false
    readOnlyRootFilesystem: true
    runAsNonRoot: true
    seccompProfile:
      type: RuntimeDefault

v1.26.0 generated deployment example:

initContainers:
- command:
  - /manager
  - bootstrap
  - /controller/manager
  image: ghcr.io/cloudnative-pg/cloudnative-pg:1.26.0
  imagePullPolicy: IfNotPresent
  name: bootstrap-controller
  resources:
   limits:
    cpu: "1"
    memory: 100Mi
   requests:
    cpu: 2m
    memory: 30Mi
  securityContext:
    allowPrivilegeEscalation: false
    capabilities:
      drop:
      - ALL
    privileged: false
    readOnlyRootFilesystem: true
    runAsNonRoot: true
    seccompProfile:
      type: RuntimeDefault

Cluster resource

Relevant log output

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

Labels

bug 🐛Something isn't working

Type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions