Know whether pod deletion is triggered by scaling down

Kubernetes version: 1.12.8 Cloud being used: AWS Installation method: KOps Host OS: Ubuntu16 CNI and version: CRI and version: I would like to be able to know whether a container is being deleted due to scaling down or something else in the lifecycle preStop command. Is it possible to get the desired replica count inside of a pod? In my case, I am running a statefulset of cassandra nodes. When I scale down the set, I want to decomission the node and move the nodes data off that nodes volume, but if the node is deleted for another reason, I want to leave the data on the volume. Is there a solution to this problem? Thanks