-
Notifications
You must be signed in to change notification settings - Fork 7
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
Review the claiming code logic #313
Comments
Ideally the flow should be implemented part of a Service (or job running every x seconds) to check about the new claims CRs or Claim sql records and then starting to process them when status is equal to As soon as a claim is processed, then the job/service change the status from |
I think we should review the architecture code in order to move the business logic to the service layer. Currently we have methods called doXXXX in the Resource classes containing business logic (for example, binding claims or creating K8s resources). IMO we should move this logic to the corresponding service class. I would also do the persist tasks in the service layer. Regarding the claiming, if we let only an entry point to the claiming action from the Applications UI, why would we need a job? Shouldn't we just create the claim + bind the application if all needed elements exist? |
+100
If this is not an automatic action (we don't need to discover the services or something like this), then we don't need a job. Though if we need to verify the claim status every X minutes (for example, to check whether the service still exists), then we would need a job to do this. |
Even if we dont need a job, we need one or some services able to handle the different steps of the flow. Having a job or service scheduler able to process the different steps allows to perform the work in an async mode |
Ok, let's keep the scheduled job at the moment |
TODO
Review the claiming code logic when the service can be discovered or is installable (using crossplane helm releaseby example) on a k8s cluster.
The existing code do not seem to follow this flow here and here
The text was updated successfully, but these errors were encountered: