chore: add Grafana alerts service account token - #16
Merged
Conversation
- gh-dependabot.tf also manages .github/workflows/dependabot-notify.yml in every active repo, calling the shared-workflows reusable workflow only when the pull_request actor is dependabot[bot] - distribute CLOUDFLARE_AUTH_CLIENT_* to all active repos (new active_github_repositories local; archived repos cannot receive secrets) - add GRAFANA_ALERTS_TOKEN with a documented placeholder until the operator-generated token is copied from the cluster secret
Operator-generated token from the GrafanaServiceAccount CR in kustomize-cluster (grafana-alerts-token secret), copied via kubectl + sops set. Replaces the placeholder distributed by #15.
OpenTofu Plan |
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
Adds
grafana_alerts_tokento the SOPS secrets — the operator-generated token minted by theGrafanaServiceAccountCR (kustomize-cluster#54), retrieved from the cluster and written viasops set. Replaces the placeholder distributed by #15.On apply,
GRAFANA_ALERTS_TOKENbecomes functional in all 11 active repos and the Dependabot PR alerting pipeline goes end-to-end:Dependabot PR → caller workflow → shared-workflows reusable workflow → Cloudflare Access app → Grafana Alertmanager → Discord.
Validation
make testhooks pass at commit.grafanacontactpoint/discord,grafananotificationpolicy/root-discord,grafanaserviceaccount/github-actions-alerts,secret/grafana-alerts-token,secret/discord-webhook.After merge
End-to-end test:
@dependabot recreateon cflan#9 → expect a Discord message within a minute of the reopened PR.