Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some improvements for the helm chart #45

Merged
merged 1 commit into from May 25, 2022
Merged

some improvements for the helm chart #45

merged 1 commit into from May 25, 2022

Conversation

ghost
Copy link

@ghost ghost commented May 19, 2022

Hello mr-karan,

First of all I want to thank you for creating and maintaining this wonderful tool!

I took the time to customize the Helm chart previously updated by @weibo-zhao.

Currently when deploying, "prod_alerts" and "dev_alerts" are always added to the configuration and initialised in Calert.
You can change the individual values of the provider but you are tied to the names "prod_alerts" and "dev_alerts"

Below I will briefly describe my changes:

  • Added the possibility to create one or more providers and configure the name and each value individually without having to chop everything into a config string (like in "configmap.rooms")
  • Added the possibility to create one or more message templates, which can later be used to send different messages for each provider (using template = "static/.tmpl).
  • Included the option to add annotations to the Calert pod. Just a very small change to use if needed 😀

I am currently struggling with an issue regarding the second change

Let us look at it with the following scenario:
Using my Helm chart, we configured two providers, both using google_chat for notification.

  • Provider1 has been configured to use 'template = "static/message.tmpl"' and send its message without any problems.
  • Provider2 has been configured to use 'template = "static/text.tmpl"' and is getting the following error message
level=error msg="Error parsing values in template" error="template: message.tmpl: \"message.tmpl\" is an incomplete or empty template"
level=error msg="error preparing message" error="template: message.tmpl: \"message.tmpl\" is an incomplete or empty template"

Calert always seems to be expecting a message.tmpl file and cannot process a different name (text.tmpl in this case).
Am i missing something or is this behavior intentional? 🤔

Despite the mentioned issue, the deployment of Calert, the creation of different providers and templates still works!
For now, people using this changes just have to stick to the default template name "message.tmpl" (template = "static/message.tmpl").

I look forward reading your opinion on this PR
Thanks in advance!

@mr-karan
Copy link
Owner

@ChildishSahin Thanks for the PR and detailed explanation of changes, much appreciated.

@weibo-zhao Would you have some time to review this please? 😄 Thanks!

@weibo-zhao
Copy link
Contributor

Dear Mr-karan,

the improvement for helm chart is very nice. We have tested in the production environment and it works fine. You can merge this pull request. @mr-karan

Best regards,
Weibo

@mr-karan mr-karan merged commit e2fdfdb into mr-karan:main May 25, 2022
@mr-karan
Copy link
Owner

Thanks a lot @ChildishSahin @weibo-zhao

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants