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>
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>