k8up icon indicating copy to clipboard operation
k8up copied to clipboard

New configuration concept

Open Kidswiss opened this issue 3 years ago • 0 comments

Summary

As a user I want to have composable configuration So that so I can re-use defaults and repository configs

Context

Currently, defaults for backups can be defined by setting environment variables. While this serves its purpose, it's not very flexible and rather cumbersome to configure.

So I propose a new way to configure and schedule backups. We should split the configuration:

  • repository: contains information about the repository. Credentials, bucketname, encryption password. etc.
  • schedule: takes a jobPlan and a repository and schedules the backups according to the given cron string.
  • jobPlan: contains information about what should get backed up. This can be PVCs and Pods with prebackup commands.

Out of Scope

  • Repository objects: #580
  • Any changes to how things are scheduled, this issue is only about changing the API.

Further Links

Acceptance Criteria

Given a `k8up.io/v2/Schedule` spec
When I refer a `k8up.io/v2/JobPlan` spec
Then K8up can spawn backups using the configuration provided in the `JobPlan` spec.
Given a `k8up.io/v2/JobPlan` spec
When I specify what PVCs I want backed up
Then K8up will only backup those PVCs
Given a `k8up.io/v2/JobPlan` spec
When I specify what pods I want for prebackup commands
Then K8up will only backup those pods via prebackup commands

Implementation Ideas

  • For PVC and Pod targeting we can use multiple things. Labels or regex for the names, or a mix of both.

Kidswiss avatar Oct 27 '20 07:10 Kidswiss