Skip to content

Commit 36b07dd

Browse files
fix(platform): install velero by default (#2833)
## What this PR does `backupstrategy-controller` has been installed by default since 494144f, and since f17ead3 its PackageSource declares a hard `dependsOn: cozystack.velero`. But `cozystack.velero` remained an *optional* package — so on any bundle that doesn't explicitly enable it (including the e2e sandbox, which enables only `cozystack.external-dns-application`), the `backupstrategy-controller` Package stays `DependenciesNotReady` forever and the `cozystack-platform` HelmRelease never becomes Ready: ``` Helm upgrade failed for release cozy-system/cozystack-platform: timeout waiting for: [Package/cozystack.backupstrategy-controller status: 'InProgress'] ``` Since 67b1a96 made the e2e install test gate on HelmRelease readiness, this deterministically fails CI on every PR (e.g. runs [27005526972](https://github.com/cozystack/cozystack/actions/runs/27005526972), [26974531181](https://github.com/cozystack/cozystack/actions/runs/26974531181) — the latter failed all 3 retry attempts with the same signature). This PR promotes `cozystack.velero` from optional to default in the system bundle, so the dependency is always satisfiable. Velero deploys standalone (`backupStorageLocation: null`); the cozy-default BSL still materialises only after the platform Bucket reconciles. The `bundles.disabledPackages` opt-out keeps working (covered by a new unit test), and the now-redundant velero entry is dropped from the isp-full-generic `enabledPackages`. ### Release note ```release-note fix(platform): Velero is now installed by default as a hard dependency of the backup subsystem. Existing clusters will get Velero deployed in the cozy-velero namespace on upgrade; opt out with bundles.disabledPackages if VM backups are not used. ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Velero backup and restore functionality is now installed by default with every system deployment, providing automatic backup management capabilities out of the box. * **Tests** * Added test coverage for default Velero installation behavior and package disable scenarios. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2 parents bc03142 + 2e23198 commit 36b07dd

3 files changed

Lines changed: 50 additions & 2 deletions

File tree

‎packages/core/platform/templates/bundles/system.yaml‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,11 @@
196196
{{include "cozystack.platform.package.default" (list "cozystack.cozystack-basics" $) }}
197197
{{include "cozystack.platform.package.default" (list "cozystack.backupstrategy-controller" $) }}
198198
{{include "cozystack.platform.package.default" (list "cozystack.backup-controller" $) }}
199+
{{- /* velero must be a default package: backupstrategy-controller (default)
200+
hard-depends on cozystack.velero, so an optional velero leaves the
201+
backupstrategy-controller Package permanently DependenciesNotReady and the
202+
cozystack-platform HelmRelease never becomes Ready. */}}
203+
{{include "cozystack.platform.package.default" (list "cozystack.velero" $) }}
199204
{{include "cozystack.platform.package.default" (list "cozystack.vertical-pod-autoscaler" $) }}
200205
{{include "cozystack.platform.package.default" (list "cozystack.metrics-server" $) }}
201206
{{- $monitoringAgentsComponents := dict "monitoring-agents" (dict "values" (dict "global" (dict "target" "tenant-root"))) -}}
@@ -214,7 +219,6 @@
214219
{{include "cozystack.platform.package.optional.default" (list "cozystack.external-dns-application" $) }}
215220
{{include "cozystack.platform.package.optional.default" (list "cozystack.kuberture" $) }}
216221
{{include "cozystack.platform.package.optional.default" (list "cozystack.external-secrets-operator" $) }}
217-
{{include "cozystack.platform.package.optional.default" (list "cozystack.velero" $) }}
218222
{{include "cozystack.platform.package.optional.default" (list "cozystack.linstor-gui" $) }}
219223
{{- if has "cozystack.bootbox" (default (list) .Values.bundles.enabledPackages) }}
220224
{{include "cozystack.platform.package.default" (list "cozystack.bootbox-application" $) }}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
suite: velero installed by default (backupstrategy-controller hard dependency)
2+
templates:
3+
- templates/bundles/system.yaml
4+
release:
5+
name: cozystack
6+
namespace: cozy-system
7+
tests:
8+
# backupstrategy-controller is a default package and its PackageSource
9+
# declares dependsOn: cozystack.velero. If velero is optional and not
10+
# enabled, the backupstrategy-controller Package stays
11+
# DependenciesNotReady forever and the cozystack-platform HelmRelease
12+
# never becomes Ready. Guard against velero regressing to optional.
13+
- it: emits the cozystack.velero Package by default (no enabledPackages)
14+
set:
15+
bundles:
16+
system:
17+
enabled: true
18+
variant: isp-full
19+
asserts:
20+
- containsDocument:
21+
apiVersion: cozystack.io/v1alpha1
22+
kind: Package
23+
name: cozystack.velero
24+
any: true
25+
26+
- it: keeps the disabledPackages opt-out working for cozystack.velero
27+
set:
28+
bundles:
29+
system:
30+
enabled: true
31+
variant: isp-full
32+
disabledPackages:
33+
- cozystack.velero
34+
- cozystack.backupstrategy-controller
35+
asserts:
36+
- containsDocument:
37+
apiVersion: cozystack.io/v1alpha1
38+
kind: Package
39+
name: cozystack.velero
40+
not: true
41+
- containsDocument:
42+
apiVersion: cozystack.io/v1alpha1
43+
kind: Package
44+
name: cozystack.backupstrategy-controller
45+
not: true

‎packages/core/platform/values-isp-full-generic.yaml‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,4 @@ bundles:
1111
naas:
1212
enabled: true
1313
enabledPackages:
14-
- cozystack.velero
1514
- cozystack.backupstrategy-controller

0 commit comments

Comments
 (0)