Refactor Storage Calculator to be more robust #2947
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Checklist
Explain the details for making this change. What existing problem does the pull request solve?
It was noticed that
storage-calculator
was not running for all projects in a large dedicated cluster with it's own Lagoon Core. This PR refactors the storage calculator to:exit 1
which potentially halts the storage calculator before it runs over all projects--ignore-not-found=true
and less piping to/dev/null
storageCalc
pod rollout. To preventRWO
PVs from stalling the script for too long. The current default is 10 minutes.LAGOON_STORAGE_IGNORE_REGEX
to which can be used to selectively skip certain PVCs by name. e.g. it is easy now to skip reading all thesolr
PVCs now.I also added README.md file to explain a lot of the things.
Things that would make great follow up PRs:
python-yq
to Goyq
.Related issues
bytesUsed
when it is actuallykiloBytesUsed
#2245