Giter VIP home page Giter VIP logo

Comments (2)

johbo avatar johbo commented on June 12, 2024 1

Just was looking for this feature. Think it would be very convenient to trigger a schedule in some form manually.

When experimenting with restore options for my setup I got cross the trigger concept of Volsync: https://volsync.readthedocs.io/en/stable/usage/triggers.html

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.

From Flux I know that they work with a different type of annotation which is based on a timestamp: https://fluxcd.io/flux/components/kustomize/kustomizations/#triggering-a-reconcile

My case behind is to ensure that I have fresh backups before re-creating my application or before making a 2nd environment for troubleshooting.

from k8up.

johbo avatar johbo commented on June 12, 2024

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)

from k8up.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.