Skip to content

Commit a546c08

Browse files
committed
COMPINFRA-4866: restrict alert_after values for tron/k8s
1 parent 7d7381c commit a546c08

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

docs/source/yelpsoa_configs.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1012,7 +1012,7 @@ Here is a list of options that PaaSTA will pass through:
10121012

10131013
* ``alert_after``: Time string that represents how long a a check should be
10141014
failing before an actual alert should be fired. Currently defaults to ``10m``
1015-
for the replication alert.
1015+
for the replication alert. See `pysensu-yelp documentation<https://pysensu-yelp.readthedocs.io/en/latest/#pysensu_yelp.human_to_seconds>` for accepted formats.
10161016

10171017
* ``realert_every``: An integer (not a time unit) representing how many checks
10181018
to execute between sending alerts. The default settings is ``-1``, which is

paasta_tools/cli/schemas/kubernetes_schema.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,11 @@
502502
},
503503
"page": {
504504
"type": "boolean"
505+
},
506+
"alert_after": {
507+
"type": "string",
508+
"pattern": "^[1-9]+[0-9]*[YMWDhms]$",
509+
"$comment": "See https://pysensu-yelp.readthedocs.io/en/latest/#pysensu_yelp.human_to_seconds"
505510
}
506511
},
507512
"additionalProperties": true

paasta_tools/cli/schemas/tron_schema.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,9 @@
622622
"type": "string"
623623
},
624624
"alert_after": {
625-
"type": "string"
625+
"type": "string",
626+
"pattern": "^[1-9]+[0-9]*[YMWDhms]$",
627+
"$comment": "See https://pysensu-yelp.readthedocs.io/en/latest/#pysensu_yelp.human_to_seconds"
626628
},
627629
"check_that_every_day_has_a_successful_run": {
628630
"type": "boolean"

0 commit comments

Comments
 (0)