Skip to main content

Module copy

Module copy 

Source
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§

CopyInfo
Holds information about a prepared deployment copy.
Target
A Kubernetes resource to be mirrored.

Enums§

CopyError
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 -caproni copy. Renames the deployment, removes health probes, and replaces container commands with sleep infinity. When containers is non-empty, only those containers are modified; all others are left unchanged.