Conversation
armru
force-pushed
the
dev/136
branch
2 times, most recently
from
September 2, 2026 08:08
16cbec4 to
16bd0cc
Compare
When a tier's cache moves to a different volume, the cache it leaves behind keeps consuming space on the old one, and nothing ever removes it: the cache directory is only wiped when the repository is first initialized. Add an optional `stale_cache` path per tier. When set, and different from the cache in use, the server removes it before initializing the repository. Kopia rebuilds the cache on demand, so there is nothing to migrate. Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
A Server had to dedicate a PVC to the Kopia cache of every tier it configured, which is three volumes for the common tier1+tier2 setup and a decision the user has no basis to make before running anything. `tier1.cache` and `tier2.cache` are now optional. When a tier has no cache stanza, its cache lives in the tier1 data volume, under /data/cache_tier1 and /data/cache_tier2. Since the fallback needs the data volume, tier2.cache stays required when tier1 is not configured, which a CEL rule enforces; the cache shrink rules now tolerate a cache that is absent on either side of an update. The stanza can be added or removed on a running server: the VolumeClaimTemplates change recreates the StatefulSet through the existing path, the server reclaims a cache left behind in the data volume, and the operator deletes the PVC of a cache that is no longer dedicated. Cache PVCs are the only ones reclaimed, as they hold no backup data. Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Explain when to dedicate a PVC to a tier's cache and what happens when you do not, and drop the cache stanza from the quickstart, whose data PVC now has to accommodate the cache. Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Every volume the server claims was built by its own injector, each repeating the same labelled PersistentVolumeClaim literal, and the cache work added a third guard to that pattern. A single volumeClaimTemplates function now returns them all, in the order the StatefulSet had before, and the same collapsing applies to the cache paths in the environment builder and to the desired PVC sizes. The StatefulSet spec is unchanged, hash included, so no server is restarted by this. Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
A Server had to dedicate a PVC to the Kopia cache of every tier it
configured, which is three volumes for the common tier1+tier2 setup and a
decision the user has no basis to make before running anything.
tier1.cacheandtier2.cacheare now optional. When a tier has no cachestanza, its cache lives in the tier1 data volume, under /data/cache_tier1
and /data/cache_tier2. The fallback needs that volume, so tier2.cache stays
required when tier1 is not configured, which a CEL rule enforces. The stanza
can be added or removed on a running server: the VolumeClaimTemplates change
recreates the StatefulSet through the existing path, and the cache left
behind is reclaimed, either as a directory in the data volume or as a PVC
the operator deletes.
The issue asks to move the cache folder to its new volume. Nothing is moved:
Kopia rebuilds the cache on demand, so the old copy is only reclaimed and
the first operations after the restart run against a cold cache. Copying it
would also only work in one direction, since a removed cache PVC is no
longer mounted anywhere.
Closes #136