feat: implement thin vertical slice of system-generated notifications (#13537)

This commit is contained in:
Danny Kopping
2024-07-08 15:38:50 +02:00
committed by GitHub
parent 10aa32ca08
commit bdd2caf95d
51 changed files with 3686 additions and 50 deletions
+24
View File
@@ -326,6 +326,30 @@ can safely ignore these settings.
Minimum supported version of TLS. Accepted values are "tls10",
"tls11", "tls12" or "tls13".
NOTIFICATIONS OPTIONS:
--notifications-dispatch-timeout duration, $CODER_NOTIFICATIONS_DISPATCH_TIMEOUT (default: 1m0s)
How long to wait while a notification is being sent before giving up.
--notifications-max-send-attempts int, $CODER_NOTIFICATIONS_MAX_SEND_ATTEMPTS (default: 5)
The upper limit of attempts to send a notification.
--notifications-method string, $CODER_NOTIFICATIONS_METHOD (default: smtp)
Which delivery method to use (available options: 'smtp', 'webhook').
NOTIFICATIONS / EMAIL OPTIONS:
--notifications-email-from string, $CODER_NOTIFICATIONS_EMAIL_FROM
The sender's address to use.
--notifications-email-hello string, $CODER_NOTIFICATIONS_EMAIL_HELLO (default: localhost)
The hostname identifying the SMTP server.
--notifications-email-smarthost host:port, $CODER_NOTIFICATIONS_EMAIL_SMARTHOST (default: localhost:587)
The intermediary SMTP host through which emails are sent.
NOTIFICATIONS / WEBHOOK OPTIONS:
--notifications-webhook-endpoint url, $CODER_NOTIFICATIONS_WEBHOOK_ENDPOINT
The endpoint to which to send webhooks.
OAUTH2 / GITHUB OPTIONS:
--oauth2-github-allow-everyone bool, $CODER_OAUTH2_GITHUB_ALLOW_EVERYONE
Allow all logins, setting this option means allowed orgs and teams
+55
View File
@@ -493,3 +493,58 @@ userQuietHoursSchedule:
# compatibility reasons, this will be removed in a future release.
# (default: false, type: bool)
allowWorkspaceRenames: false
notifications:
# Which delivery method to use (available options: 'smtp', 'webhook').
# (default: smtp, type: string)
method: smtp
# How long to wait while a notification is being sent before giving up.
# (default: 1m0s, type: duration)
dispatch-timeout: 1m0s
email:
# The sender's address to use.
# (default: <unset>, type: string)
from: ""
# The intermediary SMTP host through which emails are sent.
# (default: localhost:587, type: host:port)
smarthost: localhost:587
# The hostname identifying the SMTP server.
# (default: localhost, type: string)
hello: localhost
webhook:
# The endpoint to which to send webhooks.
# (default: <unset>, type: url)
hello:
# The upper limit of attempts to send a notification.
# (default: 5, type: int)
max-send-attempts: 5
# The minimum time between retries.
# (default: 5m0s, type: duration)
retry-interval: 5m0s
# The notifications system buffers message updates in memory to ease pressure on
# the database. This option controls how often it synchronizes its state with the
# database. The shorter this value the lower the change of state inconsistency in
# a non-graceful shutdown - but it also increases load on the database. It is
# recommended to keep this option at its default value.
# (default: 2s, type: duration)
store-sync-interval: 2s
# The notifications system buffers message updates in memory to ease pressure on
# the database. This option controls how many updates are kept in memory. The
# lower this value the lower the change of state inconsistency in a non-graceful
# shutdown - but it also increases load on the database. It is recommended to keep
# this option at its default value.
# (default: 50, type: int)
store-sync-buffer-size: 50
# How long a notifier should lease a message. This is effectively how long a
# notification is 'owned' by a notifier, and once this period expires it will be
# available for lease by another notifier. Leasing is important in order for
# multiple running notifiers to not pick the same messages to deliver
# concurrently. This lease period will only expire if a notifier shuts down
# ungracefully; a dispatch of the notification releases the lease.
# (default: 2m0s, type: duration)
lease-period: 2m0s
# How many notifications a notifier should lease per fetch interval.
# (default: 20, type: int)
lease-count: 20
# How often to query the database for queued notifications.
# (default: 15s, type: duration)
fetch-interval: 15s