rudderlabs / rudderstack-helm

Open-source, warehouse-first Customer Data Pipeline and Segment-alternative. Collects and routes clickstream data and builds your customer data lake on your data warehouse.
MIT License
62 stars 48 forks source link

add wait-for condition for telegraf #48

Closed Thrinadh-Kumpatla closed 2 years ago

Thrinadh-Kumpatla commented 2 years ago

Making sure telegraf comes up before rudder server

Currently there is no wait-for condition on telegraf. This causes rudder server to spin up before telegraf because of which metrics are lost until and unless the rudderserver is restarted. Fixing this issue by adding wait for condition when telegraf sidecar is enabled..

Type of change

Related issues

Fix [#1]()

Checklists

Development

Code review

saurav-malani commented 2 years ago

I tried testing this change:

To test if rudder-server actually waits until telegraf sidecar is ready or not. I simply made this change: telegraf_sidecar: enabled: false with the expectation that telegraf should never come up & since this PR makes rudder-server wait for telegraf to come up. It should also never come up. But, this change throws following error: Error: INSTALLATION FAILED: template: rudderstack/templates/statefulset.yaml:112:81: executing "rudderstack/templates/statefulset.yaml" at <include "statsd.enabled" .>: error calling include: template: rudderstack/templates/_helpers.tpl:108:9: executing "statsd.enabled" at <.Values.telegraf.enabled>: nil pointer evaluating interface {}.enabled

saurav-malani commented 2 years ago

I tested the change, it seems to be working fine. Previous error is fixed. Also, wait-for condition seems to be working fine.