bitnami / charts

Bitnami Helm Charts
https://bitnami.com
Other
9.04k stars 9.22k forks source link

[bitnami/fluent-bit] PodDisruptionBudget/fluent-bit gets created despites we deploy as DaemonSet #30539

Open zentavr opened 1 day ago

zentavr commented 1 day ago

Name and Version

bitnami/fluent-bit 2.3.24

What architecture are you using?

arm64

What steps will reproduce the bug?

  1. Deploy fluent-bit as a DaemonSet (daemonset.enabled: true)
  2. ...see the spamming event like Failed to calculate the number of expected pods: daemonsets.apps does not implement the scale subresource

Are you using any custom parameters or values?

config:
  customParsers: ""
  extraFiles: {}
  filters: |-
    [FILTER]
        Name kubernetes
        Match kube.*
        Merge_Log On
        Keep_Log Off
        Buffer_Size 0
        Kube_Meta_Cache_TTL 300s
        K8S-Logging.Parser On
        K8S-Logging.Exclude On
        Kube_Tag_Prefix    kube.var.lib.docker.containers.
  inputs: |-
    [INPUT]
        Name              tail
        Path              /var/lib/docker/containers/*.log
        Exclude_Path      *.gz,*.zip
        multiline.parser  docker, cri
        DB                /var/log/fluent-bit/flb_kube.db
        Tag               kube.*
        Threaded          true
        Read_From_Head    On
        Refresh_Interval  10
        Rotate_Wait       30
        Mem_Buf_Limit     45MB
        Buffer_Max_Size   66k
        Skip_Long_Lines   On
        Skip_Empty_Lines  On
  outputs: '@INCLUDE /opt/bitnami/fluent-bit/conf/output.conf'
  service: |-
    [SERVICE]
        Daemon            Off
        Flush             1
        Log_Level         info
        Config_Watch      On
        HTTP_Server       On
        HTTP_Listen       0.0.0.0
        HTTP_Port         2020
        Health_Check      On
        Parsers_File      /opt/bitnami/fluent-bit/conf/custom_parsers.conf
daemonset:
  enabled: true
  hostPaths:
    containerLogs: /var/log/containers
    logs: /var/log
    machineId: /etc/machine-id
extraVolumeMounts:
- mountPath: /opt/bitnami/fluent-bit/conf/output.conf
  name: aws-logging
  subPath: output.conf
extraVolumes:
- configMap:
    name: aws-logging
  name: aws-logging
initContainers:
- command:
  - /bin/sh
  - -cx
  - |-
    mkdir -p /var/log/fluent-bit/
    chown -R 1001:1001 /var/log/fluent-bit/
  image: bitnami/os-shell
  imagePullPolicy: IfNotPresent
  name: folder-permission
  resources:
    limits:
      cpu: 100m
      memory: 32Mi
    requests:
      cpu: 50m
      memory: 16Mi
  securityContext:
    runAsUser: 0
    seLinuxOptions: {}
  volumeMounts:
  - mountPath: /var/log
    name: varlog
nodeSelector:
  kubernetes.io/os: linux
rbac:
  create: true
  nodeAccess: true
resources:
  limits:
    cpu: 150m
    memory: 192Mi
  requests:
    cpu: 100m
    memory: 128Mi
serviceAccount:
  automountServiceAccountToken: true
  create: false
  name: aws-logger-sa
tolerations:
- key: CriticalAddonsOnly
  operator: Exists

What is the expected behavior?

PDB is not created

What do you see instead?

PDB is created :/

Additional information

The reason is a typo here: https://github.com/bitnami/charts/blob/e9951e3c9022560eaea85da02882441811e9017f/bitnami/fluent-bit/templates/pdb.yaml#L6

There should be something like this here:

{{- if and .Values.pdb.create (not .Values.daemonset.enabled) }}

...so enabled instead of enable

javsalgar commented 1 day ago

Hi!

Thank you so much for spotting the issue. As you discovered it, would you like to submit a PR with your proposed solution?

zentavr commented 1 day ago

@javsalgar you had renamed the topic, but put the wrong chart name as a prefix :)

javsalgar commented 1 day ago

Fixed