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

add mailgun and alerting alerting to Redis #257

Merged
merged 1 commit into from
Nov 21, 2023
Merged

Conversation

wejdross
Copy link
Member

@wejdross wejdross commented Nov 7, 2023

Simply adding mailgun alerting and custom Alertmanager configs to Redis

Checklist

  • The PR has a meaningful title. It will be used to auto generate the
    changelog.
    The PR has a meaningful description that sums up the change. It will be
    linked in the changelog.
  • PR contains a single logical change (to build a better changelog).
  • Categorize the PR by adding one of the labels:
    bug, enhancement, documentation, change, breaking, dependency
    as they show up in the changelog.
  • Link this PR to related issues or PRs.

@wejdross wejdross added the enhancement New feature or request label Nov 7, 2023
@@ -509,6 +509,12 @@ local composition =
controlNamespace: params.services.controlNamespace,
restoreSA: 'redisrestoreserviceaccount',
quotasEnabled: std.toString(params.services.vshn.quotasEnabled),
emailAlertingEnabled: std.toString(params.services.vshn.emailAlerting.enabled),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know I start to sound like a broken record in all my reviews, but maybe a function to generate these configs will avoid copy/pasting in the future.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you clarify what exactly you mean? How does a function help here? It's only passing a parameter to the configMap for the xfn container

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have the same emailAlerting* lines repeated over and over for each service. Each time copy pasted, this is bad practice for various reasons:

  • Copy paste errors happen
  • We would need to change all files again if there are changes

If we instead just have a jsonnet function where we pass params.services.vshn.emailAlerting and it returns all those lines, we would make it much less error prone to add a new service with email alerting. The we just need to call the function here and we're done. If there are any changes in the future we'd only have to adjust the function and all services will get the changes.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I understand now. Refactored the code accordingly. Please check again.

Copy link
Contributor

@zugao zugao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some small changes otherwise LGTM

component/class/defaults.yml Outdated Show resolved Hide resolved
component/class/defaults.yml Outdated Show resolved Hide resolved
@TheBigLee TheBigLee force-pushed the redis_user_alerting branch 2 times, most recently from 009cb79 to 08152ce Compare November 21, 2023 10:53
@TheBigLee TheBigLee merged commit a513575 into master Nov 21, 2023
22 checks passed
@TheBigLee TheBigLee deleted the redis_user_alerting branch November 21, 2023 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants