vmware / weathervane

Virtual-Infrastructure and Cloud Performance Benchmark
Other
153 stars 39 forks source link

use selector in DeleteAllForCluster #253

Closed bhoflich closed 1 year ago

bhoflich commented 1 year ago

to fix issue #251 The kubernetesDeleteAllForCluster subroutine is trying to delete all config maps, failing on OpenShift clusters #251

vmwclabot commented 1 year ago

@bhoflich, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding Signed-off-by: John Doe <john.doe@email.org> to the last line of each Git commit message. The e-mail address used to sign must match the e-mail address of the Git author. Click here to view the Developer Certificate of Origin agreement.

RebeccaYo commented 1 year ago

Hi @bhoflich , a couple of questions. I noticed kristiasty's comment that "I found in the KubernetesCluster.pm source code there are several calls to kubectl with the --selector=app=auction argument, but for some reason this is missing in the kubernetesDeleteAllForCluster subroutine." I didn't find to be accurate. The presence of the --selector=app=auction argument was used only in the collection of the GetAllPods.txt, DescribePods.txt etc. files, not in any of the deletion routines.

kubernetesDeleteAll, kubernetesDeleteAllWithLabel, kubernetesDeleteAllWithLabelAndResourceType could also delete the OpenShift system configmaps as they don't include --selector=app=auction. Are these being used? Do these need the selector added?

Second, do you think there are any files that should be deleted by kubernetesDeleteAllForCluster that would not get deleted if --selector=app=auction is added?

bhoflich commented 1 year ago

kubernetesDeleteAll, kubernetesDeleteAllWithLabel, kubernetesDeleteAllWithLabelAndResourceType could also delete the OpenShift system configmaps as they don't include --selector=app=auction. Are these being used? Do these need the selector added?

Currently these routines are all being called selectively with parameters passed to them that limit the scope of what is being deleted, and are not deleting the configmaps at the source of the issue to my knowledge.

Second, do you think there are any files that should be deleted by kubernetesDeleteAllForCluster that would not get deleted if --selector=app=auction is added?

I did not detect any leftovers in my testing.