|
10 | 10 | * `concurrency`: The plugin worker number, i.e., how many custom plugins will be invoked concurrently.
|
11 | 11 | * `enable_message_change_based_condition_update`: Flag controls whether message change should result in a condition update.
|
12 | 12 | * `skip_initial_status`: Flag controls whether condition will be emitted during plugin initialization.
|
| 13 | + |
| 14 | +### Annotated Plugin Configuration Example |
| 15 | + |
| 16 | +``` |
| 17 | +{ |
| 18 | + "plugin": "custom", |
| 19 | + "pluginConfig": { |
| 20 | + "invoke_interval": "30s", |
| 21 | + "timeout": "5s", |
| 22 | + "max_output_length": 80, |
| 23 | + "concurrency": 3, |
| 24 | + "enable_message_change_based_condition_update": false |
| 25 | + }, |
| 26 | + "source": "ntp-custom-plugin-monitor", |
| 27 | + "metricsReporting": true, |
| 28 | + "conditions": [ |
| 29 | + { |
| 30 | + "type": "NTPProblem", |
| 31 | + "reason": "NTPIsUp", // This is the default reason shown when healthy |
| 32 | + "message": "ntp service is up" // This is the default message shown when healthy |
| 33 | + } |
| 34 | + ], |
| 35 | + "rules": [ |
| 36 | + { |
| 37 | + "type": "temporary", // These are not shown unless there's an |
| 38 | + // event so they always relate to a problem. |
| 39 | + // There are no defaults since there is nothing |
| 40 | + // to show unless there's a problem. |
| 41 | + "reason": "NTPIsDown", // This is the reason shown for this event |
| 42 | + // and the message shown comes from stdout. |
| 43 | + "path": "./config/plugin/check_ntp.sh", |
| 44 | + "timeout": "3s" |
| 45 | + }, |
| 46 | + { |
| 47 | + "type": "permanent", // These are permanent and are shown in the Conditions section |
| 48 | + // when running `kubectl describe node ...` |
| 49 | + // They have default values shown above in the conditions section |
| 50 | + // and also a reason for each specific trigger listed in this rules section. |
| 51 | + // Message will come from default for healthy times |
| 52 | + // and during unhealthy time message comes from stdout of the check. |
| 53 | + |
| 54 | + "condition": "NTPProblem", // This is the key to connect to the corresponding condition listed above |
| 55 | + "reason": "NTPIsDown", // and the reason shown for failures detected in this rule |
| 56 | + // and message will be from stdout of the check. |
| 57 | + "path": "./config/plugin/check_ntp.sh", |
| 58 | + "timeout": "3s" |
| 59 | + } |
| 60 | + ] |
| 61 | +} |
| 62 | +``` |
0 commit comments