inCaller / prometheus_bot

Telegram bot for prometheus alerting
MIT License
394 stars 182 forks source link

Change u configuration by my library gostructor #83

Closed kubitre closed 2 years ago

kubitre commented 2 years ago

Hey! I would like to help you with the configuration, I see that you use global variables in your code and I didn’t really like it. Let me implement the gostructor configuration library into your bot for configuration. It allows you to configure from different sources, including secrets from vault, in the future there will be support for kubernetes secrets

Library place here: https://github.com/goreflect/gostructor

I will be glad to suggestions and comments on my library

kubitre commented 2 years ago

@hryamzik hi =)

hryamzik commented 2 years ago

But what the problem with mounting configuration from kube secrets with the current code?

kubitre commented 2 years ago

No problems with the kuber, you just have a bunch of boilerplate written for configuring, so I actually offer help with that. My Library can take configuration from any sources: files, envs, vault, key\value server and so on. After migrate on my lib you will not need to write any infrastructure code at all to get configurations from any sources

hryamzik commented 2 years ago

I don't see any reasons to add extra dependencies and make code more complicated. That's a potential source of issues and there's no real problem to solve here.