You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As "cluster operator or developer" I want "to quickly create a new backup off-schedule" So that "I can run a upgrade or restore it somewhere else quickly"
Context
The Schedule objects are great to have backups in regular intervals.
But sometimes you want to have a backup now. E.g. before a cluster/app upgrade or when restoring the current state of a customer application in a local dev environment.
It would be cool to have something similar as with CronJob: kubectl create job test-job --from=cronjob/a-cronjob for Schedules.
Implementation Ideas
Maybe the Backup(https://k8up.io/k8up/2.8/how-tos/backup.html) could get a spec.backend.fromSchedule.name field where it then pulls all its info? That would be very minimal and save lots of copy-pasting that info.
The text was updated successfully, but these errors were encountered:
Not too sure though if this would be a good fit. I still would like the idea to be able to annotate a Schedule in some form, so that the operator knows that I'd like it to trigger a backup from it now.
Did put a jq / yq script together to trigger backups of my schedules as an interim solution:
# Generate Backup instances from Schedule objects for k8up
#
# Use as follows:
# - kubectl get schedule/k8up-backup-schedule -o yaml | yq -f ./backup-from-schedule.jq -y
# - kubectl get -A schedule -o yaml | yq -f ./backup-from-schedule.jq -y | kubectl apply -f -
#
# Supports the followings args:
# - suffix: Appends the value as suffix to the resource name
# Allow to the results of "kubectl get" and "kubectl get -A" as input
if .items then .items[] else . end |
{
apiVersion: "k8up.io/v1",
kind: "Backup",
metadata: {
name: ["manual-from", .metadata.name, $ARGS.named.suffix] | map(select(.)) | join("-"),
namespace: .metadata.namespace,
},
spec: (.spec.backup + {
backend: .spec.backend,
podSecurityContext: .spec.podSecurityContext,
}),
} |
del(.spec.schedule)
Summary
As "cluster operator or developer"
I want "to quickly create a new backup off-schedule"
So that "I can run a upgrade or restore it somewhere else quickly"
Context
The
Schedule
objects are great to have backups in regular intervals.But sometimes you want to have a backup now. E.g. before a cluster/app upgrade or when restoring the current state of a customer application in a local dev environment.
It would be cool to have something similar as with
CronJob
:kubectl create job test-job --from=cronjob/a-cronjob
for Schedules.Implementation Ideas
Maybe the
Backup
(https://k8up.io/k8up/2.8/how-tos/backup.html) could get aspec.backend.fromSchedule.name
field where it then pulls all its info? That would be very minimal and save lots of copy-pasting that info.The text was updated successfully, but these errors were encountered: