{"id":13548563,"url":"https://github.com/travis-ci/gcloud-cleanup","last_synced_at":"2025-06-11T19:33:12.294Z","repository":{"id":54305903,"uuid":"41367285","full_name":"travis-ci/gcloud-cleanup","owner":"travis-ci","description":"Clean That Cloud! :cloud: :bath:","archived":false,"fork":false,"pushed_at":"2021-02-25T07:47:21.000Z","size":161,"stargazers_count":19,"open_issues_count":0,"forks_count":9,"subscribers_count":20,"default_branch":"master","last_synced_at":"2025-04-30T04:36:28.530Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/travis-ci.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-08-25T14:14:20.000Z","updated_at":"2023-01-02T13:06:20.000Z","dependencies_parsed_at":"2022-08-13T11:31:07.122Z","dependency_job_id":null,"html_url":"https://github.com/travis-ci/gcloud-cleanup","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/travis-ci/gcloud-cleanup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/travis-ci%2Fgcloud-cleanup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/travis-ci%2Fgcloud-cleanup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/travis-ci%2Fgcloud-cleanup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/travis-ci%2Fgcloud-cleanup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/travis-ci","download_url":"https://codeload.github.com/travis-ci/gcloud-cleanup/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/travis-ci%2Fgcloud-cleanup/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259325244,"owners_count":22841050,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T12:01:11.868Z","updated_at":"2025-06-11T19:33:12.254Z","avatar_url":"https://github.com/travis-ci.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# gcloud-cleanup\n\nClean That Cloud!\n\n**gcloud-cleanup** takes care of cleaning up resources from the Google Compute Platform.\n\n## Status\n\nActively running in production.\n\n## How does it fit into the rest of the system\n\n* **Deployment**: Heroku, one instance per google cloud project\n* **Google Cloud**: We talk to the Google Compute Platform via its API\n* **Job-board** ([github](https://github.com/travis-ci/job-board)):\n  We talk to job-board via HTTP to get information about which images\n  are known.\n* **Worker** ([github](https://github.com/travis-ci/worker)): gcloud-cleanup\n  shares a redis instance with worker for API call rate limiting\n\n## What does it really do\n\n### Instance cleaning\n\ngcloud-cleanup finds instances matching _name filters_ that have existed for\nlonger than a certain _cutoff time_ and deletes them.\n\nThis ensures that instances that failed to terminate are cleaned up.\n\nRelevant configuration:\n\n- `GCLOUD_CLEANUP_INSTANCE_FILTERS` correspond to _name filters_,\n  default `name eq ^testing-gce.*`.\n- `GCLOUD_CLEANUP_INSTANCE_MAX_AGE` corresponds to _cutoff time_, default `3h`.\n\n### Image cleaning\n\ngcloud-cleanup queries **Job-board** for all known images matching _name\nfilters_ with `infra=gce`, then queries **Google Cloud** for all known images\nmatching _name filters_, and deletes any images in the **Google Cloud** set that\nare not also in the **Job-board** set.\n\nThis ensures that images unknown to **Job-board** are cleaned up.\n\nRelevant configuration:\n\n- `GCLOUD_CLEANUP_IMAGE_FILTERS` corresponds to _name filters_,\n  default `name eq ^travis-ci.*`.\n\n### Rate limiting\n\nGCE is not happy if we send them a gazillion API requests. In order to prevent\nus from being rate limited, we throttle the amount of requests we make.\n\n**NOTE**: the `./ratelimit` subpacakage is a vendored copy from\n[travis-ci/worker](https://github.com/travis-ci/worker).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftravis-ci%2Fgcloud-cleanup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftravis-ci%2Fgcloud-cleanup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftravis-ci%2Fgcloud-cleanup/lists"}