kyma-project / telemetry-manager

Manager for the Kyma telemetry module
https://kyma-project.io/#/telemetry-manager/user/README
Apache License 2.0
5 stars 24 forks source link

Updating the key in a non deployable pipelines leads to broken fluent-bit config #485

Closed rakesh-garimella closed 11 months ago

rakesh-garimella commented 11 months ago

Description

When a secret is updated, then this change should be updated in the fluentbit config only if we the logpipeline using this is deployable.

Currently when there is an update to the secret we update the secret for all the pipelines but the sections configmap is updated only for the deployable pipelines. This causes following error in telemetry operator

{"level":"INFO","timestamp":"2023-10-24T06:20:42Z","caller":"secretref/secret_ref.go:61","message":"Unable to find key 'host' in secret 'mockserver-host'","context":{"controller":"logpipeline","controllerGroup":"telemetry.kyma-project.io","controllerKind":"LogPipeline","LogPipeline":{"name":"logpipeline-http-sample"},"namespace":"","name":"logpipeline-http-sample","reconcileID":"e1afc8f6-9a04-4948-854c-904beb756be3"}}

and following error in fluent-bit

[2023/10/20 07:15:31] [ warn] [read_glob] glob: [/fluent-bit/etc//dynamic/*.conf] no match
[2023/10/20 07:15:31] [error] configuration file contains errors, aborting.

The current behaviour causes broken fluent-bit config and fluent-bit does not start.

Expected result

When a secret is updated then only deployable pipelines should be reconciled.

Actual result

Steps to reproduce

  1. Create a log pipeline that uses secret
  2. Change the secret key from host to host1
rakesh-garimella commented 11 months ago

The bug has been fixed. Now on secret change only deployable pipelines are reconciled and fluentbit config is updated properly