surahman edited a comment on pull request #3725: URL: https://github.com/apache/incubator-heron/pull/3725#issuecomment-962139320
The reason Spark uses the `Claim Name` of `OnDemand` might be because it generates a PVC name based on the workload's name. If we were to do the same we could potentially get away with cleaning up on demand PVCs without having to update the scheduler. We would need a naming convention: ```bash [Topology Name]-ondemand-[Volume-Name] ``` The question then becomes one of how we clean up all of the `OnDemand` claims. You could list the claims and generate a list of the ones with a prefix of `[Topology Name]-ondemand-` and axe them. We need to keep in mind that there may very well be thousands of claims and we cannot request a list by prefix from K8s. We may be able to use the `fieldSelector` and `labelSelector` in [`listNamespacedPersistentVolumeClaim`](https://javadoc.io/static/io.kubernetes/client-java-api/11.0.0/io/kubernetes/client/openapi/apis/CoreV1Api.html#listNamespacedPersistentVolumeClaim-java.lang.String-java.lang.String-java.lang.Boolean-java.lang.String-java.lang.String-java.lang.String-java.lang.Integer-java.lang.String-java.lang.String-java.lang.Integer-java.lang.Boolean-) creatively to restrict returned values but we will need to add them to the PVC's on creation. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
