-
Notifications
You must be signed in to change notification settings - Fork 55
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
Annotate DWO-created PVC's #920
Comments
Though this issue involves specifically annotating DWO-created PVC's so that changes to PVC with custom names (using an external DWOC) can trigger workspace reconciles, @mkuznyetsov has brought up a good point regarding the implications of setting the common PVC name in an external DWOC. I wanted to document this topic here, for the time being: Consider the case where two workspaces A and B exist in a namespace. Workspace A uses the common PVC strategy and uses the global DWOC (i.e. it does not use an external DWOC). Workspace B uses the common PVC strategy and an external DWOC where the PVC name field is configured. Upon deletion of workspace B, the common PVC cleanup job will not actually delete the PVC which has a custom name. This is because the PVC cleanup logic will detect that there are other workspaces still using the common PVC strategy (in this case, workspace A). To resolve this case, we'd have to find out exactly which workspaces are using the custom-named PVC. To do this, we'd have to add extra logic for the common PVC cleanup logic:
This adds quite a bit of complexity to the common PVC cleanup logic, however. Moreover, @amisevsk pointed out that the DWOC's PVCName field warns that changing the PVC name after workspaces have been created will lead to dangling PVCs that need to be manually deleted. Thus, I think it makes more sense to simply document that changing the PVC name when using an external DWOC can result in dangling PVCs that need to be manually deleted. |
Fixed in #1233 |
Description
Currently, to trigger reconciles when the common PVC is deleted, we are relying on filtering PVC's by their name (checking if the deleted PVC's name is equal to the common PVC name).
With #918, the common PVC name which used to be only set in the global DWOC can now be set on a per-workspace basis. However, the PVC handler function does not have access to the common PVC name set for the workspace's configuration.
Instead, it would be better to add a DWO-specific annotation to the PVC spec and filter for this annotation when checking if a reconcile should be triggered when the common PVC is updated.
Additional context
Limitation number 3 of #918 (comment):
The text was updated successfully, but these errors were encountered: