Andrei Kvapil
af320a86a0
fix(telemetry): use APIReader instead of cached client in operator
...
The cozystack-operator's manager cache is filtered to only include
specific secrets and namespaces with certain labels. This caused
telemetry collection to fail because resources like kube-system
namespace, nodes, services, and PVs were not in the cache.
Switch to using mgr.GetAPIReader() which bypasses the cache and
queries the API server directly. This is appropriate for telemetry
since it only runs every 15 minutes.
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2026-01-27 18:06:30 +01:00
Andrei Kvapil
987a74ae5a
refactor(telemetry): split telemetry between operator and controller
...
Split telemetry collection between cozystack-operator and cozystack-controller:
cozystack-operator now collects cluster-level metrics:
- cozy_cluster_info (cozystack_version, kubernetes_version)
- cozy_nodes_count (os, kernel)
- cozy_cluster_capacity (cpu, memory, nvidia.com/* resources)
- cozy_loadbalancers_count
- cozy_pvs_count (driver, size)
- cozy_package_info (name, variant)
cozystack-controller now collects application-level metrics:
- cozy_application_count (kind) - counts HelmReleases per ApplicationDefinition
Other changes:
- Add pkg/version for build-time version injection via ldflags
- Remove --cozystack-version flag (version now embedded at build time)
- Remove bundle/oidc configuration from telemetry (replaced by package_info)
- Remove cozy_workloads_count metric (replaced by cozy_application_count)
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2026-01-19 13:52:15 +01:00
Andrei Kvapil
05b2244b36
feat(operator): add secret replicator and reconciler improvements
...
Add namespace-based secret replication with label selector approach.
The implementation uses configurable secret name, namespace, and
target namespace selector. Cache filtering optimizes memory usage.
Co-Authored-By: Timofei Larkin <lllamnyp@gmail.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2026-01-06 16:31:40 +01:00
Andrei Kvapil
f28d639aea
[cozystack-operator] Add Package and PackageSource reconcilers
...
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-12-30 11:55:21 +01:00
Andrei Kvapil
db8a006565
Apply review suggestions
...
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-12-29 14:38:31 +01:00
Andrei Kvapil
2990f0520a
[cozystack-operator] Introduce Cozystack-operator core logic
...
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-12-25 10:59:48 +01:00