Skip to content

Commit

Permalink
fix(cmd/delete): more delete examples
Browse files Browse the repository at this point in the history
Signed-off-by: Lorenzo Fontana <lo@linux.com>
  • Loading branch information
fntlnz committed Nov 22, 2018
1 parent c196818 commit dea645f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion cmd/kubectl-trace/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ var deleteCmd = &cobra.Command{
Use: "delete TRACEID",
Short: "Delete a trace execution from your system",
Long: `Delete all the running pods that are collecting your trace data using bpftrace for a given TRACEID
Example:
# Delete a specific trace
kubectl trace delete 656ee75a-ee3c-11e8-9e7a-8c164500a77e
Limitations:
This command does not implement yet a way to bulk delete traces.
`,
Run: delete,
}
Expand All @@ -21,10 +28,11 @@ func delete(cmd *cobra.Command, args []string) {
log, _ := zap.NewProduction()
defer log.Sync()

uuid := args[0]
if len(args) == 0 {
log.Fatal("TRACEID not provided")
}
uuid := args[0]

kubeconfig := viper.GetString("kubeconfig")
config, err := clientcmd.BuildConfigFromFlags("", kubeconfig)

Expand Down

0 comments on commit dea645f

Please sign in to comment.