The kubernetesDeleteAllForCluster subroutine is trying to delete all config maps, failing on OpenShift clusters
krisiasty opened this issue · 1 comments
Describe the bug
The kubernetesDeleteAllForCluster
subroutine 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
- Deploy and run weathervane 2.1.1 on Red Hat OpenShift cluster (tested on OCP 4.12)
...
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
This is fixed in master with the 2.1.2 release.