feat: added the steps to install discord-webhook-receiver for k8s anywhere topology if not already installed #50
No reviewers
Labels
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: NationTech/harmony#50
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "feat/discord-webhook-receiver"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Does this even work? I don't see the binding with the ensure_ready impementation of K8sAnywhere.
Overall this needs more clarity and better following Harmony's standards.
@ -41,3 +50,3 @@#[async_trait]impl DiscordWebhookReceiver for K8sAnywhereTopology {fn deploy_discord_webhook_receiver(async fn deploy_discord_webhook_receiver(This should not be called deploy as this will not deploy every time it is called. We use "ensure" for this behavior.
@ -54,2 +87,4 @@}}async fn initialize_discord_webhook_receiver(This function looks really weird, I feel like this is a hack to link the config and the dependency together.
The need to link them makes sense, I guess the webhook sender needs to know the webhook config when it is being deployed. But I am sure there can be a cleaner way than this.
@ -56,0 +98,4 @@let score = DiscordWebhookReceiverScore {config: conf.clone(),};let inventory = Inventory::autoload();autoloading inventory here is a big smell, you should avoid this as much as possible. What if the used built a custom Inventory and now you're autoloading his production inventory and you start wiping operating systems and network configurations?
Always use the inventory that is passed down from the main Maestro.
@ -56,0 +136,4 @@inventory: &Inventory,topology: &T,) -> Result<Outcome, InterpretError> {discord_alert_manager_score(It's a bit weird to use a public raw function like this to initialize a Score, why not just use the usual struct building method?
Well well well... https://promlabs.com/blog/2022/12/23/sending-prometheus-alerts-to-discord-with-alertmanager-v0-25-0/
On n'a plus besoin de discord alert manager maintenant. Ça simplifie énormément la chose!
Pull request closed