Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
driver: handle non existing volumes and nodes
According to the spec we should return a `NOT_FOUND` in various method. We always assume the volume or node exist, however this might not the case. For example the user might delete the volume externally from the UI or make a HTTP call to the DigitalOcean API to delete the volume. Actions like this are outside the Kubernetes system, so the plugin needs to handle these edge cases by signaling back that the resources don't exist. We return `NOT_FOUND` for any creation actions, such as creating a volume, attaching a volume, formatting, etc.. Because we really need to return an error as there is no way to recover from this We don't return `NOT_FOUND` for any destroy actions, such as deleting, detaching, unmounting, etc.. Because in all these cases it doesn't matter if the volume doesn't exist. There is not much to do and assuming it's "done" makes the overall system more stable
- Loading branch information