Skip to content

Commit

Permalink
Skip k8s resources that have an empty name to fix 'px delete' on newe…
Browse files Browse the repository at this point in the history
…r k8s versions

Signed-off-by: Dom Del Nano <[email protected]>
  • Loading branch information
ddelnano committed Sep 24, 2024
1 parent 5292f58 commit ef6a745
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/utils/shared/k8s/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -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++

Expand Down

0 comments on commit ef6a745

Please sign in to comment.