gardener / gardener-extension-registry-cache

Gardener extension controller which deploys pull-through caches for container registries.
Apache License 2.0
7 stars 20 forks source link

Implement a mitigation for `panic: unexpected end of JSON input` #291

Open ialidzhikov opened 2 days ago

ialidzhikov commented 2 days ago

How to categorize this issue?

/area ops-productivity /kind enhancement

What would you like to be added: Now and then we hit occurrences of https://github.com/distribution/distribution/issues/4478. We could actually consider adding an init container that mitigates the issue. In the init container, when the issue occurs (the scheduler-state.json file exists but it is empty and the /var/lib/registry/docker dir is not empty), then we could delete the scheduler-state.json file and the /var/lib/registry/docker dir to mitigate the issue.

Why is this needed: Reduce repetitive and recurring ops effort until the upstream issue is fixed.

ialidzhikov commented 2 days ago

/assign @dimitar-kostadinov