Files
cozystack/packages/core/platform/sources/keda.yaml
T
Alexey Artamonov 7f8f2c1d86 feat(keda): add KEDA as an optional platform component
Vendor the upstream KEDA chart (kedacore/keda 2.20.2) as a new optional
system package and wire it into the platform, so database read-replica
autoscaling (which renders KEDA ScaledObjects) has a backend.

- packages/system/keda: umbrella cozy-keda + vendored chart (Makefile
  pins KEDA_CHART_VERSION with a lockstep assert), shim values enabling
  the operator / metrics-server / webhook ServiceMonitors under the
  platform Prometheus.
- core/platform: PackageSource cozystack.keda (namespace cozy-keda,
  dependsOn networking + prometheus-operator-crds; cert-manager is not
  needed, KEDA self-generates its webhook TLS) plus an optional bundle
  entry, opt-in via bundles.enabledPackages. It is not a dependsOn of any
  default package, so the platform HelmRelease never blocks on it.
- KEDA claims the cluster-wide external.metrics.k8s.io APIService
  (distinct from metrics-server's metrics.k8s.io — no conflict).

Covered by helm unittest: platform bundle enable/disable/opt-out, the
PackageSource dependsOn, and the vendored chart's external-metrics
APIService + shim-enabled ServiceMonitor.

Signed-off-by: Alexey Artamonov <aleksei.artamonov@aenix.io>
2026-09-04 23:18:47 +03:00

37 lines
1.3 KiB
YAML

---
apiVersion: cozystack.io/v1alpha1
kind: PackageSource
metadata:
name: cozystack.keda
spec:
sourceRef:
kind: OCIRepository
name: cozystack-packages
namespace: cozy-system
path: /
variants:
- name: default
# Install-order dependencies only:
# - cozystack.networking: CNI must be reconciled before the operator pod schedules.
# - cozystack.prometheus-operator-crds: the shim enables a ServiceMonitor, whose
# CRD must exist before the manifest is applied.
#
# cert-manager is intentionally NOT listed: the KEDA chart generates its own
# admission-webhook TLS (built-in CA), so cert-manager is not a prerequisite.
#
# KEDA is an OPTIONAL package (enabled via bundles.enabledPackages) and must
# never appear in a default package's dependsOn, or the platform HelmRelease
# would stay DependenciesNotReady whenever KEDA is not enabled. It claims the
# cluster-wide external.metrics.k8s.io APIService (distinct from metrics-server's
# metrics.k8s.io, so no conflict) — the deliberate platform-wide dependency
# database read-replica autoscaling rests on.
dependsOn:
- cozystack.networking
- cozystack.prometheus-operator-crds
components:
- name: keda
path: system/keda
install:
namespace: cozy-keda
releaseName: keda