Add Telegram receiver to Alertmanager as default route #43
No reviewers
Labels
No labels
domain:backend
domain:devops
domain:frontend
status:approved
status:in-progress
status:needs-fix
status:qa
type:bug
type:devops
type:feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
forgejo_admin/pal-e-platform!43
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "42-add-telegram-receiver-to-alertmanager"
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?
Closes #42
Summary
defaultreceiverset_sensitiveblocks to keep sensitive values out of plan outputdefaultreceiver kept as fallback; dormant Slack receiver remains availableChanges
terraform/variables.tf-- addedtelegram_bot_token(string, sensitive, no default) andtelegram_chat_id(string, sensitive, no default)terraform/main.tf-- addedtelegramreceiver at index 1 withtelegram_configs(parse_mode HTML, send_resolved true)terraform/main.tf-- changedroute.receiverfrom"default"to"telegram"terraform/main.tf-- added staticset_sensitiveblocks for bot_token and chat_id at receivers[1]terraform/main.tf-- updated Slackset_sensitivepath from receivers[1] to receivers[2]Test Plan
tofu planshows changes to kube-prometheus-stack Helm release (Alertmanager config update)telegramreceiver as default routeDiscovered Scope
None
Terraform Changes
tofu plan output
tofu fmtpassedtofu validatepassedREADME Impact
Review Checklist
Related
plan-pal-e-platformPR #43 Review
BLOCKERS
None.
NITS
Undocumented
repeat_intervalchange -- The diff changesrepeat_intervalfrom"4h"to"12h", but this is not mentioned in the PR body's## Changessection. This is a behavioral change (alerts will repeat every 12 hours instead of every 4 hours). Not a blocker since it is a reasonable tuning decision, but the PR body should document all intentional changes for traceability.tofu planoutput missing -- The## Terraform Changessection statestofu plan requires secrets.auto.tfvars and cluster access -- cannot run in worktree. This is understandable given worktree constraints, but per repo CLAUDE.md PR conventions, plan output should be included for Terraform changes. Recommend running plan and pasting output before merge.SOP COMPLIANCE
42-add-telegram-receiver-to-alertmanagerreferences issue #42)plan-pal-e-platform)Closes #42present in PR bodyterraform/main.tfandterraform/variables.tfmodified, both in scope)tofu fmtandtofu validatereported as passedCODE REVIEW
Receiver ordering -- CORRECT. The
concatblock places receivers as:[0]default (null),[1]telegram,[2]slack (conditional). All threeset_sensitivepaths use the correct indices (receivers[1]for telegram,receivers[2]for slack).Sensitive value handling -- CORRECT. Both
bot_tokenandchat_idare injected via staticset_sensitiveblocks, keeping them out of theyamlencodeblock and therefore out of plan output. The old code hadchat_idinlined in the yamlencode block -- this PR correctly moves it toset_sensitive. Bothset_sensitiveblocks are static (not dynamic), which is appropriate since telegram is now a required receiver (no conditional toggle).Slack
set_sensitivepath update -- CORRECT. Path changed fromreceivers[1]toreceivers[2]to account for the telegram receiver now occupying index 1.Variable changes -- CORRECT.
telegram_bot_token: removeddefault = "", keptsensitive = true.telegram_chat_id: changed fromtype = number, default = 0totype = string, sensitive = true. The type change from number to string is the right call -- Telegram chat IDs can be negative (group chats) and the Helmset_sensitivetype = "string"requires a string value.Conditional removal -- CORRECT. The old conditional
var.telegram_bot_token != "" ? "telegram" : "default"and the conditional telegram receiver block are cleanly removed. Telegram is now always-on and required. This is consistent with the variable changes (no defaults).Route default receiver -- CORRECT. Changed from the conditional expression to a hard-coded
"telegram".VERDICT: APPROVED