openova/clusters/_template/bootstrap-kit/14-crossplane-claims.yaml
e3mrah 2d1799d738
fix(bp-crossplane): split XRDs+Compositions into bp-crossplane-claims (#247)
Resolves install ordering on fresh clusters where the apiserver rejects
CompositeResourceDefinition CRs because the apiextensions.crossplane.io
CRDs registered by the crossplane subchart aren't live yet at apply time.

- bp-crossplane bumped 1.1.2 -> 1.1.3 (controller-only payload)
- NEW bp-crossplane-claims@1.0.0 carries XRDs + Compositions
- Flux HelmRelease for crossplane-claims uses dependsOn: [bp-crossplane]
- composition-validate.sh + fixtures relocate to the new chart
- blueprint-release CI: opt-out annotation
  catalyst.openova.io/no-upstream=true permits zero-deps charts that
  legitimately ship only Catalyst-authored CRs (the original hollow-chart
  rule remains in force for every other umbrella chart)

Live error this fixes (from otech.omani.works):
  no matches for kind "CompositeResourceDefinition" in version
  "apiextensions.crossplane.io/v1" -- ensure CRDs are installed first

Pattern: intra-chart CRD-ordering breaks -> split charts + Flux dependsOn.
Apply universally to similar cases going forward.

Co-authored-by: hatiyildiz <hatice.yildiz@openova.io>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 16:55:05 +04:00

59 lines
1.9 KiB
YAML

# bp-crossplane-claims — Catalyst Day-2 CRUD XRDs (compose.openova.io/v1alpha1)
# + default Hetzner-backed Compositions. Split out of bp-crossplane at
# release 1.1.3 to resolve intra-chart CRD-ordering: a single Helm release
# cannot install a CRD AND a CR of that CRD's kind in one apply pass —
# the apiserver rejects the CR because the CRD is not yet registered.
#
# Wrapper chart: platform/crossplane-claims/chart/
# Reconciled by: Flux on the new Sovereign's k3s control plane, AFTER
# bp-crossplane is Ready (dependsOn below) — at which point
# the apiextensions.crossplane.io/v1 CRDs that the upstream
# crossplane subchart registers are live.
---
apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: HelmRepository
metadata:
name: bp-crossplane-claims
namespace: flux-system
spec:
type: oci
interval: 15m
url: oci://ghcr.io/openova-io
secretRef:
name: ghcr-pull
---
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: bp-crossplane-claims
namespace: flux-system
spec:
interval: 15m
timeout: 15m
releaseName: crossplane-claims
targetNamespace: crossplane-system
# bp-crossplane installs the apiextensions.crossplane.io/v1 CRDs
# (CompositeResourceDefinition, Composition) via the upstream subchart's
# CRD payload. We MUST wait until that HelmRelease reports Ready=True
# before applying the XRDs+Compositions in this chart, otherwise the
# apiserver returns:
# no matches for kind "CompositeResourceDefinition" in version
# "apiextensions.crossplane.io/v1" -- ensure CRDs are installed first
dependsOn:
- name: bp-crossplane
chart:
spec:
chart: bp-crossplane-claims
version: 1.0.0
sourceRef:
kind: HelmRepository
name: bp-crossplane-claims
namespace: flux-system
install:
remediation:
retries: 3
upgrade:
remediation:
retries: 3