[RFE] Integrate `ig` as subcommand
- Dominant language
- Go
- Stars
- 39
- Forks
- 15
- PR merge metrics
- No merged PRs in 30d
Description
## Current situation
Running Inspektor Gadget on AKS nodes is one of the most common use cases for `kubectl-az`. We can run the [`ig`](https://github.com/inspektor-gadget/inspektor-gadget/blob/main/docs/ig.md) tool by using the `run-command` sub-command:
```bash
kubectl az run-command --node aks-agentpool-12345678-vmss000000 "ig trace exec --timeout 5"
```
With the improvements that https://github.com/Azure/kubectl-az/issues/25 will bring, we will be able to run it without `--timeout` but in an interactive mode:
```bash
kubectl az run-command --node aks-agentpool-12345678-vmss000000 "ig trace exec"
```
However, it is still too expensive to simply verify the version (`ig version`) or the available commands (`ig help`). In addition, if a parameter are wrong because of a typo, we need to run the command in the node and return the error.
## Ideal future situation
After [this improvement](https://github.com/inspektor-gadget/inspektor-gadget/pull/1281) in the Inspektor Gadget project, it is now possible to easily build the `ig` commands in a third-party application. This issue aims to investigate if it is worth to add a specific sub-command in the `kubectl-az` plugin to run the `ig` tool available on the AKS nodes:
```bash
kubectl az --node aks-agentpool-12345678-vmss000000 ig trace exec
```
From a very first analysis, it would definitely improve the UX as it would:
- Allow validating ig's flags locally
- Allow showing ig's command and flags locally (no interaction with node is needed).
However, there are some doubts:
- How to distinguish flags intended to be used for `kubectl-az` and `ig`? Maybe based on the order `kubectl-az [kubeclt-az flags] ig [ig flags]`?
- How to manage `ig` commands catalog?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing the existing run-command subcommand, the Inspektor Gadget documentation, and the linked Inspektor Gadget pull request 1281; also check issue 25 for the interactive-mode context. Compare the requested `kubectl az --node ... ig ...` syntax with current flag parsing, then document whether local validation and command discovery are feasible, including how flags and the command catalog would be managed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, go
- Domain
- cli, cloud, devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100