{"id":13645126,"url":"https://github.com/Qovery/pleco","last_synced_at":"2025-04-21T13:31:46.833Z","repository":{"id":36962609,"uuid":"306586768","full_name":"Qovery/pleco","owner":"Qovery","description":"Automatically removes Cloud managed services and Kubernetes resources based on tags with TTL","archived":false,"fork":false,"pushed_at":"2025-03-27T16:15:40.000Z","size":23132,"stargazers_count":221,"open_issues_count":2,"forks_count":19,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-04-20T21:12:24.195Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Qovery.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-10-23T09:19:04.000Z","updated_at":"2025-04-14T17:52:13.000Z","dependencies_parsed_at":"2024-06-18T18:38:53.855Z","dependency_job_id":"0bbf85ac-75f7-4d38-893f-ebd42813d4eb","html_url":"https://github.com/Qovery/pleco","commit_stats":{"total_commits":375,"total_committers":18,"mean_commits":"20.833333333333332","dds":0.6639999999999999,"last_synced_commit":"83d6751b1ff51dcf555b9f3a886499f146a06b76"},"previous_names":[],"tags_count":178,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Qovery%2Fpleco","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Qovery%2Fpleco/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Qovery%2Fpleco/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Qovery%2Fpleco/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Qovery","download_url":"https://codeload.github.com/Qovery/pleco/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250064682,"owners_count":21368948,"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-02T01:02:28.175Z","updated_at":"2025-04-21T13:31:46.424Z","avatar_url":"https://github.com/Qovery.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# Pleco\n![Push](https://github.com/Qovery/pleco/workflows/Push/badge.svg)\n[![DockerHub](https://img.shields.io/badge/DockerHub-pleco-blue?url=https://hub.docker.com/repository/docker/qoveryrd/pleco)](https://hub.docker.com/repository/docker/qoveryrd/pleco)\n[![Artifact HUB](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/pleco)](https://artifacthub.io/packages/search?repo=pleco)\n[![Powered](https://img.shields.io/badge/Powered%20by-Qovery-blueviolet)](https://www.qovery.com)\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"./assets/pleco_logo.png\" width=420 /\u003e\n\u003c/p\u003e\n\nAutomatically remove cloud and kubernetes resources based on a time to leave tag, **ttl**.\n\nProtect resources from deletion with a protection tag, **do_not_delete**.\n\nNOTE: this project is used in Qovery's production environment\n\n---\n\nCheck out our Blog announcement of Pleco: https://www.qovery.com/blog/announcement-of-pleco-the-open-source-kubernetes-and-cloud-services-garbage-collector\n\n---\n## Supported resources\n- [X] Kubernetes\n  - [X] Namespaces\n- [X] AWS \n  - [X] Document DB databases\n  - [X] Document DB subnet groups\n  - [X] Elasticache databases\n  - [X] Elasticache subnet groups\n  - [X] RDS databases\n  - [X] RDS subnet groups\n  - [X] RDS parameter groups\n  - [X] RDS snapshots\n  - [X] EBS volumes\n  - [X] ELB load balancers\n  - [X] EC2 Key pairs\n  - [X] ECR repositories\n  - [X] EKS clusters\n  - [X] IAM groups\n  - [X] IAM users\n  - [X] IAM policies\n  - [X] IAM roles\n  - [X] IAM OpenId Connect provider\n  - [X] Cloudwatch logs\n  - [X] KMS keys\n  - [X] VPC vpcs\n  - [X] VPC internet gateways\n  - [X] VPC nat gateways\n  - [X] VPC Elastic IP\n  - [X] VPC route tables\n  - [X] VPC subnets\n  - [X] VPC security groups\n  - [X] S3 buckets\n  - [X] Lambda Functions\n  - [X] SQS Queues\n  - [X] Step Functions\n  - [X] EC2 instances\n- [X] SCALEWAY\n  - [X] Kubernetes clusters\n  - [X] Database instances\n  - [X] Load balancers\n  - [X] Detached volumes\n  - [X] S3 Buckets\n  - [X] Unused Security Groups\n  - [X] Orphan IPs\n  - [X] VPCs\n  - [X] Private networks\n- [X] DIGITAL OCEAN\n  - [X] Kubernetes clusters\n  - [X] Database instances\n  - [X] Load balancers\n  - [X] Detached volumes\n  - [X] S3 Buckets\n  - [X] Droplet firewalls\n  - [X] Unused VPCs\n- [X] GCP\n  - [X] Cloud Storage Buckets\n  - [X] Artifact Registry Repositories\n  - [X] Kubernetes clusters\n  - [X] Cloud run jobs\n  - [X] Networks // via JSON tags in resource description because resource has no support for tags\n  - [X] Routers // via JSON tags in resource description because resource has no support for tags\n  - [X] Service accounts // via JSON tags in resource description because resource has no support for tags\n- [ ] AZURE\n\n---\n## Installation\n\nYou can find a helm chart [here](https://artifacthub.io/packages/helm/pleco/pleco), a docker image [here](https://hub.docker.com/r/qoveryrd/pleco) and all binaries are on [github](https://github.com/Qovery/pleco/releases).\n\n---\n## Requirements\n\nIn order to make pleco check and clean expired resources you need to set the following environment variables:\n#### For AWS\n```bash\n$ export AWS_ACCESS_KEY_ID=\u003caccess_key\u003e\n$ export AWS_SECRET_ACCESS_KEY=\u003csecret_key\u003e\n```\n\n#### For Scaleway\n```bash\n$ export SCW_ACCESS_KEY=\u003caccess_key\u003e\n$ export SCW_SECRET_KEY=\u003csecret_key\u003e\n$ export SCW_VOLUME_TIMEOUT=\u003cdelay_before_detached_volume_deletion_in_hours_since_last_update\u003e # default is 2 hours\n```\n\n#### For Digital Ocean\n```bash\n$ export DO_API_TOKEN=\u003cyour_do_api_token\u003e\n$ export DO_SPACES_KEY=\u003cyour_do_api_key_for_spaces\u003e\n$ export DO_SPACES_SECRET=\u003cyour_do_api_secret_for_spaces\u003e\n$ export DO_VOLUME_TIMEOUT=\u003cdelay_before_detached_volume_deletion_in_hours_since_creation\u003e # default is 2 hours\n```\n\n#### For GCP\n```bash\n$ export GOOGLE_APPLICATION_CREDENTIALS=\u003cpath_to_your_credentials_json_file\u003e\n```\n---\n## Basic command\n\nA pleco command has the following structure:\n```bash\npleco start \u003ccloud_provider\u003e [options]\n```\n\n### General options\n#### Connection Mode\nYou can set the connection mode with:\n```bash\n--kube-conn, -k \u003cconnection mode\u003e\n```\nDefault is \"in\"\n\n#### Debug Level\nYou can set the debug level with:\n```bash\n--level \u003clog level\u003e\n```\nDefault is \"info\"\n\n#### Check's interval\nYou can set the interval between two pleco's check with:\n```bash\n--check-interval, -i \u003ctime in seconds\u003e\n```\nDefault is \"120\"\n\n#### Dry Run\nIf you disable dry run, pleco will delete expired resources. \nIf not it will only tells you how many resources are expired.\n\nYou can disable dry-run with:\n```bash\n--disable-dry-run, -y\n```\nDefault is \"false\"\n\n### AWS options\n#### Region selector\nWhen pleco's look for expired resources, it will do it by aws region.\n\nYou can set region(s) with:\n```bash\n--aws-regions, -a \u003cregion(s)\u003e\n```\n\nFor example:\n```bash\n-a eu-west-3,us-east-2\n```\n\n#### Resources Selector\nWhen pleco is running you have to specify which resources expiration will be checked.\n\nHere are some of the resources you can check:\n```bash\n--enable-eks, -e # Enable EKS watch\n--enable-iam, -u # Enable IAM watch (groups, policies, roles, users)\n```\n\n#### Example\n```bash\npleco start aws --level debug -i 240 -a eu-west-3 -e -r -m -c -l -b -p -s -w -n -u -z -o -f -x -q -y\n```\n\n### Scaleway options\n#### Region selector\nWhen pleco's look for expired resources, it will do it by [scaleway zone](https://registry.terraform.io/providers/scaleway/scaleway/latest/docs/guides/regions_and_zones).\n\nYou can set zone(s) with:\n```bash\n--scw-zones, -a \u003czone(s)\u003e\n```\n\nFor example:\n```bash\n-a fr-par-1\n```\n\n#### Resources Selector\nWhen pleco is running you have to specify which resources expiration will be checked.\n\nHere are some of the resources you can check:\n```bash\n--enable-cluster, -e # Enable cluster watch\n```\n\n#### Example\n```bash\npleco start scaleway --level debug -i 240 -a fr-par-1 -e -r -o -l -b -s -p -y\n```\n\n### Digital Ocean options\n#### Region selector\nWhen pleco's look for expired resources, it will do it by [digital ocean region](https://docs.digitalocean.com/products/platform/availability-matrix/).\n\nYou can set zone(s) with:\n```bash\n--do-regions, -a \u003cregion(s)\u003e\n```\n\nFor example:\n```bash\n-a nyc3\n```\n\n#### Resources Selector\nWhen pleco is running you have to specify which resources expiration will be checked.\n\nHere are some of the resources you can check:\n```bash\n--enable-cluster, -e # Enable cluster watch\n```\n\n#### Example\n```bash\npleco start do --level debug -i 240 -a nyc3 -e -r -s -l -b -f -v -y\n```\n\n### GCP options\n#### Region selector\nWhen pleco's look for expired resources, it will do it by [gcp_regions](https://cloud.google.com/compute/docs/regions-zones?hl=en).\n\nYou can set zone(s) with:\n```bash\n--gcp-regions, -a \u003cregion(s)\u003e\n```\n\nFor example:\n```bash\n-a europe-west9\n```\n\n#### Resources Selector\nWhen pleco is running you have to specify which resources expiration will be checked.\n\nHere are some of the resources you can check:\n```bash\n--enable-cluster # Enable cluster watch\n--enable-object-storage # Enable object storage watch\n--enable-artifact-registry # Enable artifact registry watch\n--enable-network # Enable network watch\n--enable-router # Enable router watch\n--enable-iam # Enable IAM watch (service accounts)\n```\n\n#### Example\n```bash\npleco start\n  gcp\n  --level\n  debug\n  -i\n  240\n  --enable-object-storage\n  --enable-artifact-registry\n  --enable-cluster\n  --enable-network\n  --enable-router\n  --enable-iam\n  --enable-job\n  --gcp-regions\n  europe-west9\n  --disable-dry-run\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FQovery%2Fpleco","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FQovery%2Fpleco","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FQovery%2Fpleco/lists"}