Skip to content

Commit

Permalink
examples notification for CrashLoopBackOff & CronJob failure
Browse files Browse the repository at this point in the history
  • Loading branch information
adityathebe committed Jul 17, 2024
1 parent edd1f3c commit 38503d4
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 0 deletions.
18 changes: 18 additions & 0 deletions mission-control/docs/notifications/examples/kube-job-failing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
title: Kubernetes Job Failing
---

```yaml title="cronjob-alerts.yaml"
---
apiVersion: mission-control.flanksource.com/v1
kind: Notification
metadata:
name: cronjob-alerts
namespace: default
spec:
events:
- config.unhealthy
to:
connection: connection://flanksource-slack
filter: config.type == 'Kubernetes::CronJob'
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
title: PodCrashLooping notification
---

```yaml title="podcrashlooping-alerts.yaml"
---
apiVersion: mission-control.flanksource.com/v1
kind: Notification
metadata:
name: podcrashlooping-alerts
namespace: default
spec:
events:
- config.unhealthy
filter: config.type == 'Kubernetes::Pod' && config.status == 'CrashLoopBackOff'
to:
# use the slack connection as the recipient for this notification
connection: connection://flanksource-slack
```
10 changes: 10 additions & 0 deletions mission-control/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,16 @@ const sidebars = {
type: 'category',
label: 'Examples',
items: [
{
type: 'doc',
id: 'notifications/examples/kube-podcrashlooping',
label: 'PodCrashLooping'
},
{
type: 'doc',
id: 'notifications/examples/kube-job-failing',
label: 'Kubernetes Job Failing'
},
{
type: 'doc',
id: 'notifications/examples/slack',
Expand Down

0 comments on commit 38503d4

Please sign in to comment.