feat: add vector-cron-sink for scheduled cron task output
Scheduled cron task output previously reached only the `dokku` user's cron mail, and could not be redirected because `app.json` rejects bare shell operators in a cron `command`. Setting `vector-cron-sink` on an app or globally routes that output to a dedicated sink instead, on both the `docker-local` and `k3s` schedulers, which keeps log destinations under operator control rather than in a deployed repository. Cron events carry `dokku_app` and `dokku_cron_id` fields so a sink can give each task its own destination. This also fixes a `k3s` bug where configuring a global `vector-sink` silently removed the vector prometheus exporter sink.
This commit is contained in:
@@ -78,8 +78,9 @@ func CommandSet(appName string, property string, value string) error {
|
||||
common.CommandPropertySet("logs", appName, property, value, DefaultProperties, GlobalProperties)
|
||||
|
||||
vectorProperties := map[string]bool{
|
||||
"app-label-alias": true,
|
||||
"vector-sink": true,
|
||||
"app-label-alias": true,
|
||||
"vector-cron-sink": true,
|
||||
"vector-sink": true,
|
||||
}
|
||||
|
||||
if _, ok := vectorProperties[property]; ok {
|
||||
|
||||
Reference in New Issue
Block a user