[FOLIO-2194] Develop script to clean up expired K8 container instances Created: 26/Jul/19  Updated: 03/Jun/20  Resolved: 04/Sep/19

Status: Closed
Project: FOLIO
Components: None
Affects versions: None
Fix versions: None

Type: Task Priority: P2
Reporter: John Malconian Assignee: Ian Hardy
Resolution: Done Votes: 0
Labels: platform-backlog
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original estimate: Not Specified

Issue links:
Relates
relates to FOLIO-2249 Tenant clean up script Closed
relates to FOLIO-2130 SPIKE: how to clean up unused contain... Closed
Sprint: CP: sprint 70, CP: sprint 69, CP: sprint 71
Story Points: 3
Development Team: Core: Platform

 Description   

Cleanup criteria:

  • module is unused in any existing tenant configuration (this can be checked by looking at modules enabled for a tenant but can require a lot of calls, /proxy/tenants/ {id}

    /modules) [TODO: add an endpoint to see what tenant use a given module)

  • there are N newer versions/builds of the module (call /discovery/modules to see)

Frequency:

  • the scrip will run daily
  • snapshots built from master: unused backend modules that are not the latest two builds released are removed. A script can determine which are two most recent versions by getting a list of modules descriptors from Okapi.
  • proper releases: We keep the three released versions of backend modules regardless of whether they are in-use by a tenant. These modules can be determined in essentially same way as the snapshots - just set 'preRelease=false' when querying Okapi.


 Comments   
Comment by Ian Hardy [ 12/Aug/19 ]

This script should run as a cron job and delete containers after N new versions have been deployed. Add a test to not delete anything that is enabled on a tenant.

Comment by Ian Hardy [ 15/Aug/19 ]

Add labels w/module name to kubernetes module deployment to make it easier to select all instances of mod X.

Generated at Thu Feb 08 23:18:54 UTC 2024 using Jira 1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d.