fluent / fluent-operator

Operate Fluent Bit and Fluentd in the Kubernetes way - Previously known as FluentBit Operator
Apache License 2.0
577 stars 246 forks source link

Allow configuring fluent bit daemonset's termination grace period seconds by CRD #1189

Closed MaulinS-Pangea closed 3 months ago

MaulinS-Pangea commented 4 months ago

Is your feature request related to a problem? Please describe.

The fluentbits.fluentbit.fluent.io defines the following attributes:

spec.initContainers[].livenessProbe.terminationGracePeriodSeconds
spec.initContainers[].readinessProbe.terminationGracePeriodSeconds
spec.initContainers[].startupProbe.terminationGracePeriodSeconds
spec.livenessProbe.terminationGracePeriodSeconds
spec.readinessProbe.terminationGracePeriodSeconds

With the following description:

terminationGracePeriodSeconds:
  description: Optional duration in seconds the pod needs to terminate
    gracefully upon probe failure. The grace period is the duration
    in seconds after the processes running in the pod are sent a
    termination signal and the time when the processes are forcibly
    halted with a kill signal. Set this value longer than the expected
    cleanup time for your process. If this value is nil, the pod's
    terminationGracePeriodSeconds will be used. Otherwise, this
    value overrides the value provided by the pod spec. Value must
    be non-negative integer. The value zero indicates stop immediately
    via the kill signal (no opportunity to shut down). This is a
    beta field and requires enabling ProbeTerminationGracePeriod
    feature gate. Minimum value is 1. **spec.terminationGracePeriodSeconds
    is used if unset.**
  format: int64
  type: integer

It says that spec.terminationGracePeriodSeconds is used if unset. However the fluent bit daemonset uses the default terminationGracePeriodSeconds of 30s and spec.terminationGracePeriodSeconds is not a valid property in the CRD.

Describe the solution you'd like

Add spec.terminationGracePeriodSeconds in fluentbits.fluentbit.fluent.io to configure daemonset's termination grace period seconds.

Additional context

No response