mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-21 20:23:39 +09:00
## What this PR does
Adds a `Kubernetes` backup strategy so a tenant Kubernetes application
can be backed up and restored through the backups framework, and routes
`apps.cozystack.io/Kubernetes` to it in `cozy-default`.
None of the existing strategies fits a tenant cluster:
- Its API state is a key prefix (`/<namespace>_<release>/`, the
TenantControlPlane's datastore schema) in the etcd `DataStore` shared by
every cluster of the tenant. The `Etcd` strategy snapshots the whole
DataStore, so restoring it would roll every tenant cluster back at once.
- Its control-plane CA, front-proxy CA, service-account key and Talos
secrets cannot be regenerated: new ones break every node, kubeconfig and
token issued under the old ones.
- Its PersistentVolumes are DataVolumes in the tenant namespace
(`pvc-<tenant pvc uid>`, labelled `cluster.x-k8s.io/cluster-name`), and
deleting the application deletes them.
**Backup** (`strategy.backups.cozystack.io/Kubernetes`, driver in
`internal/backupcontroller/kubernetesstrategy_*.go`):
1. Checks the control-plane and Talos certificates and sets a
`CertificatesExpiring` condition (plus a Warning event) when a CA
expires before the backup's TTL or a leaf within
`certificateWarningThreshold` (720h). This never fails the run.
2. A Job in the application namespace dumps the cluster's prefix with
`etcdctl` to the platform bucket. It authenticates with the cluster's
own `kubernetes-<name>-datastore-certificate`, the one its
kube-apiserver uses. It runs on a new `kubernetes-backup` image (alpine
+ curl + jq + etcdctl matching the platform's etcd).
3. A Velero backup takes the PKI Secrets (selected by
`kamaji.clastix.io/name` / `app.kubernetes.io/instance`; the driver adds
the instance label to the cert-manager-issued Talos CA Secrets, which
carry neither) and the data DataVolumes/PVCs. Worker system disks are
not backed up.
4. The Backup records the prefix, the endpoints, the data DataVolumes
and the HelmReleases of the cluster and its `KubernetesNodes` pools. The
HelmReleases are not in Velero because the lineage webhook labels worker
disks after the same applications, so a label selector for the releases
would also pick the disks.
**Restore** goes into the application the backup came from (rename /
cross-namespace is rejected). `RestoreJob.spec.options` takes `etcd` and
`volumes` (both default `true`) to restore either half alone:
- **Application gone**:
1. Restore the PKI Secrets and the volumes.
2. Recreate the cluster's HelmRelease. The Kamaji release this repo
ships gives a new TenantControlPlane a UID-keyed datastore schema, so
the restore waits for that schema.
3. Stop the new control plane, write the dump under the new prefix (keys
are moved from the old prefix), and start it again.
4. Recreate the worker pools last, so workers join the restored cluster
with the restored CA and Talos secrets rather than an empty one.
- **Application live**: suspend the cluster's HelmReleases, then stop
the MachineDeployments and the cluster-autoscaler (for `volumes`,
deleting the backed-up DataVolumes/PVCs once the Machines are gone), and
then the KamajiControlPlane (for `etcd`). Workers go first because CAPI
removes a worker's Node through the tenant API. Then write the selected
halves back and restore every replica count. Each original count is
recorded on the object it belongs to, so the cluster is put back on
success, on failure, after a 30-minute stop deadline, and when the
RestoreJob is deleted midway. A retry keeps the counts from before the
first attempt, and a HelmRelease suspended before the restore stays
suspended.
Before changing anything, a restore checks that the Velero backup is
still there and Completed, and that the dump object exists (a
verify-mode run of the Job). The restore mode is recorded in the
RestoreJob's status, so a RestoreJob cannot claim that a live cluster is
gone.
Before it runs `del --prefix`, the restore Job downloads and validates
the dump and saves the current prefix to `<dump>.pre-restore`. That copy
is never overwritten, so a retry cannot replace it with a partial
prefix, and it is dropped after a successful restore. The Job writes a
marker to its termination message, and the outcome depends on it:
- A failure before `del` resumes the cluster.
- A failure after `del` leaves the control plane stopped
(`KubernetesEtcdWriteFailed`) rather than started on a partial prefix.
- Deleting the RestoreJob while its restore Job runs also leaves it
stopped.
Events and master leases are skipped only as top-level resources. Velero
cannot overwrite an existing claim, so a live-cluster volume restore
deletes the current claims first; this is documented.
A backup whose Velero half fails deletes the etcd dump it already
uploaded, and a transient error creating the Backup is retried rather
than failing the run. Deleting a Backup removes the Velero backup
(DeleteBackupRequest) and the dump object plus its pre-restore copy (a
cleanup-mode Job, given up after five failed attempts with a Warning,
plus the same skip-artifact-cleanup escape hatch as Redis/Rabbitmq).
With `velero.bslEnabled=false` the strategy is not rendered, and the
DefaultObjectsGate does not count it as missing, the same as the Velero
strategies. Like every default strategy, it is also gated on its CRD
being established, so the upgrade that first ships the CRD to an
installed chart cannot wedge the release.
Also included: RBAC for
TenantControlPlanes/DataStores/KamajiControlPlanes/MachineDeployments/Machines/Deployments,
chart values (`kubernetesBackupClientImage`,
`kubernetesBackupActiveDeadlineSeconds`, `kubernetesBackupResources`), a
`make image-kubernetes-backup` target, docs in
`docs/operations/backup-classes.md`, and the
`examples/backups/kubernetes/` walkthrough.
### Verification
- `go test ./internal/backupcontroller/`: the new tests cover:
- the certificate windows, pool HelmRelease discovery, option parsing
and the restore-phase selectors;
- the full backup path;
- in-place restores with default options and etcd only;
- a pre-suspended HelmRelease;
- a failed etcd write leaving the control plane stopped, including on
RestoreJob deletion;
- RestoreJob deletion resuming a stopped cluster;
- the stop deadline;
- the preflight: missing or incomplete Velero backup, missing dump;
- a rebuild, and an unreadable HelmRelease record;
- rename rejection, a non-etcd datastore, and the cleanup attempt limit.
Each safeguard in the Go driver was checked by mutating it out and
confirming that a test fails. The rendered Job script has no committed
test: a unit test would have to extract the script from the rendered
chart, and its behaviour belongs in the chainsaw e2e follow-up instead.
It was run against stub `etcdctl`/`curl` in every mode and branch:
- a foreign key or an empty value stops it before any etcd call;
- an S3 answer other than 200/404 on the pre-restore copy stops it
before any etcd call;
- an existing copy is kept, and a missing one is uploaded before `del`;
- keys are moved from the old prefix to the new one;
- an object in a namespace named `events` is kept.
- `helm unittest` (29/29), `hack/backupstrategy-crd-gate.bats` and `helm
lint` on `backupstrategy-controller`.
- On a live cluster (Velero 1.18.1), with a tenant cluster holding a
ConfigMap marker and a file on a PVC:
- The same flow done by hand before the driver existed: back up, delete
the application, rebuild. The CA, front-proxy CA, SA key and Talos
secrets were byte-identical afterwards, the pre-backup admin kubeconfig
still worked, namespace and ConfigMap UIDs were unchanged, and the PVC
data came back.
- Through this driver: the BackupJob succeeded (432 keys dumped, Velero
backup Completed, Backup metadata as described above). The tenant
namespace holding the markers was then deleted, which also deleted its
PVC and the backing DataVolume, and a RestoreJob with default options
rolled the live cluster back. It stopped the workers and then the
control plane, wrote the prefix back, restored the volume, and restored
the control plane to 2 replicas, the pool and the autoscaler to 1, and
unsuspended the HelmRelease. A new worker joined. The namespace came
back with its original UID, the ConfigMap and the PVC (bound to the same
volume) with their data. That run caught an ordering bug, now fixed and
covered by a test: scaling the control plane down first left the old
Machine stuck in `Deleting`, because CAPI removes the Node through the
tenant API.
- On the current head, through the driver, against the same tenant
cluster:
- **Backup.** It succeeded. The volume list it recorded was taken before
Velero started.
- **`{"volumes":false}` restore after a ConfigMap was deleted and
another created.** The deleted ConfigMap came back and the newer one was
gone. The worker was left running and the volume data was untouched. The
restore waited for terminating control-plane Pods before writing. The
pre-restore copy was saved before `del` and dropped afterwards.
- **Rebuild after the application was deleted, with default options.**
It ran the full sequence: secrets, volumes, cluster HelmRelease,
datastore schema, stop, etcd write, resume. It succeeded in about 3
minutes. The CA and Talos CA were byte-identical, a new worker joined,
and the namespace and ConfigMap UIDs and the PVC data were back. The
tenant cluster runs on a Kamaji that still names schemas `<ns>_<name>`,
so this run did not exercise a prefix change; that path is covered by
the unit tests and the stub runs.
### Not in this PR
- A chainsaw e2e. The tenant Kubernetes suites are bounded by tight op
budgets that tests pin, so the round trip needs its own suite or a
budget change; it will be a follow-up.
- `rotationPolicy` on the Talos CA Certificate in the kubernetes chart
(cert-manager's default `Always` would rotate the CA key at renewal).
- Restore into another application name or namespace.
- The tenant's shared etcd DataStore runs with auth disabled, so any
cluster's datastore certificate can read its neighbours' prefixes. This
predates this change; the dump Job uses the same certificate the
cluster's kube-apiserver already holds.
### Screenshots
N/A — no UI changes.
### Downstream repositories
- [x] No downstream repository is affected by this change
- [ ] [cozystack/website](https://github.com/cozystack/website) -
follow-up:
- [ ]
[cozystack/terraform-provider-cozystack](https://github.com/cozystack/terraform-provider-cozystack)
- follow-up:
- [ ]
[cozystack/ansible-cozystack](https://github.com/cozystack/ansible-cozystack)
- follow-up:
- [ ] [cozystack/ccp](https://github.com/cozystack/ccp) - follow-up:
- [ ] [cozystack/talm](https://github.com/cozystack/talm) - follow-up:
- [ ] [cozystack/cozyhr](https://github.com/cozystack/cozyhr) -
follow-up:
- [ ] [cozystack/cozy-proxy](https://github.com/cozystack/cozy-proxy) -
follow-up:
- [ ]
[cozystack/cozystack-telemetry-server](https://github.com/cozystack/cozystack-telemetry-server)
- follow-up:
- [ ]
[cozystack/external-apps-example](https://github.com/cozystack/external-apps-example)
- follow-up:
- [ ] [cozystack/examples](https://github.com/cozystack/examples) -
follow-up:
- [ ] [cozystack/community](https://github.com/cozystack/community) -
follow-up:
Walked against the diff: no package under `packages/apps|extra` is added
or renamed, `packages/core/platform` and installer values are untouched,
the new CRD is in `strategy.backups.cozystack.io` (not typed by
terraform-provider), and `RestoreJob.spec.options` stays opaque JSON.
### Release note
```release-note
feat(backups): tenant Kubernetes applications can now be backed up and restored through the cozy-default BackupClass. A backup captures the cluster's etcd state and its control-plane PKI and PersistentVolume data, and warns when a control-plane CA would expire before the backup does. A restore rebuilds a deleted cluster with its original CA or rolls a live one back, and can restore the etcd state and the volumes separately via RestoreJob options `etcd` and `volumes`.
```
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## Summary by CodeRabbit
- **New Features**
- Added Kubernetes application backup and restore support, including
etcd data and persistent volumes.
- The default backup class now routes Kubernetes applications to the new
strategy.
- Added an end-to-end walkthrough for creating a cluster, backing it up,
restoring it in place or after deletion, and cleaning up.
- Backup status can report expiring certificates, and restore validation
helps protect cluster identity and state.
- **Documentation**
- Added guidance on backup contents, restore behavior, and walkthrough
configuration.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
224 lines
13 KiB
YAML
224 lines
13 KiB
YAML
backupStrategyController:
|
|
image: "ghcr.io/cozystack/cozystack/backupstrategy-controller:v1.6.0@sha256:e8bf0521d1d1d8b90ebe66e9013010887033ba2653901799d57f2df47c9d879e"
|
|
# chBackupClientImage is rendered into the Altinity strategy Pod, which drives
|
|
# clickhouse-backup's HTTP API with curl + jq. rabbitmqBackupClientImage is
|
|
# rendered into the RabbitMQ strategy Pod, which calls the management API and
|
|
# moves the definitions export to S3 with curl --aws-sigv4. Both run the
|
|
# images/backup-http-client/ image (alpine + curl + jq + ca-certificates) and
|
|
# must hold the same ref: one repository pinned at two digests fails the
|
|
# release promotion (hack/image-pin-consistency.bats). They are separate keys
|
|
# so either strategy can move to its own image later.
|
|
# DO NOT hand-edit: `make image` stamps both.
|
|
chBackupClientImage: "ghcr.io/cozystack/cozystack/backup-http-client:v1.6.0"
|
|
rabbitmqBackupClientImage: "ghcr.io/cozystack/cozystack/backup-http-client:v1.6.0"
|
|
# redisBackupClientImage is rendered into the Redis strategy Pod. The
|
|
# spotahome operator ships no backup CRD, so the strategy runs a one-shot Job
|
|
# that dumps an RDB snapshot to S3 and, on restore, loads it into a throwaway
|
|
# redis to emit a faithful replay stream. It ships its own image (redis 8 +
|
|
# curl) built from images/redis-backup/; `make image` re-digests this value.
|
|
redisBackupClientImage: "ghcr.io/cozystack/cozystack/redis-backup:v1.6.0"
|
|
# redisBackupActiveDeadlineSeconds bounds one backup/restore Job so a run that
|
|
# wedges (e.g. a --rdb dump blocking on a stalled master) becomes a Failed Job
|
|
# the driver reports, rather than a Running BackupJob a cron Plan stacks behind.
|
|
# The driver promotes this to the Job's activeDeadlineSeconds, so it bounds the
|
|
# whole run across retries, not each Pod attempt separately.
|
|
redisBackupActiveDeadlineSeconds: 3600
|
|
# redisBackupResources sizes the Redis strategy Pod. Restore is the demanding
|
|
# side: the throwaway loader holds the whole dataset in memory and writes the
|
|
# RDB plus its AOF rewrite to ephemeral storage, so a large Redis needs memory
|
|
# and ephemeral-storage well above the backup's. Raise these for tenants with
|
|
# large instances; the defaults suit small-to-medium ones.
|
|
redisBackupResources:
|
|
requests:
|
|
cpu: 10m
|
|
memory: 64Mi
|
|
ephemeral-storage: 256Mi
|
|
limits:
|
|
cpu: "1"
|
|
memory: 1Gi
|
|
ephemeral-storage: 4Gi
|
|
# kubernetesBackupClientImage is rendered into the Kubernetes strategy Pod,
|
|
# which dumps a tenant cluster's etcd prefix with etcdctl and moves it to S3
|
|
# with curl. Built from images/kubernetes-backup/; `make image` re-digests it.
|
|
kubernetesBackupClientImage: "ghcr.io/cozystack/cozystack/kubernetes-backup:v1.6.0"
|
|
# kubernetesBackupActiveDeadlineSeconds bounds one etcd dump/restore Job.
|
|
kubernetesBackupActiveDeadlineSeconds: 3600
|
|
# kubernetesBackupResources sizes the Kubernetes strategy Pod. The dump is held
|
|
# in ephemeral storage while it moves and jq reads it into memory, so a
|
|
# cluster with a large etcd prefix needs more of both.
|
|
kubernetesBackupResources:
|
|
requests:
|
|
cpu: 10m
|
|
memory: 64Mi
|
|
ephemeral-storage: 256Mi
|
|
limits:
|
|
cpu: "1"
|
|
memory: 1Gi
|
|
ephemeral-storage: 2Gi
|
|
# The Kafka metadata strategy carries no client image here: unlike the Altinity
|
|
# and RabbitMQ drivers, which need only curl (plus jq for Altinity), its driver
|
|
# runs the Kafka Admin-API CLI (kafka-topics / kafka-configs), which only the
|
|
# Strimzi broker image ships. So the controller resolves the image from
|
|
# the target Kafka broker at reconcile time (strategy-kafka-default.yaml renders
|
|
# the container image as the "{{ .ClientImage }}" placeholder), and records it on
|
|
# the Backup so cleanup can reuse it once the broker is gone. No pin to drift.
|
|
replicas: 2
|
|
debug: false
|
|
metrics:
|
|
enabled: true
|
|
bindAddress: ":8443"
|
|
resources:
|
|
requests:
|
|
cpu: 10m
|
|
memory: 64Mi
|
|
limits:
|
|
cpu: 500m
|
|
memory: 128Mi
|
|
# backupStorage describes the platform-managed S3 bucket used by every
|
|
# default BackupClass strategy. The bucket lives in the backupStorage.namespace
|
|
# (tenant-root by default) and is provisioned through the apps.cozystack.io/Bucket CR.
|
|
# Tenants never see these coordinates directly — they reference cozy-default
|
|
# BackupClass and the backupstrategy-controller projects credentials per BackupJob.
|
|
backupStorage:
|
|
# provisionBucket controls whether to create the apps.cozystack.io/Bucket CR.
|
|
# Set to false when the cluster runs against an external S3 (no SeaweedFS)
|
|
# and the admin manages the credentials Secret manually.
|
|
provisionBucket: true
|
|
# The Bucket CR lives in tenant-root (a tenant namespace) because the
|
|
# apps.cozystack.io/Bucket chart's RBAC helper fails Helm render on any
|
|
# namespace that does not start with "tenant-" (see
|
|
# packages/library/cozy-lib/templates/_rbac.tpl). tenant-root is the
|
|
# root tenant present on every Cozystack install, so the system Bucket
|
|
# naturally lives there. Cross-namespace Secret read is granted to the
|
|
# backupstrategy-controller via cluster-scoped Secret RBAC.
|
|
namespace: tenant-root
|
|
bucketName: cozy-backups
|
|
# bucketNameOverride is an escape hatch for offline `helm template`
|
|
# renders (CI / local diffs). When set, the chart skips the live-cluster
|
|
# BucketClaim status lookup and uses this string as the S3 bucket name.
|
|
# Leave empty in production — the COSI driver assigns its own bucket
|
|
# name independent of .bucketName above, and the BucketClaim status
|
|
# is the only authoritative source.
|
|
bucketNameOverride: ""
|
|
# endpoint is the S3 endpoint URL shared by every default Strategy CR, the
|
|
# Velero BSL and the controller Deployment. For a provisioned bucket
|
|
# (provisionBucket: true, the default) it is NOT used verbatim: the
|
|
# "backupstrategy-controller.endpoint" helper derives the real endpoint from
|
|
# the COSI bucket's system credentials Secret (backupStorage.systemSecretName)
|
|
# and forces https://, because Cozystack's SeaweedFS runs with
|
|
# enableSecurity=true and serves TLS on :8333 behind the self-signed
|
|
# "SeaweedFS CA". The COSI-advertised endpoint is the external S3 ingress
|
|
# (ACME cert), which every consumer can verify — unlike the in-cluster
|
|
# service, whose CA is not plumbed to the backup operators and which the Etcd
|
|
# Strategy's S3 schema (no caCert field) cannot target at all.
|
|
#
|
|
# This value is the FALLBACK, used only when the derivation cannot run:
|
|
# - provisionBucket: false (external S3) — set it to your S3 endpoint,
|
|
# scheme included; it is used verbatim (the MariaDB/FDB strategies compute
|
|
# their secure flag from the scheme, so https:// enables TLS there — make
|
|
# the CA bundle reachable to those operators before pointing at a
|
|
# self-signed external endpoint);
|
|
# - offline `helm template` / unit renders and the pre-reconcile first
|
|
# install, where the Secret lookup returns nothing.
|
|
endpoint: http://seaweedfs-s3.tenant-root.svc.cozy.local:8333
|
|
# region is re-projected into cozy-backups-creds on the next reconcile
|
|
# (1-minute tick for system namespaces, on-demand for tenant namespaces).
|
|
region: us-east-1
|
|
forcePathStyle: true
|
|
# systemSecretName — the human-friendly Secret produced by the Bucket
|
|
# application in the backupStorage.namespace (tenant-root by default). The Bucket release is
|
|
# wrapped with the bucket-rd "bucket-" prefix (see
|
|
# packages/system/bucket-rd/cozyrds/bucket.yaml), so the human-friendly
|
|
# Secret rendered by packages/system/bucket/templates/user-credentials.yaml
|
|
# is named <bucket-release>-<user>-credentials. The projector also
|
|
# tolerates the raw COSI Secret format (single BucketInfo JSON key) so a
|
|
# cluster that wires an external S3 Secret manually still works.
|
|
systemSecretName: bucket-cozy-backups-system-credentials
|
|
# endpointCASecretName — optional Secret (key ca.crt) in the app namespace
|
|
# that the Redis strategy Pod trusts when the S3 endpoint is https with a
|
|
# self-signed cert (e.g. SeaweedFS). Empty by default: the projected endpoint
|
|
# is always https and the platform bucket's ACME cert verifies against the
|
|
# image's system CA store unaided, so no CA override is needed. Set it only for
|
|
# a private-CA endpoint. When set, the Secret is required — a missing one fails
|
|
# the Pod loudly rather than silently skipping verification.
|
|
endpointCASecretName: ""
|
|
# insecureSkipTLSVerify disables S3 certificate verification (curl -k). Off by
|
|
# default and an explicit opt-in, never a fallback: leaving it false keeps an
|
|
# untrusted-cert endpoint failing closed instead of silently insecure. Prefer
|
|
# endpointCASecretName for a self-signed endpoint.
|
|
insecureSkipTLSVerify: false
|
|
# systemNamespaces — namespaces where the controller eagerly projects
|
|
# cozy-backups-creds so long-lived static references (Velero BSL, FDB
|
|
# operator deployments) keep finding the Secret without on-demand
|
|
# rendering. Tenants are projected lazily during BackupJob reconcile.
|
|
systemNamespaces:
|
|
- cozy-velero
|
|
# reconcileDefaultObjects enables the controller's DefaultObjectsGate.
|
|
#
|
|
# The Strategy CRs and the Velero BSL below are Helm-templated behind a
|
|
# `lookup` of the BucketClaim THIS chart creates, because the S3 bucket
|
|
# name is assigned by the COSI driver (bucket-<claim-UID>) and cannot be
|
|
# computed at render time. On a fresh install the lookup is empty and those
|
|
# templates render nothing — and helm-controller does not re-render a
|
|
# release whose chart and values did not change (drift detection is off on
|
|
# operator-generated HelmReleases), so the skip is PERMANENT. Clusters have
|
|
# run for months with only the BackupClass present and no Strategy CRs at
|
|
# all; recovery needed a hand-stamped reconcile.fluxcd.io/forceAt +
|
|
# requestedAt, because a plain reconcile request does not re-render.
|
|
#
|
|
# The systemSecretName Secret above sits one release earlier in the same
|
|
# trap: packages/system/bucket/templates/user-credentials.yaml renders it
|
|
# behind a `lookup` of the COSI Secret, and skips it just as permanently.
|
|
# Without it the projector has no source at all, so nothing downstream can
|
|
# resolve — and neither can this gate, which reads the bucket name from it.
|
|
#
|
|
# With this enabled the controller repairs both, in order: while the
|
|
# credentials Secret is missing it forces the bucket's <bucket>-system
|
|
# release; once the bucket name resolves it checks that every object
|
|
# cozy-default routes to exists and forces THIS release when any is
|
|
# missing. It repairs a stale S3 endpoint the same way: when the
|
|
# credentials Secret's endpoint differs from the COSI Secret it is rendered
|
|
# from it forces the bucket's <bucket>-system release (only while
|
|
# systemSecretName is bucket-<bucketName>-system-credentials, the one
|
|
# Secret that release renders), and when the
|
|
# backups.cozystack.io/endpoint annotation on the Velero BSL or a default
|
|
# Strategy differs from the credentials Secret's endpoint, or is absent, it
|
|
# forces THIS release. The COSI Secret itself keeps the endpoint it was granted with, so
|
|
# after a publishing.host change that endpoint follows only once the
|
|
# BucketAccess is re-granted. Both are throttled, independently, and a no-op
|
|
# in the steady state. A suspended release is skipped rather than
|
|
# re-stamped forever. The gate does NOT create the objects itself: their
|
|
# bodies are values-driven and Helm stays their single owner.
|
|
#
|
|
# Turn this off only if you manage the default Strategy CRs out of band and
|
|
# accept that a missed install-time render is never repaired. Watch
|
|
# cozystack_backup_default_objects_missing (paired with
|
|
# cozystack_backup_default_objects_check_errors_total, which marks the
|
|
# gauge stale) if you do.
|
|
reconcileDefaultObjects: true
|
|
# velero — BSL rendering. The cozy-default BackupStorageLocation is
|
|
# created in cozy-velero by templates/velero-bsl.yaml so endpoint/bucket/
|
|
# region come from the same backupStorage block used by Strategy CRs and
|
|
# the projector, eliminating drift.
|
|
#
|
|
# bslEnabled defaults to TRUE because cozystack.velero is a hard
|
|
# dependsOn for this PackageSource (see
|
|
# packages/core/platform/sources/backupstrategy-controller.yaml) — the
|
|
# Velero CRDs are guaranteed to exist by the time this chart installs.
|
|
# The BSL template additionally gates itself on a populated BucketClaim
|
|
# status via the bucketName helper, so on a bootstrap install the BSL
|
|
# materialises only after the platform Bucket reconciles AND the
|
|
# DefaultObjectsGate has forced a real Helm upgrade (an interval reconcile
|
|
# alone does not re-render). Setting this
|
|
# to false is an explicit opt-out for clusters that disable VM backups
|
|
# entirely and want to avoid the cluster-default BSL. In that case the
|
|
# cozy-default-velero-vminstance / -vmdisk Strategy CRs are gated off the
|
|
# same flag and are NOT rendered either, so the DefaultObjectsGate does
|
|
# not expect them (it would otherwise force a Helm upgrade forever against
|
|
# a render that can never produce them). VM BackupJobs against cozy-default
|
|
# still fail, because the BackupClass keeps routing VMInstance / VMDisk to
|
|
# those absent strategies.
|
|
velero:
|
|
bslEnabled: true
|
|
namespace: cozy-velero
|