Commit Graph
3 Commits
Author SHA1 Message Date
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
Andrei Kvapil 88baceae2c [platform] Make cozystack-api reconciliation always use Deployment
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2026-02-14 01:59:40 +01:00
Andrei KvapilandClaude 57c8cc26d4 refactor(api): rename CozystackResourceDefinition to ApplicationDefinition
Rename the CRD and all related types for better clarity:
- CozystackResourceDefinition -> ApplicationDefinition
- CozystackResourceDefinitionList -> ApplicationDefinitionList
- CozystackResourceDefinitionSpec -> ApplicationDefinitionSpec
- All related nested types updated accordingly

Updated components:
- API types and generated deepcopy code
- Controllers and reconcilers
- Dashboard, lineagecontrollerwebhook, crdmem packages
- CRD YAML definition and Helm chart
- All 25 cozyrds YAML manifests
- Migration scripts and documentation

Added migration 23 to remove old cozystack-resource-definition-crd HelmRelease.

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2026-01-15 22:35:56 +01:00