API reference

BackupPolicy

ampulla.helmetica.io/v1, namespaced

BackupPolicy asks ampulla to back up the service it sits next to. The policy’s own namespace is the whole scope: the bucket is provisioned for it, the credentials land beside it, and in ModeSchedule every persistent volume in the namespace is backed up.

Spec

Path Type Default Description

spec.bucketAccessClassName

string

BucketAccessClassName is the class the bucket credentials are minted from. Empty takes the controller’s default.

spec.bucketClassName

string

BucketClassName is the object storage the backups are written to. Empty takes the controller’s default; without either, the policy fails rather than being backed up somewhere arbitrary.

spec.mode

enum: Schedule, BucketOnly

Schedule

Mode selects who takes the backups.

spec.retention

object

Retention is how many backups survive a prune. All zero takes the controller’s default retention. Mode Schedule only.

spec.retention.keepDaily

integer

Validation: minimum 0

spec.retention.keepHourly

integer

Validation: minimum 0

spec.retention.keepLast

integer

Validation: minimum 0

spec.retention.keepMonthly

integer

Validation: minimum 0

spec.retention.keepWeekly

integer

Validation: minimum 0

spec.retention.keepYearly

integer

Validation: minimum 0

spec.schedule

object

Schedule is when each of the jobs runs. Mode Schedule only.

spec.schedule.backup

string

Backup is when the backup itself runs. Falls back to the controller’s default.

spec.schedule.check

string

Check is when the backup repository is verified. Falls back to the controller’s default; with no default configured there, no check job is scheduled.

spec.schedule.prune

string

Prune is when old snapshots are forgotten and pruned. Falls back to the controller’s default; with no default configured there, no prune job is scheduled.

Status

Path Type Default Description

status.bucket

string

Bucket is the bucket as clients address it.

status.credentialsSecret

string

CredentialsSecret is the secret in this namespace holding the bucket’s key pair, one value per key. A service that backs itself up reads its S3 credentials there.

status.endpoint

string

Endpoint is the object storage endpoint the bucket lives behind.

status.message

string

Message explains a Pending or Failed phase.

status.observedGeneration

integer

ObservedGeneration is the spec generation the phase was computed from.

status.phase

string

status.region

string

Region is where the bucket lives.

status.schedule

string

Schedule is the schedule the backups run on, once defaults are resolved.

BackupTemplate

ampulla.helmetica.io/v1, namespaced

BackupTemplate renders a backup resource for an operator that backs its service up itself, pointed at the bucket a BackupPolicy provisioned.

Spec

Path Type Default Description

spec.policyName (required)

string

PolicyName is the BackupPolicy in this namespace whose bucket the template is rendered with.
Validation: min length 1

spec.template (required)

object (free-form)

Template is the object to write, always into this namespace and owned by the template, so deleting the template deletes it as well. Placeholders in it are filled from the policy’s status. $\{s3.bucket}, $\{s3.url}, $\{s3.hostPort} and $\{s3.region} may be part of any string. $\{s3.tls} (a boolean) and $\{s3.accessKeyRef} and $\{s3.secretKeyRef} (each a \{name, key} secret reference) only as a whole value.

Status

Path Type Default Description

status.message

string

Message explains a Pending or Failed phase.

status.observedGeneration

integer

ObservedGeneration is the spec generation the phase was computed from.

status.phase

string