-
Notifications
You must be signed in to change notification settings - Fork 652
CustomPluginMonitor should support multiple "permanent" rules for the same node condition. #664
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
In this case, instead of complicating the NPD logic, why couldn't the user consolidate the 2 plugins with 1 entrypoint, and only configure one rule instead? |
Hi @Random-Liu! The idea was that for certain set of rule/plugins that are mutually exclusive, user would only observe one node condition/event per interval. For instance, if the user wants to take different remediating action depending on a certain set of node condition, it would be ideal to keep the set of possible rules but resolve to only one result per interval. |
If by consolidating you mean having 1 plugin script generating multiple results, I would probably have to expand |
Hm, in the example #566, it should just consolidate the 2 scripts. And for other problems with different Reasons, you can just setup different conditions for them? It would be good if we can support different reasons for a condition, but it is probably better to get that from the custom plugin directly, instead of relying on multiple different rules. Or else, if we define multiple rules for the same condition, how do we consolidate different results, that introduces unnecessary complexity. However, if you send a change to get formatted output from the custom plugin, we can do that. :) |
ah I see, yes there should be some agreed way of consolidating different results. For your comment If by Wouldn't changing this behavior a bigger design change, since we won't be taking the 'reason' field from the json, but instead from the script output. |
This comment was marked as spam.
This comment was marked as spam.
@BusyOppo I see, make sense. I'll make a pr on supporting the behavior. It'll change cpm behavior abit, but the right way to address the multiple rules issue. |
@Random-Liu, does enabling the 'reasonMapping' above for multiple(3+) exitcode-reason pairing sound appropriate? I've wanted to confirm if that is the right direction before making a pr. I could make it optional and not break current behavior |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close not-planned |
@k8s-triage-robot: Closing this issue, marking it as "Not Planned". In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Hello,
This is to reopen plan/discussion around an issue where CustomPluginMonitor behaves in an unexpected way (#566).
In short, when there are multiple rules for the same condition in configuration, the NPD will generate events for all of them causing the condition to flip-flop.
Current behavior
Described in #566
Suggestions/Ideas
As discussed in the original issue, I believe it would be reasonable for CustomPluginMonitor to behave in this way.
NonOK/True
andOK/False
, resolve to the "worst" case (condition isNonOK/True
).NonOK/True
, current condition's reason/rule (NonOK/True
) takes precedence. If it just so happens that the particular reason/rule returnsOK/False
in current interval, we can take the first rule that evaluates toNonOK/True
.The text was updated successfully, but these errors were encountered: