kubemirror

by raczylo-com

Helm chartv0.10.57App 0.10.57Verified publisher

Kubernetes controller for mirroring resources across namespaces

About this chart

kubemirror Helm chart

Deploys the kubemirror controller, which mirrors Kubernetes resources (Secrets, ConfigMaps, and other types) across namespaces.

  • Chart version: 0.1.0
  • App version: 0.1.0
  • Image: ghcr.io/lukaszraczylo/kubemirror

Install

helm install kubemirror ./charts/kubemirror -n kubemirror --create-namespace

With a values override:

helm install kubemirror ./charts/kubemirror -n kubemirror --create-namespace \
  -f my-values.yaml

Uninstall

helm uninstall kubemirror -n kubemirror

What it creates

A single-replica Deployment, a ServiceAccount, a cluster-scoped ClusterRole

  • ClusterRoleBinding (the controller watches resources across all namespaces), and a Service exposing the metrics (8080) and health (8081) ports. The container runs as non-root (uid 65532) with a read-only root filesystem and all Linux capabilities dropped.

Values

Defaults are taken from values.yaml.

KeyDefaultDescription
replicaCount1Number of controller replicas.
image.repositoryghcr.io/lukaszraczylo/kubemirrorController image.
image.tag"0.1.0"Image tag (falls back to chart appVersion if empty).
image.pullPolicyIfNotPresentImage pull policy.
serviceAccount.createtrueCreate a ServiceAccount.
serviceAccount.name""Override the generated ServiceAccount name.
controller.metricsBindAddress":8080"--metrics-bind-address.
controller.healthProbeBindAddress":8081"--health-probe-bind-address.
controller.leaderElecttrueEnable leader election (--leader-elect).
controller.leaderElectionID"kubemirror-controller-leader"Lease name (--leader-election-id).
controller.resourceTypes[]Resource types to mirror (--resource-types). Empty enables auto-discovery.
controller.discoveryInterval"5m"Auto-discovery interval (--discovery-interval).
controller.resyncPeriod"1h"Cache resync period, safety net only (--resync-period).
controller.maxTargets100Max target namespaces per resource (--max-targets).
controller.workerThreads5Concurrent reconcile workers (--worker-threads).
controller.rateLimitQPS50.0API QPS limit (--rate-limit-qps).
controller.rateLimitBurst100API burst limit (--rate-limit-burst).
controller.verifySourceFreshnessfalseVerify cache against a direct API read (--verify-source-freshness).
controller.lazyWatcherInitfalseOnly watch resource types actually in use (--lazy-watcher-init). Lowers memory; recommended for production.
controller.watcherScanInterval"5m"Scan interval for new types in lazy mode (--watcher-scan-interval).
controller.excludedNamespaces""Comma-separated namespaces never mirrored to (--excluded-namespaces).
controller.includedNamespaces""Comma-separated namespace patterns to include (--included-namespaces).
service.typeClusterIPService type.
service.metricsPort8080Metrics port.
service.healthPort8081Health-probe port.
resources.requests100m CPU / 128MiContainer requests.
resources.limits500m CPU / 512MiContainer limits.
nodeSelector / tolerations / affinity{} / [] / {}Standard scheduling controls.
priorityClassName""Pod priority class.

Memory tip: setting controller.resourceTypes to the exact types you mirror (e.g. ["Secret.v1", "ConfigMap.v1"]), or enabling controller.lazyWatcherInit, avoids creating watchers for unused resource types and cuts memory use substantially versus full auto-discovery.

Usage

After install, mark a source resource for mirroring and opt a target namespace in. See the project README and examples for the full annotation/label reference and worked scenarios.

Deploy kubemirror with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has kubemirror on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartkubemirror is pinned at v0.10.57 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply