chore(folder): Remove code that deletes missing CRs from instances #1990
+54
−103
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.
As we previously discussed, this PR removes the logic that attempts to delete folders from Grafana instances where the CR has been deleted.
Going forward we rely entirely on the
finalizer
for cleanup.The implementation is stolen from LibraryPanels and ContactPoints.
Once this logic has been removed from all controllers, the plan is to refactor the startup sync to be owned by the Grafana Controller.
Rather than looping through N Grafanas multiple times, we can do it once in the Grafana controller potentially reducing api writes by only updating the status once per instance.