-
Notifications
You must be signed in to change notification settings - Fork 50
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
1.8 upgrades: Juju Error on refresh of Podspec charm with deployment in metadata to Sidecar #732
Comments
Did some digging about the technical solution. There is a problem. These charms are implemented in PodSpec and neither of them implements the on remove hook. The thing is that the crds are removed automatically even without us implementing it. Steps to reproduce:
I am not sure if there is a way for us to override this default pod spec behavior. I was also thinking about to use lightkube to recreate the crd on remove hook for the charms. But this is not possible as the lightkube needs |
@misohu the goal is to not let the CRD get a DELETE request at all. Even if we recreate the CRD, all user CRs will be lost since the CRD was deleted initially. Is there no way we can control which resources get deleted when the PodSpec charm gets deleted? |
Final Workaroundsince juju uses annotations and labels to cleanup when removing a charm, we can remove these annotations and labels from CRDs to prevent the deletion of user resources. The upgrade would go as follows:
this step will be done for the following CRDs:
this way the CRDs will not get deleted, therefore the CRs will not get deleted when the charm is removed. |
Closing this as it's a juju bug, and we had a workaround |
Thank you for reporting us your feedback! The internal ticket has been created: https://warthogs.atlassian.net/browse/KF-5152.
|
Bug Description
When doing an upgrade of Charmed Kubeflow 1.7 to 1.8, some charms cannot be refreshed with Juju due to the error:
This applies to charms that were Podspec in 1.7 and had a
deployment
field specified in the metadata.yaml, then were rewritten to Sidecar in 1.8.Currently, the only way to upgrade those charms is to remove and redeploy them, this is problematic because it'll cause loss of user data (CRDs are removed, hence CRs created by users are removed).
Affected charms
Proposed solution:
Modify the affected charms in their corresponding 1.7 branches to never remove CRDs on remove, and in the upgrade guide do:
To Reproduce
Environment
juju 3.1/stable
microk8s 1.25-strict/stable
The text was updated successfully, but these errors were encountered: