-
Notifications
You must be signed in to change notification settings - Fork 218
Managed BulkDependentResource fails with reconcilePrecondition #1687
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
Thanks @grawinkel for reporting this, will take a look. |
I can't see how this is related tbh. |
The problem is with condition API, at some point we added there the resource created by the dependent resource, that is clearly not fitting in this case. So we probably need to pass here the dependent resource not the resource. So then the user will can decide, which method to call. Will create a issue for that to discuss. For now it can be handled in the PR, so the resource in the condition will be a Map of resources: public class SamplePrecondition
implements Condition<Map<String, ConfigMap>, BulkDependentTestCustomResource> {
@Override
public boolean isMet(BulkDependentTestCustomResource primary, Map<String, ConfigMap> secondary,
Context<BulkDependentTestCustomResource> context) {
// ...
}
} But I see this more like a workaround. The API would be nicer with the dependendent resource as a parameter. |
created issue: #1689 |
Bug Report
On Operator SDK 4.2.0 (commit: 061db9c):
I want to implement a Resource
And use it as a Managed Resource with a reconcilePrecondition
As soon as the reconcilePrecondition is configured, the SomeResourceDependentResource fails, since it is not handled as a BulkDependentResource but as a normal DependentReousource. So the getSecondaryResource() is called, instead the getSecondaryResources(), which leads to errors.
What did you expect to see?
Being able to use reconcilePrecondition with BulkDependentResource.
The text was updated successfully, but these errors were encountered: