Skip to content

PDB selector values do not match pod labels #240

@joeygrasso

Description

@joeygrasso

Your environment

Chart Version: 1.16.0

Helm Version: v3.18.3

Kubernetes Version: 1.32.4-gke.1698000

What happened?

I enabled PDB using the following:

connect.pdb.enabled: true
connect.pdb.minAvailable: 1

The PodDisruptionBudget resource gets created, but the selector's labels do not match the running pod's labels, so the PDB is ignored.

>> kubectl describe pdb/connect
Name:             connect
Namespace:        default
Max unavailable:  1
Selector:         app.kubernetes.io/component=connect,app.kubernetes.io/instance=connect,app.kubernetes.io/name=connect
Status:
    Allowed disruptions:  0
    Current:              0
    Desired:              0
    Total:                0
Events:
  Type    Reason  Age                  From               Message
  ----    ------  ----                 ----               -------
  Normal  NoPods  10m (x3 over 3h56m)  controllermanager  No matching pods found

What did you expect to happen?

I expect a PDB to be created, and when reviewing the PDB I should see the status update to reflect the following:

>> kubectl describe pdb connect-test
Name:                  connect-test
Namespace:        default
Max unavailable:  1
Selector:         app=connect
Status:
    Allowed disruptions:  1
    Current:              2
    Desired:              1
    Total:                2
Events:                   <none>

Note the selector change and now the status is updated to reflect the matching pods.

Steps to reproduce

  1. Enable PDB
  2. Run Helm upgrade
  3. Review PDB w/ kubectl get pdb connect note that there are no pods.

Notes & Logs

Happy to hop on a call and share more specific details privately.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions