Skip to content

Commit

Permalink
Merge pull request #113 from solo-io/improved-parsing
Browse files Browse the repository at this point in the history
Improved parsing
  • Loading branch information
willowmck authored May 9, 2023
2 parents b25aa56 + ae9c5a3 commit 557cda8
Show file tree
Hide file tree
Showing 17 changed files with 3,014 additions and 63 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Each section below contains it's own README and associated links, please feel fr

- [Useful Tools](tools/)
- [Image List for Air-gap Install of Gloo Mesh Enterprise](tools/airgap-install/README.md)
- [Istio Bug-report CRD Parser](tools/crd_parser/README.md)
- [Istio Bug-report CRD Parser](tools/ibrp/README.md)
- [Datadog Integration](tools/datadog/README.md)
- [Istio Performance Grafana Dashboard Example](tools/grafana/README.md)
- [Bombardier Load Generator](tools/loadgenerator/bombardier-loadgen)
Expand Down
2 changes: 1 addition & 1 deletion tools/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Tooling that can ease/assist with Gloo Mesh onboarding and troubleshooting as well as Day 2 tasks

- Air-gap Installation Image List
- Istio bug-report crd parser
- [Istio bug-report parser](ibrp/README.md)
- Datadog Integration
- Istio Performance Grafana Dashboard Example
- Load Generator tools
Expand Down
2 changes: 0 additions & 2 deletions tools/crd_parser/.gitignore

This file was deleted.

22 changes: 0 additions & 22 deletions tools/crd_parser/README.md

This file was deleted.

36 changes: 0 additions & 36 deletions tools/crd_parser/crd_parser.py

This file was deleted.

1 change: 0 additions & 1 deletion tools/crd_parser/requirements.txt

This file was deleted.

1 change: 1 addition & 0 deletions tools/ibrp/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_version.py export-subst
5 changes: 5 additions & 0 deletions tools/ibrp/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
venv
.idea
build
dist
*.spec
7 changes: 7 additions & 0 deletions tools/ibrp/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Copyright 2023 Solo, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
30 changes: 30 additions & 0 deletions tools/ibrp/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Istio Bug Report Parser

A simple Python script to assist with parsing various aspects of the istioctl bug-report output.

Currently, this script can parse custom resources and nodes.

To parse CRs, this script depends on the standard input of a list of CRs under the heading 'items'. If this is not
found, the script will fail.

## Dependencies
Make sure you have Python3 enabled in your path.

You will need to `pip install pyyaml`.

## Running

```commandline
python3 ibrp.py <operation> <path-to-your-crd-file>
```

Operation will be either 'crparse' or 'nodeparse'.

### Parsing CRs
Output will go to the crs directory as a child of the current directory. Each type of custom resource will be created
in a directory named by the type of CR.

Note that for production workloads, parsing can take a few minutes. The script will provide output on progress.

### Parsing Nodes
Nodes will be parsed to capture the name, roles and cpus. Output will be sent to stdout.
3 changes: 3 additions & 0 deletions tools/ibrp/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from .ibrp import parse_nodes, parse_crs
from . import _version
__version__ = _version.get_versions()['version']
Loading

0 comments on commit 557cda8

Please sign in to comment.