Files
Aleksei Sviridkin fd6e121b28 fix(platform): make *-rd sources depend on cozystack-engine
Every *-application PackageSource that ships a system/*-rd component
renders an ApplicationDefinition (cozystack.io/v1alpha1). That CRD is
installed by the application-definition-crd component of
cozystack-engine. Without an explicit dependsOn edge, a fresh install
where Flux reconciles a *-application source before cozystack-engine
fails to render with `no matches for kind "ApplicationDefinition" in
version "cozystack.io/v1alpha1"`, which cascades into a broad install
timeout unrelated to whatever change triggered the reconcile.

Add `- cozystack.cozystack-engine` to the dependsOn of every source that
ships a system/*-rd component; gateway-application already carried the
edge for the TenantGateway CRD. Add a generic invariant test that fails
if any such source is missing the edge, so future sources cannot
reintroduce the race.

Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Aleksei Sviridkin <f@lex.la>
2026-06-24 22:43:56 +03:00

31 lines
810 B
YAML

---
apiVersion: cozystack.io/v1alpha1
kind: PackageSource
metadata:
name: cozystack.postgres-application
spec:
sourceRef:
kind: OCIRepository
name: cozystack-packages
namespace: cozy-system
path: /
variants:
- name: default
dependsOn:
- cozystack.networking
- cozystack.postgres-operator
# cozystack-engine ships the ApplicationDefinition CRD rendered by the *-rd component below.
- cozystack.cozystack-engine
libraries:
- name: cozy-lib
path: library/cozy-lib
components:
- name: postgres
path: apps/postgres
libraries: ["cozy-lib"]
- name: postgres-rd
path: system/postgres-rd
install:
namespace: cozy-system
releaseName: postgres-rd