Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cluster info gatherer for the upcoming Ambient mesh migration-estimation page #1

Merged
merged 24 commits into from
Mar 31, 2025
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
87fd6e8
add cluster info gatherer
inFocus7 Mar 6, 2025
3fe7be0
add progress bar to script
inFocus7 Mar 6, 2025
f53156a
use actual metrics if found, add more node information, add checksum …
inFocus7 Mar 7, 2025
b030315
add action to verify checksums
inFocus7 Mar 7, 2025
d0b190e
update checksum + fix verification makefile
inFocus7 Mar 7, 2025
7661c4d
fix action
inFocus7 Mar 7, 2025
99e3b3e
go through all namespaces to get cpu usage, denote istio-injected nam…
inFocus7 Mar 7, 2025
847d632
only support 1 cluster to simplify ux+ui
inFocus7 Mar 13, 2025
c2a6787
add todo - remove json file
inFocus7 Mar 13, 2025
a525955
update sha256
inFocus7 Mar 18, 2025
800dbe6
parallelize namespace processing + add continue flag
inFocus7 Mar 21, 2025
85ff9c4
update checksum
inFocus7 Mar 24, 2025
e2291fe
Delete cluster_info.json
inFocus7 Mar 24, 2025
2702533
remove TODOs and update checksum
inFocus7 Mar 26, 2025
307f3bf
make script executable
inFocus7 Mar 28, 2025
cf633e1
Apply suggestions from code review
inFocus7 Mar 28, 2025
0ff7c78
update checksum
inFocus7 Mar 28, 2025
0ed3116
resolve 99% of shellcheck errors and warns - except SC3045
inFocus7 Mar 28, 2025
b4c41f5
review comments + move checksum generators + verifiers to script
inFocus7 Mar 28, 2025
7c01058
minor safety check when removing temp_dir
inFocus7 Mar 28, 2025
541b91b
use more portable 'manual' parallel processing at a cost of speed
inFocus7 Mar 28, 2025
f524fc2
fix topology and node information gathering labels
inFocus7 Mar 29, 2025
8d7cebc
add support for more units + decimals
inFocus7 Mar 29, 2025
f4e0a04
update checksum
inFocus7 Mar 29, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/workflows/verify-checksums.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Verify Checksums
on:
pull_request: {}
push:
branches:
- main

jobs:
verify-checksums:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: make verify-checksums
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.DS_Store
31 changes: 31 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
.PHONY: checksums
checksums:
@find . -type f \( -name "*.sh" -o -name "*.bash" \) | while read file; do \
echo "Creating checksum for $$file"; \
sha256sum "$$file" | awk '{print $$1}' > "$$file.sha256"; \
done

.PHONY: verify-checksums
verify-checksums:
@errors=0; \
for file in $$(find . -type f \( -name "*.sh" -o -name "*.bash" \)); do \
cs_file="$$file.sha256"; \
if [ ! -f "$$cs_file" ]; then \
echo "[ERR] $$file - checksum file missing"; \
errors=$$((errors+1)); \
else \
computed=$$(sha256sum "$$file" | awk '{print $$1}'); \
expected=$$(awk '{print $$1}' "$$cs_file"); \
if [ "$$computed" = "$$expected" ]; then \
echo "[OK] $$file"; \
else \
echo "[ERR] $$file - checksum mismatch"; \
errors=$$((errors+1)); \
fi; \
fi; \
done; \
if [ $$errors -ne 0 ]; then \
echo "Checksum verification failed with $$errors errors"; \
exit 1; \
fi; \
echo "All checksums verified successfully"
Loading