feat: add discord alerting for dependabot pull requests - #54
Open
xnoto wants to merge 1 commit into
Open
Conversation
- GrafanaContactPoint (discord) resolves its webhook URL from the SOPS-encrypted discord-webhook Secret via valuesFrom - GrafanaNotificationPolicy routes the whole policy tree to it - GrafanaServiceAccount (github-actions-alerts, Editor) mints the token used by GitHub Actions to post alerts; stored in grafana-alerts-token
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Grafana-side of the Dependabot PR alerting pipeline, fully managed as code via grafana-operator CRs:
contactpoint-discord.yamlGrafanaContactPoint(discord); webhook URL resolved from SOPS-encrypteddiscord-webhookSecret viavaluesFrom(keytoken, matches.sops.yamlencrypted_regex)notificationpolicy.yamlGrafanaNotificationPolicy— root route → discord. Owns the entire policy tree; extendroute.routesfor future alert sourcesserviceaccount-alerts.yamlGrafanaServiceAccount(github-actions-alerts, Editor); operator mints the token into thegrafana-alerts-tokenSecret (keytoken)discord-webhook-secret.yamlkustomization.yaml,ksops-grafana-secrets.yamlAfter sync
Copy the generated token into
tfroot-github/secrets/secrets.yamlasgrafana_alerts_token(needed by the stacked tfroot-github PR):If alert POSTs return 403, recreate the service account CR with
role: Admin.Merge order
Second, after shared-workflows#14. ArgoCD syncs on merge; contact point/policy/service account appear in Grafana automatically.
Validation
pre-commit run: check-yaml, kube-linter, gitleaks pass.kustomize buildnot run locally: the ksops generator requires the age private key; ArgoCD performs the build with its own key.