In How to manage storage we have a section called "Handle storage detaching".
We should clarify whether this section applies to machine charms, K8s charms, or both.
Juju only supports manually detaching storage for machine charms. If you try juju detach-storage for a K8s charm, you'll get an error:
ERROR Juju command "detach-storage" not supported on container models
However, I don't think this means it's pointless to observe the storage-detaching event in a K8s charm. You might still want to observe the event so that you can clean up storage during the teardown phase.
In How to manage storage we have a section called "Handle storage detaching".
We should clarify whether this section applies to machine charms, K8s charms, or both.
Juju only supports manually detaching storage for machine charms. If you try
juju detach-storagefor a K8s charm, you'll get an error:However, I don't think this means it's pointless to observe the storage-detaching event in a K8s charm. You might still want to observe the event so that you can clean up storage during the teardown phase.