From 9f1b5b8d61f64d94a3a9ce7808ee3617508c8525 Mon Sep 17 00:00:00 2001 From: Darshan Jain Date: Tue, 21 Jul 2026 00:49:17 +0530 Subject: [PATCH] feat: expose command triggers in global krknctl inputs (#1492) Add trigger-* fields to containers/krknctl-input.json so krknctl can pass TRIGGER_* env vars for event-driven chaos preconditions. Related to #1483 Signed-off-by: ddjain Co-authored-by: Cursor --- containers/krknctl-input.json | 66 ++++++++++++++++++++++++++++++++++- 1 file changed, 65 insertions(+), 1 deletion(-) diff --git a/containers/krknctl-input.json b/containers/krknctl-input.json index e5ac889e..58b9e398 100644 --- a/containers/krknctl-input.json +++ b/containers/krknctl-input.json @@ -642,5 +642,69 @@ "required": "false", "mount_path": "/home/krkn/resiliency-file.yaml", "group": "resiliency" + }, + { + "name": "trigger-command", + "short_description": "Trigger command", + "description": "Shell command to evaluate before chaos starts. Chaos begins only after this command exits with the expected code. Leave empty to disable triggers.", + "variable": "TRIGGER_COMMAND", + "type": "string", + "default": "", + "required": "false", + "group": "triggers" + }, + { + "name": "trigger-expected-rc", + "short_description": "Trigger expected exit code", + "description": "Expected shell command exit code for the trigger to be considered satisfied", + "variable": "TRIGGER_EXPECTED_RC", + "type": "number", + "default": "0", + "required": "false", + "group": "triggers" + }, + { + "name": "triggers-mode", + "short_description": "Triggers mode", + "description": "How multiple trigger conditions are combined", + "variable": "TRIGGERS_MODE", + "type": "enum", + "allowed_values": "all_of,any_of", + "separator": ",", + "default": "all_of", + "required": "false", + "group": "triggers" + }, + { + "name": "triggers-timeout", + "short_description": "Triggers timeout", + "description": "Maximum time in seconds to wait for trigger conditions before applying on-timeout behavior", + "variable": "TRIGGERS_TIMEOUT", + "type": "number", + "default": "300", + "required": "false", + "group": "triggers" + }, + { + "name": "triggers-interval", + "short_description": "Triggers polling interval", + "description": "Polling interval in seconds while waiting for trigger conditions", + "variable": "TRIGGERS_INTERVAL", + "type": "number", + "default": "5", + "required": "false", + "group": "triggers" + }, + { + "name": "triggers-on-timeout", + "short_description": "Triggers on timeout", + "description": "Behavior when trigger conditions are not met before timeout", + "variable": "TRIGGERS_ON_TIMEOUT", + "type": "enum", + "allowed_values": "skip,fail,run_anyway", + "separator": ",", + "default": "skip", + "required": "false", + "group": "triggers" } -] \ No newline at end of file +]