vmware / weathervane

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

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

Closed krisiasty closed 10 months ago

krisiasty commented 1 year ago

Describe the bug

The kubernetesDeleteAllForClustersubroutine is trying to delete all config maps (without any selector), which also includes system-generated configmaps like kube-root-ca.crt and openshift-service-ca.crt on OpenShift clusters. These configmaps are managed by cluster operators and are recreated shortly after each modification or deletion, so when weathervane is trying to check whether all resources were deleted it still finds those configmaps and eventually fails after several iterations.

Reproduction steps

  1. Deploy and run weathervane 2.1.1 on Red Hat OpenShift cluster (tested on OCP 4.12)
  2. ...

Expected behavior

Only resources with properly set label (by default app=auction) should be deleted and checked.

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.

Additional context

No response

bhoflich commented 10 months ago

This is fixed in master with the 2.1.2 release.