-
Notifications
You must be signed in to change notification settings - Fork 0
feat(observability): restore Flux reconciliation alerts #110
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
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
321721c
test(observability): require Flux reconciliation alerts
devantler 5a57604
feat(observability): restore Flux reconciliation alerts
devantler 6f69aeb
fix: harden Flux reconciliation alerts
devantler 68c42e2
fix: match Flux dependency wait events
devantler File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
18 changes: 18 additions & 0 deletions
18
...s/hetzner/infrastructure-controllers-coroot/flux-notifications/alert-dependency-wait.yaml
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| # Dependency waits are info events in Flux. Match only their message shape so | ||
| # other successful or routine info events do not create operator noise. | ||
| apiVersion: notification.toolkit.fluxcd.io/v1beta3 | ||
| kind: Alert | ||
| metadata: | ||
| name: platform-dependency-wait | ||
| namespace: flux-system | ||
| spec: | ||
| providerRef: | ||
| name: slack | ||
| eventSeverity: info | ||
| eventSources: | ||
| - kind: Kustomization | ||
| name: "*" | ||
| inclusionList: | ||
| - ".*Dependencies do not meet ready condition.*" | ||
| eventMetadata: | ||
| summary: "Flux dependency wait — production platform" |
17 changes: 17 additions & 0 deletions
17
k8s/providers/hetzner/infrastructure-controllers-coroot/flux-notifications/alert.yaml
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| # Coroot sees workload health, but it cannot observe failed Flux builds, | ||
| # applies, or health checks. Error events cover those failure classes without | ||
| # introducing another polling workload. | ||
| apiVersion: notification.toolkit.fluxcd.io/v1beta3 | ||
| kind: Alert | ||
| metadata: | ||
| name: platform-reconciliation | ||
| namespace: flux-system | ||
| spec: | ||
| providerRef: | ||
| name: slack | ||
| eventSeverity: error | ||
| eventSources: | ||
| - kind: Kustomization | ||
| name: "*" | ||
|
devantler marked this conversation as resolved.
|
||
| eventMetadata: | ||
| summary: "Flux reconciliation error — production platform" | ||
8 changes: 8 additions & 0 deletions
8
...providers/hetzner/infrastructure-controllers-coroot/flux-notifications/kustomization.yaml
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| --- | ||
| apiVersion: kustomize.config.k8s.io/v1beta1 | ||
| kind: Kustomization | ||
| resources: | ||
| - secret.yaml | ||
| - provider.yaml | ||
| - alert.yaml | ||
| - alert-dependency-wait.yaml |
11 changes: 11 additions & 0 deletions
11
k8s/providers/hetzner/infrastructure-controllers-coroot/flux-notifications/provider.yaml
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # notification-controller is already enabled by the shared Flux installation; | ||
| # this provider only connects it to the production Coroot webhook input. | ||
| apiVersion: notification.toolkit.fluxcd.io/v1beta3 | ||
| kind: Provider | ||
| metadata: | ||
| name: slack | ||
| namespace: flux-system | ||
| spec: | ||
| type: slack | ||
| secretRef: | ||
| name: slack-webhook |
11 changes: 11 additions & 0 deletions
11
k8s/providers/hetzner/infrastructure-controllers-coroot/flux-notifications/secret.yaml
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # Reuse the Coroot incident webhook so Flux reconciliation errors reach the | ||
| # same operator channel without another secret to provision. The placeholder | ||
| # keeps static validation usable when an instance has not decrypted its input. | ||
| apiVersion: v1 | ||
| kind: Secret | ||
| metadata: | ||
| name: slack-webhook | ||
| namespace: flux-system | ||
| type: Opaque | ||
| stringData: | ||
| address: ${alertmanager_webhook_url:=https://example.invalid/no-slack-configured} |
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
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
24 changes: 24 additions & 0 deletions
24
k8s/providers/hetzner/infrastructure-coroot/patches/retain-helm-release-alert.yaml
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| - op: test | ||
| path: /spec/groups/3/name | ||
| value: flux | ||
| - op: test | ||
| path: /spec/groups/3/rules/0/alert | ||
| value: FluxKustomizationNotReady | ||
| - op: test | ||
| path: /spec/groups/3/rules/0/expr | ||
| value: | | ||
| gotk_reconcile_condition{type="Ready",status="False", | ||
| kind=~"Kustomization|HelmRelease"} == 1 | ||
| - op: replace | ||
| path: /spec/groups/3/rules/0/alert | ||
| value: FluxHelmReleaseNotReady | ||
| - op: replace | ||
| path: /spec/groups/3/rules/0/expr | ||
| value: | | ||
| gotk_reconcile_condition{type="Ready",status="False",kind="HelmRelease"} == 1 | ||
| - op: replace | ||
| path: /spec/groups/3/rules/0/annotations/summary | ||
| value: "Flux HelmRelease {{ $labels.namespace }}/{{ $labels.name }} not Ready" | ||
| - op: replace | ||
| path: /spec/groups/3/rules/0/annotations/description | ||
| value: "kubectl describe HelmRelease -n {{ $labels.namespace }} {{ $labels.name }}" |
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.