fix: use labels instead of hardcoded indexes #140
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.
This PR makes two changes.
First we use labels to track which stateful sets and services should belong to a ceramic configuration. This changes from the previous logic that hardcoded indexes and deleted resources blindly based on those indexes. This reduces the noise in the operator logs as it only does the work that is needed vs always assuming there are resources to delete.
Second this changes both network and simulations to not watch nearly as many resources. This greatly reduces the number of reconcile loops we run and thus the amount of work the operator needs to do. And we still get low latency when a network or simulation is changed.
These changes combined should improve the stability of the keramik operator.