Mirrorverse
Keep Secrets and ConfigMaps perfectly mirrored across dimensions (namespaces).
Powered by label-driven syncing and conflict-resolution strategies, it ensures your configs are always in sync — even in multiverse chaos.
How It Works
Mirrorverse operates through a simple but powerful reconciliation loop within your Kubernetes cluster.
1. Label & Watch
Apply the mirrorverse.dev/sync-source: "true"
label to a source Secret or ConfigMap. The controller immediately detects it and reads its sync configuration.
2. Reconcile & Sync
Mirrorverse parses the target namespaces and sync strategy. It then creates or updates replicas in each target dimension, ensuring they match the source of truth.
3. Maintain & Clean
The controller continuously monitors for drift. If a source is deleted, it can automatically clean up replicas or mark them as stale, based on your configuration.
Architecture
Mirrorverse runs as a lightweight controller in your cluster. It watches for labeled Secrets/ConfigMaps, reconciles their state, and keeps replicas in sync across target namespaces. If a source is deleted, it cleans up or marks replicas as stale.
+-------------------+
| Kubernetes API |
| Server |
+---------+---------+
|
v
+---------+---------+
| Mirrorverse |
| Controller |
+---------+---------+
|
Watches for labeled
Secrets/ConfigMaps
|
v
+---------+---------+
| Reconcile Logic |
| - Parse labels |
| - Sync/cleanup |
+---------+---------+
|
v
+---------+---------+
| Target Namespaces |
| (Replicas synced) |
+-------------------+
- Watch: Detects labeled source resources
- Reconcile: Parses labels, determines targets and strategy
- Sync: Creates/updates replicas in target namespaces
- Cleanup: Removes or marks replicas as stale if the source is deleted
Key Labels
Control the entire sync process with a few simple labels on your source resources.
Source Resource Labels
Label | Purpose | Default |
---|---|---|
mirrorverse.dev/sync-source: "true" |
Opt-in to syncing. Marks this resource as the source of truth. | Required |
mirrorverse.dev/targets: "staging_prod" |
Underscore-separated list of target namespaces to sync into. | Required |
mirrorverse.dev/strategy: "replace" |
Sync strategy: replace fully overwrites, patch merges. |
patch |
mirrorverse.dev/cleanup: "true" |
If source is deleted, cleanup replicas automatically. | false (optional) |
mirrorverse.dev/exclude: "devops" |
Underscore-separated list of namespaces to exclude from targets. | Optional |
Replica Resource Labels
These are automatically added by Mirrorverse to track and manage synced replicas.
Label | Purpose |
---|---|
mirrorverse.dev/sync-replica: "true" |
Indicates that this resource is a managed replica. |
mirrorverse.dev/sync-source-ref: "<name>.<namespace>" |
References the name of the source resource it was synced from. |
mirrorverse.dev/stale: "true" |
Set when the source no longer exists — marks the replica as orphaned. |
Notes
- The
mirrorverse.dev/cleanup: "true"
label enables auto-deletion of replicas. If omitted, replicas are just marked asstale
and are no longer synced. - The
mirrorverse.dev/exclude
label takes precedence. You can specify a broad target list and exclude specific namespaces from it.
Get Started in Minutes
Install Mirrorverse in your cluster using the official Helm chart.
# 1. Add the Mirrorverse Helm repository
helm repo add mirrorverse https://badal773.github.io/mirrorverse/
# 2. Install the Mirrorverse chart
helm install mirrorverse mirrorverse/mirrorverse --create-namespace --namespace mirrorverse