bitnami / charts

Bitnami Helm Charts
https://bitnami.com
Other
8.76k stars 9.08k forks source link

Pod Labels are not applied to Deployment and PDB matchLabels selector #27974

Closed BiancaRapp closed 1 week ago

BiancaRapp commented 1 month ago

Name and Version

bitnami/matomo 7.3.5

What architecture are you using?

amd64

What steps will reproduce the bug?

Install bitnami/matomo chart with podLabels

Are you using any custom parameters or values?

podLabels:
  app.kubernetes.io/component: app
cronjobs:
  taskScheduler:
    enabled: false
  archive:
    enabled: true
    schedule : 5 * * * *

What is the expected behavior?

Deployment and PDB have:

selector:
  matchLabels: 
    app.kubernetes.io/instance: matomo-dev
    app.kubernetes.io/name: matomo
    app.kubernetes.io/component: app

What do you see instead?

New label is only added to the Pod labels. It's missing in the matchLabels of PDB and deployment:

selector:
  matchLabels: 
    app.kubernetes.io/instance: matomo-dev
    app.kubernetes.io/name: matomo

Additional information

Default label selector of pod disruption budget is not working, when using the archive cron job. PDB selector is then also matching the archive cron job pod.

carrodher commented 1 month ago

Thank you for bringing this issue to our attention. We appreciate your involvement! If you're interested in contributing a solution, we welcome you to create a pull request. The Bitnami team is excited to review your submission and offer feedback. You can find the contributing guidelines here.

Your contribution will greatly benefit the community. Feel free to reach out if you have any questions or need assistance.

danjmccay commented 1 month ago

As a workaround, you can create a pdb using extraDeploy:

pdb:
  create: false

extraDeploy:
  - |
    apiVersion: policy/v1
    kind: PodDisruptionBudget
    metadata:
      name: matomo
    spec:
      minAvailable: 2
      selector:
        matchLabels:
          app.kubernetes.io/component: app
          app.kubernetes.io/instance: matomo
          app.kubernetes.io/name: matomo
github-actions[bot] commented 1 week ago

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

github-actions[bot] commented 1 week ago

Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.