iovisor / iovisor/kubectl-trace

Flag --all should work with --all-namespaces

Open
#46 0 comments 2 reactions 0 assignees View on GitHub
area/ux
Dominant language
Go
Stars
2.2k
Forks
176
PR merge metrics
No merged PRs in 30d

Description

As a user I expect the `--all` flag to work together with `--all-namespaces`, at the current moment this is not true, when I do:

```bash
kubectl trace get --all-namespaces
NAMESPACE NODE NAME STATUS AGE
caturday 127.0.0.1 kubectl-trace-e0d048c8-2003-11e9-982a-8c164500a77e
caturday 127.0.0.1 kubectl-trace-e5b13530-2003-11e9-8db9-8c164500a77e
```

I expect to be able to delete them all with

```bash
kubectl trace delete --all --all-namespaces
```

But that commant doesn't select them all and returns:

```
an empty namespace may not be set when a resource name is provided
```

What I would expect is the traces to be all deleted like how it happens when I do that action specifying the namespace:

```
kubectl trace delete --all -n caturday
trace job kubectl-trace-e0d048c8-2003-11e9-982a-8c164500a77e deleted
trace job kubectl-trace-e5b13530-2003-11e9-8db9-8c164500a77e deleted
trace configuration kubectl-trace-e0d048c8-2003-11e9-982a-8c164500a77e deleted
trace configuration kubectl-trace-e5b13530-2003-11e9-8db9-8c164500a77e deleted
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing `kubectl trace delete --all --all-namespaces` and compare it with the namespace-specific command shown in the issue. Trace the `delete` command's handling of `--all` and `--all-namespaces`; done means all matching traces are deleted across namespaces without the empty-namespace error.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.