Skip to main content

Notification Action

Notification action sends notification.

notify-deployment-restarts.yaml
apiVersion: mission-control.flanksource.com/v1
kind: Playbook
metadata:
name: notify-deployment-restarts
spec:
description: Sends Telegram notification after restarting deployment
components:
- type: KubernetesDeployment
actions:
- name: 'Restart the deployment'
exec:
script: kubectl rollout restart {{.component.name}}
- name: 'Send notification'
notification:
connection: connection://telegram/example
title: 'Deployment restarted successfully'
message: 'Name: "{{.component.name}}"'
FieldDescriptionSchemeRequired
urlShoutrrr URL Read morestring
connectionConnection to use to send the notificationstring
titleTitle of the notificationstringtrue
messageMessage is the body of the notificationstringtrue
propertiesProperties for shoutrrrmap[string]string
note

Either the connection or the url is required.

Templating

The title and the message fields can be templated. The script template receives a environment variable that contain details about the corresponding config, check or component and the parameter(if applicable).

FieldDescriptionSchema
configConfig passed to the playbookConfigItem
componentComponent passed to the playbookComponent
checkCanary Check passed to the playbookCheck
paramsUser provided parameters to the playbookmap[string]string