Expand description
Prepares and cleans up -caproni deployment copies used to run mirror
reloaders without disrupting the original workload.
Ported from internal/reloader/mirror/copy.go.
Structs§
- Copy
Info - Holds information about a prepared deployment copy.
- Target
- A Kubernetes resource to be mirrored.
Enums§
- Copy
Error - Errors from deployment-copy preparation and cleanup.
Constants§
- COPY_
SUFFIX - The suffix appended to the original deployment name to form the name of the mirror copy managed by caproni.
- SCALE_
UP_ REPLICA_ COUNT - The number of replicas the original deployment will be scaled up to. This is intentionally hard-coded to avoid storing state in the old deployments or within caproni.
Functions§
- collect_
and_ validate_ targets - Collects mirror targets from all reloaders, merges targets for the
same pod, and validates that there are no conflicts. Returns a
deduplicated, sorted list of targets ready for use with
Manager::prepare_copies. - modify_
deployment_ for_ caproni - Modifies a deployment’s JSON structure for use as a
-capronicopy. Renames the deployment, removes health probes, and replaces container commands withsleep infinity. Whencontainersis non-empty, only those containers are modified; all others are left unchanged.