Repository: pixie-io/pixie (language: cpp)

Issue:
`px delete` fails on recent K8s versions (1.30)
**Describe the bug**
Running `px delete` against a recent K8s version (1.30) fails with the following error:

```
$ px delete --namespace testing
Pixie CLI
This action will delete the entire 'testing' namespace.
Confirm to proceed on cluster gke_csmc-dev_us-west1-a_dev-cluster-ddelnano1. (y/n) [y] : y
 ✔    Deleting namespace
 ✕    Deleting cluster-scoped resources  ERR: resource name may not be empty
Error deleting Pixie error=resource name may not be empty
```

Running against a 1.27 version cluster (1.27.16-gke.1342000) results in the correct behavior.

**To Reproduce**
Steps to reproduce the behavior:
1. Deploy pixie to a k8s cluster (`px deploy`)
2. Attempt to delete it with `px delete`

This is also reproducible without when deleting non vizier resources since it's a bug with our handling of k8s API server calls
1. Create any following ConfigMap
```
$ kubectl create namespace testing
# sample_map.yaml
---
apiVersion: v1
kind: ConfigMap
metadata:
  name: pl-indexer-config
  labels:
    component: vizier
data:
  PL_MD_INDEX_REPLICAS: "1"

$ kubectl apply -n testing -f k8s/cloud/dev/indexer_config.yaml
```
2. Attempt to delete the `testing` namespace
```
$ px delete --namespace testing
```

**Expected behavior**
Namespace and the resources with the `component=vizier` labels should be removed


**App information (please complete the following information):**
- Pixie version: 0.14.11
- Pixie cli: 0.8.2 and 0.8.3
- K8s cluster version: 1.30.3-gke.1639000



Discussion / hints:

Fix patch:
diff --git a/src/utils/shared/k8s/delete.go b/src/utils/shared/k8s/delete.go
index 046b6cde570..c9728f78c32 100644
--- a/src/utils/shared/k8s/delete.go
+++ b/src/utils/shared/k8s/delete.go
@@ -185,6 +185,13 @@ func (o *ObjectDeleter) runDelete(r *resource.Result) (int, error) {
 		if err != nil {
 			return err
 		}
+		// In newer versions of k8s, the resource name can be empty. This causes
+		// the delete to fail since it can't watch for the resource. See
+		// https://github.com/pixie-io/pixie/issues/2029 for more details.
+		if info.Name == "" {
+			log.Debugf("Skipping resource with empty name: %+v\n", info)
+			return nil
+		}
 		deletedInfos = append(deletedInfos, info)
 		found++
 


Test patch: