mirror of
https://github.com/containrrr/watchtower.git
synced 2025-12-13 21:56:38 +01:00
Add support for Gotify notifications (#346)
This adds support for Gotify (https://gotify.net) notifications. Work items: * Two flags have been added to internal/flags/flags.go: "notification-gotify-url" and "notification-gotify-token". * A Gotify notification driver has been added in notifications/gotify.go. * "gotify" has been added to notification driver choices in notifications/notifier.go. * Docs have been updated
This commit is contained in:
parent
d744b5ddf7
commit
dff16dc639
4 changed files with 131 additions and 2 deletions
|
|
@ -98,7 +98,7 @@ func RegisterNotificationFlags(rootCmd *cobra.Command) {
|
|||
"notifications",
|
||||
"n",
|
||||
viper.GetStringSlice("WATCHTOWER_NOTIFICATIONS"),
|
||||
" notification types to send (valid: email, slack, msteams")
|
||||
" notification types to send (valid: email, slack, msteams, gotify)")
|
||||
|
||||
flags.StringP(
|
||||
"notifications-level",
|
||||
|
|
@ -192,6 +192,17 @@ Should only be used for testing.
|
|||
"",
|
||||
viper.GetBool("WATCHTOWER_NOTIFICATION_MSTEAMS_USE_LOG_DATA"),
|
||||
"The MSTeams notifier will try to extract log entry fields as MSTeams message facts")
|
||||
|
||||
flags.StringP(
|
||||
"notification-gotify-url",
|
||||
"",
|
||||
viper.GetString("WATCHTOWER_NOTIFICATION_GOTIFY_URL"),
|
||||
"The Gotify URL to send notifications to")
|
||||
flags.StringP(
|
||||
"notification-gotify-token",
|
||||
"",
|
||||
viper.GetString("WATCHTOWER_NOTIFICATION_GOTIFY_TOKEN"),
|
||||
"The Gotify Application required to query the Gotify API")
|
||||
}
|
||||
|
||||
// SetDefaults provides default values for environment variables
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue