Uploaded image for project: 'Managed Service - API'
  1. Managed Service - API
  2. MGDAPI-5705

Set GCP object lifecycle for snapshots

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major Major
    • None
    • None
    • None
    • RHOAM Sprint 41

      WHY
      We currently match AWS logic and perform a 'final snapshot' on GCP but these are retained indefinitely in GCP storage. We could set up a lifecycle for objects to have them deleted after a period of time.

      WHAT
      Configure the GCP bucket we set up for snapshots with object lifecycle rules https://cloud.google.com/storage/docs/lifecycle

      We have to decide on the value to use for this. We could set this as a set period of time + the retention period. For example if the retention period is set to 10d, we could configure the lifecycle on the bucket as 10d + 30d. Depending on the frequency and how recently the latest snapshot was taken this means we would at minimum hold the object for 30d, maximum 40d, after RHOAM is removed.

      HOW
      Add a new function to the gcpiface storage api to update bucket attributes.

      Set a new lifecycle rule in the bucket attributes.

      Reconcile this if not configured as part of snapshot reconciler.

      TESTS
      <List of related tests>

      DONE
      Snapshot buckets are configured with a object retention lifecycle rule.

              acatterm@redhat.com Adam Cattermole
              acatterm@redhat.com Adam Cattermole
              Fiona Waters Fiona Waters
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: