gemini icon indicating copy to clipboard operation
gemini copied to clipboard

Ability to schedule a PVC for backup by setting an annotation

Open djjudas21 opened this issue 3 years ago • 6 comments

Is your feature request related to a problem? Please describe. I'm new to Gemini, but it seems good and it's working for me. However I'm finding it a bit inconvenient to manually create SnapshotGroup resources, as lots of my apps are installed from Helm charts, and then I have to add the SnapshotGroup manifest.

Describe the solution you'd like It would be cool if I could set an annotation on a PVC like

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  annotations:
    gemini.fairwinds.com/SnapshotSchedule: "my-hourly-routine"

Obviously there would need to be some defaults set, like the frequency and retention, so there could be a generic resource like:

apiVersion: gemini.fairwinds.com/v1beta1
kind: SnapshotSchedule
metadata:
  name: my-hourly-routine
spec:
  schedule:
    - every: hour
      keep: 12

There could be one or more SnapshotSchedule included with Gemini, and then it would only require setting a single annotation on a PVC (which can be done via most helm charts). For example, Bitnami charts would support this syntax:

postgresql:
  persistence:
    enabled: true
    storageClass: freenas-iscsi
    accessMode: ReadWriteOnce
    size: 1Gi
    annotations:
      gemini.fairwinds.com/SnapshotSchedule: "my-hourly-routine"

... and then you get backups from day zero :slightly_smiling_face:

djjudas21 avatar May 04 '22 14:05 djjudas21

Seems like a good idea to me. @rbren do you have any thoughts?

sudermanjr avatar May 04 '22 15:05 sudermanjr

Yeah this seems like a great idea! We have had other requests to be able to reuse schedules, this would take care of both.

Will add it to the backlog. @djjudas21 you're welcome to open a PR as well if you want this in the near-term

rbren avatar May 04 '22 18:05 rbren

Thanks both. I'm no developer and I have no experience with golang, so I'll sit this one out and wait until it's ready 😀 happy to help with testing etc though

djjudas21 avatar May 04 '22 18:05 djjudas21

Great request. The concern from @djjudas21 is actually the same as mine. It should be great if we can config the SnapshotGroup using annotation inside PVC.

anhqqt avatar Jul 08 '22 04:07 anhqqt

Hey, has there been any movement on this one yet? Thanks!

djjudas21 avatar Feb 02 '23 16:02 djjudas21

Sorry, no movement here. Priority right now is 1.25 support.

rbren avatar Feb 06 '23 16:02 rbren