Files
Timofei Larkin e63885c5a5 feat(cozystack-controller): reconcile application group APIServices
Wire the controller side of ApplicationGroupDefinitions:

- A new ApplicationGroupDefinitionReconciler materializes an
  aggregation-layer APIService (v1alpha1.<group>) per registration,
  cloning the service reference and cert-manager CA-injection
  annotation from the helm-managed v1alpha1.apps.cozystack.io
  reference so custom groups always target the same cozystack-api
  backend. The APIService is owned by its registration, so deleting
  the ApplicationGroupDefinition garbage-collects it. APIServices are
  managed as unstructured objects to avoid a kube-aggregator
  dependency; only reconciler-owned fields are enforced on update, so
  the cert-manager-injected caBundle survives.
- The debounced cozystack-api restart now hashes
  ApplicationGroupDefinitions next to ApplicationDefinitions and
  watches both, so registering or deleting a group rolls the apiserver
  the same way definition changes always have.
- The HelmRelease reconciler selects by the definition's effective
  group instead of a hardcoded apps.cozystack.io, matching the labels
  the REST storage now stamps.

Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
2026-07-24 17:18:53 +03:00
..