kadet-hub logokadet-hub

velero

Renders Velero Backups, Schedules, Restores and storage locations from inventory parameters.

kubernetesoperators

Latest
1.0.2 ·
License
Apache-2.0
Owners
Moep90
Source
github.com/kadet-hub/generators · 0 repo stars, shared by 35 generators
Thumbs up
👍 0 on GitHub Discussions
Popularity
18 · 438 pulls

Request a feature Report a problem

Badge

Show the latest listed version in your README. shields.io draws the badge from this page's badge.json, which every catalog build updates; once no version is listed, it reads "not listed".

[![kadet-hub](https://img.shields.io/endpoint?url=https://kadet-hub.org/generators/velero/badge.json)](https://kadet-hub.org/generators/velero/)

Velero Generator

Published on kadet-hub: pin a released version by digest from its catalog page.

Kapitan kadet generator for Velero resources (velero.io/v1). Built for Velero 1.18.4.

  • Backup: one-shot backup of cluster resources and volumes
  • Schedule: cron-driven Backup
  • Restore: restore from a Backup or from the latest backup of a Schedule
  • BackupStorageLocation: object storage target for backups
  • VolumeSnapshotLocation: provider target for volume snapshots

Only these custom resources are rendered. The Velero install (Deployment, node agent, credentials Secret) belongs in the helm or kubernetes generator. One-shot request kinds (ServerStatusRequest, DownloadRequest, DeleteBackupRequest) are out of scope: a DeleteBackupRequest reconciled from Git deletes backups again on every sync. BackupRepository, PodVolumeBackup, PodVolumeRestore, DataUpload and DataDownload are created by Velero itself.

Usage

Kapitan Configuration

parameters:
  kapitan:
    dependencies:
      - type: oci
        source: ghcr.io/kadet-hub/velero@sha256:<digest>
        output_path: lib/velero
    compile:
      - output_path: manifests/velero/
        input_type: kadet
        output_type: yml
        input_paths:
          - lib/velero

Inventory Contract

All keys live under parameters.generators.velero.

Key Kind Output key
backups.<name> Backup <namespace>/<name>-backup
schedules.<name> Schedule <namespace>/<name>-schedule
restores.<name> Restore <namespace>/<name>-restore
backup_storage_locations.<name> BackupStorageLocation <namespace>/<name>-bsl
volume_snapshot_locations.<name> VolumeSnapshotLocation <namespace>/<name>-vsl

Every entry accepts namespace, labels, annotations and a spec dict that passes through to the resource spec. Precedence is generator defaults < spec < flat keys: a flat key wins over the same field in spec and logs a warning.

Namespace: namespace on the entry, then generators.velero.namespace, then velero. parameters.namespace is not read: the Velero server only watches its install namespace, and parameters.namespace usually names a workload namespace.

Flat keys map to the camelCase CRD field of the same name (included_namespaces → includedNamespaces). Exceptions are noted.

Kind Flat keys
Backup included_namespaces, excluded_namespaces, included_resources, excluded_resources, label_selector, storage_location, volume_snapshot_locations, ttl, snapshot_volumes, default_volumes_to_fs_backup, snapshot_move_data, include_cluster_resources
Schedule schedule, paused, skip_immediately, use_owner_references_in_backup, template (Backup flat keys plus its own spec passthrough, rendered as spec.template)
Restore backup_name, schedule_name, included_namespaces, excluded_namespaces, namespace_mapping, restore_pvs (→ restorePVs), existing_resource_policy, preserve_node_ports
BackupStorageLocation provider, bucket, prefix, ca_cert, ca_cert_ref (→ objectStorage.{bucket,prefix,caCert,caCertRef}; caCert is deprecated upstream), config, credential, default, access_mode, backup_sync_period, validation_frequency
VolumeSnapshotLocation provider, config, credential

A Restore must set exactly one of backup_name and schedule_name (or backupName/scheduleName in spec), otherwise the compile fails with ValueError: velero Restore '<name>': .... The Velero controller enforces the same rule at runtime.

Defaults

The generator fills in two fields when the inventory sets them neither as a flat key nor in spec.

Field Default Reason
BackupStorageLocation default true if backup_storage_locations has exactly one entry Backups without storageLocation go to the location marked default. Without one, Velero falls back to a location named default through the server flag --default-backup-storage-location, which is deprecated for removal in v2.0, and the controller warns that no default is set. See locations.
Schedule template {} The CRD requires it. An empty template backs up all namespaces (Schedule API).

Set default: false on the single location when another location, for example one from the Velero Helm chart, is the default. If two locations are marked default, Velero keeps the one created last.

All other unset keys are not emitted, so the Velero server flags decide: ttl 720h, defaultVolumesToFsBackup and snapshotMoveData off, backupSyncPeriod and validationFrequency 1m. These keys are deliberately left without a generator default:

  • use_owner_references_in_backup stays unset (false). With true, deleting the Schedule deletes its backups (Schedule API).
  • prefix is not derived. Velero needs a dedicated bucket or a prefix (locations), and changing the prefix of a location in use hides its existing backups.
  • config keys of the AWS plugin are not derived from s3Url. s3ForcePathStyle: "true" is for path-style services such as MinIO and then requires region (plugin v1.14.4). config values are strings: write "true", not true.
  • VolumeSnapshotLocations get no default: with one location per provider, Velero uses it automatically (locations).

schedule is a five-field cron expression. Prefix it with CRON_TZ=<IANA zone> to keep the run time across daylight saving changes (backup reference).

Example

parameters:
  generators:
    velero:
      backup_storage_locations:
        default:
          provider: aws
          bucket: velero-backups
          prefix: cluster-a
          config:
            region: eu-central-1
          credential:
            name: cloud-credentials
            key: cloud
      volume_snapshot_locations:
        default:
          provider: aws
          config:
            region: eu-central-1
      schedules:
        nightly:
          schedule: "CRON_TZ=Europe/Berlin 0 2 * * *"
          template:
            included_namespaces: ["*"]
            excluded_namespaces: [kube-system]
            ttl: 168h0m0s
            spec:
              itemOperationTimeout: 4h0m0s
      backups:
        pre-upgrade:
          included_namespaces: [apps]
          snapshot_move_data: true
      restores:
        apps-from-nightly:
          schedule_name: nightly
          included_namespaces: [apps]
          namespace_mapping:
            apps: apps-restored
          restore_pvs: true

This renders velero/default-bsl (marked default as the only location), velero/default-vsl, velero/nightly-schedule, velero/pre-upgrade-backup and velero/apps-from-nightly-restore.

Versions

Add a version's inventory entry, then compile with the consumer workflow, which verifies the artifact and runs Kapitan in the sandbox.

Free of charge, as is and on a best-effort basis: use at your own risk, and review the compiled output before you apply it. Terms

This catalog was built from index serial 47. Set index_serial: 47 in .kapitan-sandbox.yaml and the consumer workflow refuses any older index, so a rolled-back index cannot bring back a yanked version.

Checks find known patterns; they do not prove a generator safe. What a listing covers

VersionBuilt for (schema-checked)
1.0.2Velero 1.18.4
1.0.1Velero 1.18.4
1.0.0Velero 1.18.4
1.0.2

Inventory

parameters:
  kapitan:
    dependencies:
      - type: oci
        source: ghcr.io/kadet-hub/velero:1.0.2@sha256:95c56a6cf87a55863b987e58fd2d21cea24c67b91ff9bac2fec2d796c8c8f46b
        output_path: lib/velero

Verify

gh attestation verify \
  oci://ghcr.io/kadet-hub/velero@sha256:95c56a6cf87a55863b987e58fd2d21cea24c67b91ff9bac2fec2d796c8c8f46b \
  --owner kadet-hub \
  --cert-identity https://github.com/kadet-hub/registry/.github/workflows/release.yml@refs/heads/main

Transparency log: Rekor entry 3250470238, in Sigstore's public, append-only log, so the attestation stays checkable independent of this site.

Kapitan declared
>=0.36.3,<0.37
Kapitan checked
0.36.3
Backends checked
not recorded
With --cache
not recorded
krab
compatible
Built for (schema-checked)
Velero 1.18.4
Source
velero-v1.0.2 · e4891e8fd85ca0a19ebf361e8b54fd6473fd8a2f · velero
Binaries
none
Output capabilities
none
Digest
sha256:95c56a6cf87a55863b987e58fd2d21cea24c67b91ff9bac2fec2d796c8c8f46b

Checks

Checked by the release run on , gate at daf634a691aa.

  • Secrets gitleaks 8.30.1
    No secret matched the marketplace's gitleaks rules.
  • Malware ClamAV 1.5.4
    No file matched a ClamAV signature.
  • Malicious package heuristics GuardDog 3.2.0
    No GuardDog threat rule matched.
  • Dangerous code Semgrep 1.180.0
    No marketplace Semgrep rule matched, such as eval, subprocess or network calls.
  • Python errors Ruff 0.17.0
    No syntax error or undefined name (Ruff, error rules only).
  • File tree tree_check.py
    No symlink, executable or banned file; imports within the allowlist.
  • Sandboxed compile gVisor 20261005, Kapitan 0.36.3
    The fixture compiled without network, with decoy credentials; no undeclared program ran, no decoy was read.
  • Output capabilities Conftest 0.71.1
    The compiled output uses only the capabilities the manifest declares.
  • CI detection Kapitan 0.36.3
    The output is the same with CI variables set.

SBOM (SPDX 2.3)

Output diff

No output diff recorded: this version was published before the release run recorded one.

1.0.1

Inventory

parameters:
  kapitan:
    dependencies:
      - type: oci
        source: ghcr.io/kadet-hub/velero:1.0.1@sha256:1ec5c3259ec0c30ab4725d783caf72bc53f2c7cf10eb54611d55b40229c76f13
        output_path: lib/velero

Verify

gh attestation verify \
  oci://ghcr.io/kadet-hub/velero@sha256:1ec5c3259ec0c30ab4725d783caf72bc53f2c7cf10eb54611d55b40229c76f13 \
  --owner kadet-hub \
  --cert-identity https://github.com/kadet-hub/registry/.github/workflows/release.yml@refs/heads/main

Transparency log: Rekor entry 3244180904, in Sigstore's public, append-only log, so the attestation stays checkable independent of this site.

Kapitan declared
>=0.36.3,<0.37
Kapitan checked
0.36.3
Backends checked
not recorded
With --cache
not recorded
krab
compatible
Built for (schema-checked)
Velero 1.18.4
Source
velero-v1.0.1 · 9166cb30e0ae4874bc8f229c6a6823eff7451d04 · velero
Binaries
none
Output capabilities
none
Digest
sha256:1ec5c3259ec0c30ab4725d783caf72bc53f2c7cf10eb54611d55b40229c76f13

Checks

Checked by the release run on , gate at 529dab245f19.

  • Secrets gitleaks 8.30.1
    No secret matched the marketplace's gitleaks rules.
  • Malware ClamAV 1.5.4
    No file matched a ClamAV signature.
  • Malicious package heuristics GuardDog 3.2.0
    No GuardDog threat rule matched.
  • Dangerous code Semgrep 1.180.0
    No marketplace Semgrep rule matched, such as eval, subprocess or network calls.
  • Python errors Ruff 0.17.0
    No syntax error or undefined name (Ruff, error rules only).
  • File tree tree_check.py
    No symlink, executable or banned file; imports within the allowlist.
  • Sandboxed compile gVisor 20261005, Kapitan 0.36.3
    The fixture compiled without network, with decoy credentials; no undeclared program ran, no decoy was read.
  • Output capabilities Conftest 0.71.1
    The compiled output uses only the capabilities the manifest declares.
  • CI detection Kapitan 0.36.3
    The output is the same with CI variables set.

SBOM (SPDX 2.3)

Output diff

No output diff recorded: this version was published before the release run recorded one.

1.0.0

Inventory

parameters:
  kapitan:
    dependencies:
      - type: oci
        source: ghcr.io/kadet-hub/velero:1.0.0@sha256:bd71f54ba7871d41391f23aedcb3840b580e91af69fd035a46ed83663f92674d
        output_path: lib/velero

Verify

gh attestation verify \
  oci://ghcr.io/kadet-hub/velero@sha256:bd71f54ba7871d41391f23aedcb3840b580e91af69fd035a46ed83663f92674d \
  --owner kadet-hub \
  --cert-identity https://github.com/kadet-hub/registry/.github/workflows/release.yml@refs/heads/main

Transparency log: Rekor entry 3210094338, in Sigstore's public, append-only log, so the attestation stays checkable independent of this site.

Kapitan declared
>=0.36.3,<0.37
Kapitan checked
0.36.3
Backends checked
not recorded
With --cache
not recorded
krab
compatible
Built for (schema-checked)
Velero 1.18.4
Source
velero-v1.0.0 · cd660d06c2e97a2bc842f0e75475f639a82f128d · velero
Binaries
none
Output capabilities
none
Digest
sha256:bd71f54ba7871d41391f23aedcb3840b580e91af69fd035a46ed83663f92674d

Checks

Checked by the release run on , gate at a6abb26ac69c.

  • Secrets gitleaks 8.30.1
    No secret matched the marketplace's gitleaks rules.
  • Malware ClamAV 1.5.4
    No file matched a ClamAV signature.
  • Malicious package heuristics GuardDog 3.2.0
    No GuardDog threat rule matched.
  • Dangerous code Semgrep 1.180.0
    No marketplace Semgrep rule matched, such as eval, subprocess or network calls.
  • Python errors Ruff 0.17.0
    No syntax error or undefined name (Ruff, error rules only).
  • File tree tree_check.py
    No symlink, executable or banned file; imports within the allowlist.
  • Sandboxed compile gVisor 20261005, Kapitan 0.36.3
    The fixture compiled without network, with decoy credentials; no undeclared program ran, no decoy was read.
  • Output capabilities Conftest 0.71.1
    The compiled output uses only the capabilities the manifest declares.
  • CI detection Kapitan 0.36.3
    The output is the same with CI variables set.

SBOM (SPDX 2.3)

Output diff

No output diff recorded: this version was published before the release run recorded one.