Installation
This page installs the bret CRDs and the manager. Install a backup tool first. See providers/.
Requirements
Section titled “Requirements”| Requirement | Version | Why |
|---|---|---|
| Kubernetes | 1.29 or newer | Native sidecars in checks (initContainers with restartPolicy: Always). |
| Helm | 3.14 or newer (the release is tested with 3.22.1) | Installs the chart. |
| CSI driver with snapshot support | any | copyMethod: Snapshot needs a VolumeSnapshotClass. |
| Backup tool | Velero 1.18, VolSync 0.17, or Kopiur 0.11 | The operator drives its restore objects. |
Verified versions
Section titled “Verified versions”| Component | Version |
|---|---|
| Velero | v1.18.2 (chart 12.2.5) |
| Velero AWS plugin | v1.14.4 |
| VolSync | 0.17.0 |
| Kopiur | 0.11.0 |
| PostgreSQL | 17.12 |
| kind node image | v1.37.0 |
| csi-driver-host-path | v1.19.0 |
| external-snapshotter | v8.7.0 |
Option A: Helm chart (recommended)
Section titled “Option A: Helm chart (recommended)”The chart is published as an OCI artifact with each release:
helm install bret-operator oci://ghcr.io/linogics/charts/bret-operator \ --version 0.1.0 \ --namespace bret-operator-system \ --create-namespaceCheck the installation:
kubectl -n bret-operator-system get deploy,podskubectl -n bret-operator-system logs deploy/bret-operatorkubectl get crd | grep bret.linogics.ioExpected: the deployment is 1/1 Available, and three CRDs are listed:
restorechecks, restores, restoretests.
Values you will likely change
Section titled “Values you will likely change”The full table is in charts/bret-operator/README.md.
| Value | Default | Change it when |
|---|---|---|
image.repository |
ghcr.io/linogics/bret-operator |
You pull from the Docker Hub mirror docker.io/linogics/bret-operator. |
image.tag |
chart appVersion |
You pin a different image. |
replicaCount |
1 |
Leader election keeps one active replica. More replicas only add standby. |
metrics.enabled |
true |
You do not scrape Prometheus. |
metrics.secure |
true |
Keep it true. Scrapers need a token (see below). |
resources |
requests 10m CPU / 64Mi memory, limits 500m CPU / 128Mi memory | Raise the memory limit when the cache grows with many objects. |
extraArgs |
[] |
You want more manager flags, for example --zap-log-level=debug. |
pollInterval |
30s |
A running attempt should be checked more or less often. Minimum 5s. Each poll is one API read per running attempt. |
Example values file:
metrics: enabled: true secure: trueresources: limits: cpu: 500m memory: 256Mi requests: cpu: 10m memory: 128MiextraArgs: - --zap-log-level=infohelm upgrade --install bret-operator oci://ghcr.io/linogics/charts/bret-operator \ --version 0.1.0 -n bret-operator-system -f restore-values.yamlMetrics scraping
Section titled “Metrics scraping”With metrics.secure: true, the endpoint on port 8443 needs a bearer token. The token’s
service account needs get on the /metrics non-resource URL. Example:
apiVersion: rbac.authorization.k8s.io/v1kind: ClusterRolemetadata: name: bret-operator-metrics-readerrules: - nonResourceURLs: ["/metrics"] verbs: ["get"]Bind it to your Prometheus service account with a ClusterRoleBinding.
Option B: plain manifests
Section titled “Option B: plain manifests”Each release attaches install.yaml to its GitHub release. It has the CRDs, RBAC, and the
deployment, all in bret-operator-system:
kubectl apply -f https://github.com/linogics/bret-operator/releases/download/v0.1.0/install.yamlPlain manifests do not upgrade cleanly across versions. Prefer the Helm chart for upgrades.
Upgrading
Section titled “Upgrading”The CRDs ship in the bret-operator-crds chart, which the bret-operator chart depends on. Helm
installs CRDs once and does not update them on upgrade. A new release can change the CRD schema.
So apply the CRDs yourself before you upgrade the chart:
apply CRDs (server-side) ─► helm upgradekubectl apply --server-side -f https://github.com/linogics/bret-operator/releases/download/v0.1.0/install.yamlhelm upgrade bret-operator oci://ghcr.io/linogics/charts/bret-operator --version 0.2.0 -n bret-operator-systemServer-side apply avoids the size limit on the last-applied annotation for large CRDs.
Upgrading to multi-volume sources
Section titled “Upgrading to multi-volume sources”- Recreate every existing
Restore,RestoreTestandRestoreCheckin the new shape. Old objects have nosources: aRestoreendsFailedwithSourceMissing, and aRestoreTestblocks and starts no runs. - The keys of the
bret.linogics.io/mover-uidannotation are nowsourcePVCvalues. Old keys are ignored without an error, and the mover falls back to therunAsUserof the container. RestoreTestafterBackupwatermarks reset once. They moved tostatus.lastHandledBackups.
Upgrading to RestoreTest for all providers
Section titled “Upgrading to RestoreTest for all providers”- A Velero
Restoresource needssourcePVC, like the other providers. List one source per PVC, all with the samebackupRef. - The Velero selectors moved from
sources[].labelSelectorandsources[].orLabelSelectorstospec.velero.labelSelectorandspec.velero.orLabelSelectors. RestoreTeststatus.pendingBackupschanged from a map to a list of{sourcePVC, name, createdAt}entries, likelastHandledBackups. The operator cannot read aRestoreTestthat still holds the old map, and logs an error for it until you recreate it. Recreate everyRestoreTestthat has a queued run.- A
backupSelector.namemust now name a finished backup. Before, the name was used as is, even for a KopiurSnapshotthat had not succeeded. Now the test waits withBackupNotFound.
Uninstalling
Section titled “Uninstalling”helm uninstall bret-operator -n bret-operator-systemHelm leaves the CRDs and any custom resources in place. Remove them only if you no longer
need your Restore, RestoreTest and RestoreCheck objects:
kubectl delete restoretests,restores,restorechecks --all -Akubectl delete crd restores.bret.linogics.io restoretests.bret.linogics.io restorechecks.bret.linogics.ioDeleting a CRD deletes every object of that kind. Back up the objects first if you keep them.
Where things live
Section titled “Where things live”| Object | Name | Namespace |
|---|---|---|
| Deployment | bret-operator |
bret-operator-system |
| ServiceAccount | bret-operator |
bret-operator-system |
| Metrics Service | bret-operator-metrics |
bret-operator-system |
| Leader election Role | bret-operator-leader-election |
bret-operator-system |
| ClusterRole | bret-operator-manager, bret-operator-metrics-auth |
cluster |
The names change with the release name. The Helm names above assume helm install bret-operator.
