diff --git a/charts/kubemirror/Chart.yaml b/charts/kubemirror/Chart.yaml index 96f0dd0..7a08baf 100644 --- a/charts/kubemirror/Chart.yaml +++ b/charts/kubemirror/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: kubemirror description: Kubernetes controller for mirroring resources across namespaces type: application -version: 0.4.6 -appVersion: "0.4.6" +version: 0.4.8 +appVersion: "0.4.8" keywords: - kubernetes - controller diff --git a/charts/kubemirror/templates/deployment.yaml b/charts/kubemirror/templates/deployment.yaml index 4917bdd..b0f897f 100644 --- a/charts/kubemirror/templates/deployment.yaml +++ b/charts/kubemirror/templates/deployment.yaml @@ -46,6 +46,10 @@ spec: {{- if .Values.controller.verifySourceFreshness }} - --verify-source-freshness=true {{- end }} + {{- if .Values.controller.lazyWatcherInit }} + - --lazy-watcher-init=true + {{- end }} + - --watcher-scan-interval={{ .Values.controller.watcherScanInterval }} {{- if .Values.controller.excludedNamespaces }} - --excluded-namespaces={{ .Values.controller.excludedNamespaces }} {{- end }} @@ -56,6 +60,7 @@ spec: - --resource-types={{ join "," .Values.controller.resourceTypes }} {{- end }} - --discovery-interval={{ .Values.controller.discoveryInterval }} + - --resync-period={{ .Values.controller.resyncPeriod }} ports: - name: metrics containerPort: 8080 diff --git a/charts/kubemirror/values.yaml b/charts/kubemirror/values.yaml index 66be27c..09103e0 100644 --- a/charts/kubemirror/values.yaml +++ b/charts/kubemirror/values.yaml @@ -3,7 +3,7 @@ replicaCount: 1 image: repository: ghcr.io/lukaszraczylo/kubemirror pullPolicy: IfNotPresent - tag: "0.4.6" + tag: "0.4.8" imagePullSecrets: [] nameOverride: "" @@ -44,14 +44,21 @@ controller: leaderElectionID: "kubemirror-controller-leader" # Resource types to mirror - # Examples: ["Secret.v1", "ConfigMap.v1", "Ingress.v1.networking.k8s.io"] + # Examples: ["Secret.v1", "ConfigMap.v1", "Ingress.v1.networking.k8s.io", "Middleware.v1alpha1.traefik.io"] # If empty, auto-discovery will find all mirrorable resources + # MEMORY TIP: Specifying exact types reduces memory by 70-80% vs auto-discovery + # Common types: Secret.v1, ConfigMap.v1 resourceTypes: [] # Auto-discovery interval (only used when resourceTypes is empty) # How often to rediscover available resources in the cluster discoveryInterval: "5m" + # Cache resync period - how often to refresh all cached resources + # Higher values reduce memory churn and API load + # Default: 10m (was 30s in earlier versions) + resyncPeriod: "10m" + # Resource limits maxTargets: 100 workerThreads: 5 @@ -66,6 +73,20 @@ controller: # Recommended: false for most deployments (eventual consistency is acceptable) verifySourceFreshness: false + # Lazy watcher initialization (RECOMMENDED for production) + # Only creates informers for resource types that actually have resources marked for mirroring + # Dramatically reduces memory usage - e.g., if you have 204 available resource types but only + # 2 types with marked resources, this creates only 2 watchers instead of 204 + # Memory savings: typically 70-90% compared to eager initialization + # Default: false (user opt-in) + lazyWatcherInit: false + + # Watcher scan interval (lazy-watcher-init mode only) + # How often to scan the cluster for new resource types that need watchers + # If you add a new resource type to mirror, it will be detected within this interval + # Default: 5m + watcherScanInterval: "5m" + # Namespace filtering excludedNamespaces: "" includedNamespaces: "" diff --git a/charts/packages/kubemirror-0.4.8.tgz b/charts/packages/kubemirror-0.4.8.tgz new file mode 100644 index 0000000..a8c4e51 Binary files /dev/null and b/charts/packages/kubemirror-0.4.8.tgz differ diff --git a/index.yaml b/index.yaml index 191c31a..58eb169 100644 --- a/index.yaml +++ b/index.yaml @@ -1449,6 +1449,28 @@ entries: - https://github.com/lukaszraczylo/helm-charts/releases/download/kube-images-sync-0.1.5/kube-images-sync-0.1.5.tgz version: 0.1.5 kubemirror: + - apiVersion: v2 + appVersion: 0.4.8 + created: "2025-12-27T01:43:25.604098356Z" + description: Kubernetes controller for mirroring resources across namespaces + digest: faadbf0841423ca613ef1f59c7dd0e77661bb01f0c5fc66de5f153a8da040556 + home: https://github.com/lukaszraczylo/kubemirror + keywords: + - kubernetes + - controller + - mirror + - secrets + - configmaps + maintainers: + - email: lukasz@raczylo.com + name: Lukasz Raczylo + name: kubemirror + sources: + - https://github.com/lukaszraczylo/kubemirror + type: application + urls: + - https://github.com/lukaszraczylo/helm-charts/releases/download/kubemirror-0.4.8/kubemirror-0.4.8.tgz + version: 0.4.8 - apiVersion: v2 appVersion: 0.4.6 created: "2025-12-26T18:23:56.328991427Z" @@ -1559,4 +1581,4 @@ entries: urls: - https://github.com/lukaszraczylo/helm-charts/releases/download/kubemirror-0.2.8/kubemirror-0.2.8.tgz version: 0.2.8 -generated: "2025-12-26T18:23:56.328453793Z" +generated: "2025-12-27T01:43:25.603517295Z"