Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
nikolaydubina authored Nov 20, 2021
1 parent 278b2d6 commit 043e777
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ All Kubernetes Pod Owners with details
$ kubectl get pods -o json | jq '.items[] | {to: .metadata.name, from: .metadata.ownerReferences[].name}' > k8s_pod_owners_details.jsonl
$ kubectl get rs -o json | jq '.items[] | .id += .metadata.name' >> k8s_pod_owners_details.jsonl
$ kubectl get pods -o json | jq '.items[] | .id += .metadata.name' >> k8s_pod_owners_details.jsonl
$ cat k8s_pod_owners_details.json | jq '. as $in | reduce leaf_paths as $path ({}; . + { ($path | map(tostring) | join(".")): $in | getpath($path) })' # flatten nested objects
$ cat k8s_pod_owners_details.jsonl | jq '. as $in | reduce leaf_paths as $path ({}; . + { ($path | map(tostring) | join(".")): $in | getpath($path) })' # flatten nested objects
$ cat k8s_pod_owners_details.jsonl | jsonl-graph | dot -Tsvg > k8s_pod_owners.svg
```

Expand All @@ -82,4 +82,4 @@ $ cat k8s_pod_owners_details.jsonl | jsonl-graph | dot -Tsvg > k8s_pod_owners.sv
## Rendering

Currently only Graphviz is supported.
Follow progress of native Go graph rendering in [github.com/nikolaydubina/go-graph-layout](https://github.com/nikolaydubina/go-graph-layout). Once it is ready, it will be integrated into this project.
Follow progress of native Go graph rendering in [github.com/nikolaydubina/go-graph-layout](https://github.com/nikolaydubina/go-graph-layout). Once it is ready, it will be integrated into this project.

0 comments on commit 043e777

Please sign in to comment.