-
Notifications
You must be signed in to change notification settings - Fork 771
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
Handle two Modules owning the same resource #163
Comments
I can work on this issue |
Thanks @hanshal101! |
Hey, @petar-cvit, so my approach over here is to make a checkpoint before creating a module to check the resource already exists or not. If true, then return error; otherwise, pass. What you think of this? Also, I'm having a hard time finding the Create Logic for Modules, the last code I reached was 😅: cyclops/cyclops-ctrl/api/v1alpha1/client/modules.go Lines 53 to 65 in f7f3691
|
Hey @hanshal101. K8s API will take care of duplicate Modules, so we don't have to worry about that. The problem is that two Modules can try the create the "same" object. For example:
You will need to find a mechanism to track shared ownership of resources when creating/updating children resources |
Okay correct me if I am wrong so before creating any module, we need to make sure the current deployment |
Yes, so each time you want to create new resources from a Module, you have to check their |
@petar-cvit want to work on this,can you assign it to me. |
New Quest!A new Quest has been launched in @cyclops-ui’s repo. Some loot has been stashed in this issue to reward the solver! 🗡 Comment ⚔️ When you submit a PR, comment Questions? Check out the docs. |
Is your feature request related to a problem? Please describe.
Each Module will create its own set of resources. When two Modules create the same resource, one of the Modules will report that it has all the resources it should have, while the other one will just say it's empty and that it misses the resource.
Describe the solution you'd like
If a new Module is created and it wants to create a resource that is already owned by another Module, it should report on the UI that there is a clash in resources. I wouldn't go with overriding other Modules resource ownership
Additional context
Resource ownership is defined on each resource with the label
cyclops.module
. For example, Moduledemo
created a Deploymentapp,
and the app Deployment will have the labelcyclops.module: demo
The text was updated successfully, but these errors were encountered: