Removing retained persistent volumes for containerized applications
A volume management server may regularly check the status of persistent volumes to determine if they have been released. A database with information about the persistent volumes may be updated to indicate a current date as the release date when a persistent volume is found to be released without a release date. This enables the volume management server to determine, in the future, how long the persistent volume has been released. When the difference between the current date and the release date for a persistent volume reaches a first predetermined age threshold, the volume management server notifies a set of users. When the difference between the current date and the release date for the persistent volume reaches a second predetermined age threshold, the volume management server causes deletion of the persistent volume.
1 . A system comprising:
a memory that stores instructions; and
one or more processors coupled to the memory and configured to execute the instructions to perform operations comprising:
based on a determination that a first persistent volume of a containerized application computing cluster has been released, updating a manifest to include a date on which the first persistent volume was released;
based on a predetermined age threshold and a difference between a current date and the date included in the manifest, identifying an administrator associated with the first persistent volume;
sending a notification to the administrator that indicates that the first persistent volume will be deleted;
after the sending of the notification, based on the predetermined age threshold and a difference between a later current date and the date included in the manifest, causing deletion of the first persistent volume; and
based on the manifest indicating that a second persistent volume has been released on an unknown date, updating the manifest to indicate that the second persistent volume was released on the current date.
2 . The system of claim 1 , wherein the operations further comprise:
based on a determination that a third persistent volume of a second containerized application computing cluster has been released, updating the manifest to include a date on which the third persistent volume was released.
3 . The system of claim 1 , wherein the causing of the first persistent volume to be deleted comprises updating a reclaim policy of the first persistent volume.
4 . The system of claim 1 , wherein the containerized application computing cluster is a Kubernetes cluster.
5 . The system of claim 1 , wherein the operations further comprise:
repeatedly checking the manifest, at a predetermined interval, to determine if any persistent volumes have been released for at least a predetermined amount of time.
6 . The system of claim 1 , wherein the causing of the deletion of the first persistent volume occurs at a predetermined period of time after the sending of the notification.
7 . The system of claim 6 , wherein the predetermined period of time is seven days.
8 . The system of claim 1 , wherein the operations further comprise releasing the first persistent volume based on a status of an application associated with the first persistent volume.
9 . A non-transitory computer-readable medium that stores instructions that, when executed by one or more processors, cause the one or more processors to perform operations comprising:
based on a determination that a first persistent volume of a containerized application computing cluster has been released, updating a manifest to include a date on which the first persistent volume was released;
based on a predetermined age threshold and a difference between a current date and the date included in the manifest, identifying an administrator associated with the first persistent volume;
sending a notification to the administrator that indicates that the first persistent volume will be deleted;
after the sending of the notification, based on the predetermined age threshold and a difference between a later current date and the date included in the manifest, causing deletion of the first persistent volume; and
based on the manifest indicating that a second persistent volume has been released on an unknown date, updating the manifest to indicate that the second persistent volume was released on the current date.
10 . The non-transitory computer-readable medium of claim 9 , wherein the operations further comprise:
based on a determination that a third persistent volume of a second containerized application computing cluster has been released, updating the manifest to include a date on which the third persistent volume was released.
11 . The non-transitory computer-readable medium of claim 9 , wherein the causing of the first persistent volume to be deleted comprises updating a reclaim policy of the first persistent volume.
12 . The non-transitory computer-readable medium of claim 9 , wherein the containerized application computing cluster is a Kubernetes cluster.
13 . The non-transitory computer-readable medium of claim 9 , wherein the operations further comprise:
repeatedly checking the manifest, at a predetermined interval, to determine if any persistent volumes have been released for at least a predetermined amount of time.
14 . The non-transitory computer-readable medium of claim 9 , wherein the causing of the deletion of the first persistent volume occurs at a predetermined period of time after the sending of the notification.
15 . The non-transitory computer-readable medium of claim 14 , wherein the predetermined period of time is seven days.
16 . The non-transitory computer-readable medium of claim 9 , wherein the operations further comprise releasing the first persistent volume based on a status of an application associated with the first persistent volume.
17 . A method comprising:
determining that a first persistent volume of a containerized application computing cluster has been released;
updating a manifest to include a date on which the first persistent volume was released;
comparing a predetermined age threshold and a difference between a current date and the date included in the manifest;
identifying an administrator associated with the first persistent volume;
sending a notification to the administrator that indicates that the first persistent volume will be deleted;
comparing the predetermined age threshold with a difference between a later current date and the date included in the manifest;
after the sending of the notification, causing deletion of the first persistent volume;
determining that a second persistent volume has been released on an unknown date; and
updating the manifest to indicate that the second persistent volume was released on the current date.
18 . The method of claim 17 , further comprising:
based on a determination that a third persistent volume of a second containerized application computing cluster has been released, updating the manifest to include a date on which the third persistent volume was released.
19 . The method of claim 17 , wherein the causing of the first persistent volume to be deleted comprises updating a reclaim policy of the first persistent volume.
20 . The method of claim 17 , wherein the containerized application computing cluster is a Kubernetes cluster.