-
Notifications
You must be signed in to change notification settings - Fork 163
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
Discussion: Action trigger APIs #5
Comments
In my opinion this is a user configuration problem as we provide sane defaults, cluster operators can guard (their cluster users) against those human errors by e.g. putting OPA rules in place to enforce validation on the I do understand that your design may be a tad more friendly to newcomers, but I do not think this is worth the limitations (in both configuration, and extension possibilities) it introduces. |
But if there is an API design which enables use cases while avoiding putting this burden on cluster operators and users who will encounter these rule failures and have to determine themselves how to fix, that seems preferable.
I think it's important to optimize APIs for the most common use cases, which includes not just sane defaults, but also making common non-default configurations easy to discover/read/write/compose.
One thing to consider is that adding features (extension) is much easier than removing features. More importantly, I'm not sure I agree that the OnCondition API is more extensible than a use case targeted API such as the above API sketch. With a use case targeted API, new use cases can be accounted for by carefully adding new fields over time as new use cases are revealed. However with the OnCondition API, only conditions can be taken into account, so we may find ourselves needing to pollute the condition space solely for consumption by the OnCondtion APIs. Also the needs of the OnCondition API may be in conflict with other use cases for conditions and standards for conditions driven by the community (see kubernetes/community#4521 and kubernetes/enhancements#1624 ). For example, here are a couple use cases which the current OnCondition API doesn't support which the above API sketch does:
Are there any use cases you have in mind which the OnCondition API supports which the above API sketch for example doesn't? |
Please continue the conversation in fluxcd/flux2#102. |
The OnCondition fields currently in #2 seem error prone as there are many non-sensical condition states to use as triggers for certain actions e.g.:
To stoke discussion, here is a sketch of an API for specifying triggers for actions which I think matches use cases more closely, with default values shown:
The text was updated successfully, but these errors were encountered: