• Stars
    star
    222
  • Rank 179,123 (Top 4 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created about 4 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Automatically removes Cloud managed services and Kubernetes resources based on tags with TTL

Pleco

Push DockerHub Artifact HUB Powered

Automatically remove cloud and kubernetes resources based on a time to leave tag, ttl.

Protect resources from deletion with a protection tag, do_not_delete.

NOTE: this project is used in Qovery's production environment


Check out our Blog announcement of Pleco: https://www.qovery.com/blog/announcement-of-pleco-the-open-source-kubernetes-and-cloud-services-garbage-collector


Supported resources

  • Kubernetes
    • Namespaces
  • AWS
    • Document DB databases
    • Document DB subnet groups
    • Elasticache databases
    • Elasticache subnet groups
    • RDS databases
    • RDS subnet groups
    • RDS parameter groups
    • RDS snapshots
    • EBS volumes
    • ELB load balancers
    • EC2 Key pairs
    • ECR repositories
    • EKS clusters
    • IAM groups
    • IAM users
    • IAM policies
    • IAM roles
    • IAM OpenId Connect provider
    • Cloudwatch logs
    • KMS keys
    • VPC vpcs
    • VPC internet gateways
    • VPC nat gateways
    • VPC Elastic IP
    • VPC route tables
    • VPC subnets
    • VPC security groups
    • S3 buckets
    • Lambda Functions
    • SQS Queues
    • Step Functions
    • EC2 instances
  • SCALEWAY
    • Kubernetes clusters
    • Database instances
    • Load balancers
    • Detached volumes
    • S3 Buckets
    • Unused Security Groups
  • DIGITAL OCEAN
    • Kubernetes clusters
    • Database instances
    • Load balancers
    • Detached volumes
    • S3 Buckets
    • Droplet firewalls
    • Unused VPCs
  • AZURE
  • GCP

Installation

You can find a helm chart here, a docker image here and all binaries are on github.


Requirements

In order to make pleco check and clean expired resources you need to set the following environment variables:

For AWS

$ export AWS_ACCESS_KEY_ID=<access_key>
$ export AWS_SECRET_ACCESS_KEY=<secret_key>

For Scaleway

$ export SCW_ACCESS_KEY=<access_key>
$ export SCW_SECRET_KEY=<secret_key>
$ export SCW_VOLUME_TIMEOUT=<delay_before_detached_volume_deletion_in_hours_since_last_update> # default is 2 hours

For Digital Ocean

$ export DO_API_TOKEN=<your_do_api_token>
$ export DO_SPACES_KEY=<your_do_api_key_for_spaces>
$ export DO_SPACES_SECRET=<your_do_api_secret_for_spaces>
$ export DO_VOLUME_TIMEOUT=<delay_before_detached_volume_deletion_in_hours_since_creation> # default is 2 hours

Basic command

A pleco command has the following structure:

pleco start <cloud_provider> [options]

General options

Connection Mode

You can set the connection mode with:

--kube-conn, -k <connection mode>

Default is "in"

Debug Level

You can set the debug level with:

--level <log level>

Default is "info"

Check's interval

You can set the interval between two pleco's check with:

--check-interval, -i <time in seconds>

Default is "120"

Dry Run

If you disable dry run, pleco will delete expired resources. If not it will only tells you how many resources are expired.

You can disable dry-run with:

--disable-dry-run, -y

Default is "false"

AWS options

Region selector

When pleco's look for expired resources, it will do it by aws region.

You can set region(s) with:

--aws-regions, -a <region(s)>

For example:

-a eu-west-3,us-east-2

Resources Selector

When pleco is running you have to specify which resources expiration will be checked.

Here are some of the resources you can check:

--enable-eks, -e # Enable EKS watch
--enable-iam, -u # Enable IAM watch (groups, policies, roles, users)

Example

pleco 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

Scaleway options

Region selector

When pleco's look for expired resources, it will do it by scaleway zone.

You can set zone(s) with:

--scw-zones, -a <zone(s)>

For example:

-a fr-par-1

Resources Selector

When pleco is running you have to specify which resources expiration will be checked.

Here are some of the resources you can check:

--enable-cluster, -e # Enable cluster watch

Example

pleco start scaleway --level debug -i 240 -a fr-par-1 -e -r -o -l -b -s -p -y

Digital Ocean options

Region selector

When pleco's look for expired resources, it will do it by digital ocean region.

You can set zone(s) with:

--do-regions, -a <region(s)>

For example:

-a nyc3

Resources Selector

When pleco is running you have to specify which resources expiration will be checked.

Here are some of the resources you can check:

--enable-cluster, -e # Enable cluster watch

Example

pleco start do --level debug -i 240 -a nyc3 -e -r -s -l -b -f -v -y

More Repositories

1

Replibyte

Seed your development database with real data โšก๏ธ
Rust
4,136
star
2

engine

The Orchestration Engine To Deliver Self-Service Infrastructure โšก๏ธ
Rust
2,288
star
3

console

Qovery Web Console V3 โšก๏ธ
TypeScript
203
star
4

Torii

Torii โ›ฉ๏ธ is a simple, powerful and extensible open-source Internal Developer Portal
TypeScript
175
star
5

RedisLess

RedisLess is a fast, lightweight, embedded and scalable in-memory Key/Value store library compatible with the Redis API.
Rust
150
star
6

qovery-cli

Qovery Command Line Interface
Go
78
star
7

helm-freeze

Freeze your charts in the wished versions
Go
57
star
8

terraform-examples

This repository contains ready to use Terraform examples with Qovery to create outstanding infrastructure
50
star
9

iam-eks-user-mapper

A tool to automatically give AWS IAM users access to your Kubernetes cluster.
Rust
48
star
10

documentation

Qovery documentation website
HTML
15
star
11

terraform-provider-qovery

Qovery Terraform Provider
Go
15
star
12

react-xtermjs

Xterm.js for React
TypeScript
13
star
13

qovery-github-actions

Qovery Github action allowing to deploy application.
Go
13
star
14

qovery-client-go

Qovery Golang SDK
Shell
12
star
15

qovery-migration-ai-agent

Qovery Migration AI Agent to Automate and Ease the Migration From Cloud Providers with Qovery
TypeScript
11
star
16

scaleway-api-rs

Rust lib for Scaleway API
Rust
9
star
17

qovery-openapi-spec

Qovery API specs - OpenAPI format
Shell
7
star
18

lifecycle-job-examples

This repository contains ready to use Qovery Lifecycle Jobs examples
7
star
19

simple-example-node

JavaScript
6
star
20

vscode-qovery-extension

Vscode plugin with auto completion
TypeScript
6
star
21

simple-example-gin-with-postgresql

Go
5
star
22

digital-mobius

Automatically recycle not ready Kubernetes nodes on Digitial Ocean
Go
5
star
23

simple-example-node-with-postgresql

JavaScript
4
star
24

qovery-client-typescript-axios

TypeScript
4
star
25

qovery-client-python

Qovery Python Client
Python
3
star
26

spring-boot-api-token

Kotlin
3
star
27

posthog-proxy

Ready to use reverse proxy for Posthog
Dockerfile
3
star
28

qovery-rust-rocket-sample

Rust
2
star
29

intellij-qovery-plugin

Intellij plugin with auto completion
Java
2
star
30

doners

Scale your DNS management in a secure way on Kubernetes
2
star
31

qovery-client-javascript

Qovery Javascript Client
JavaScript
2
star
32

simple-example-laravel-with-postgresql

PHP
2
star
33

doc

Qovery documentation
2
star
34

simple-example-django-with-postgresql

Python
2
star
35

flask-todo

Flask example with Qovery
Python
2
star
36

qovery-javascript-client

JavaScript
1
star
37

migrate-webapp-from-heroku-to-qovery

JavaScript
1
star
38

nginx-gateway

NGINX Gateway
Shell
1
star
39

homebrew-replibyte

Ruby
1
star
40

qovery-templates

Templates to bootstrap popular frameworks on Qovery
Java
1
star
41

http-handler-to-redeploy

This project is a good starting point to create an HTTP handler to redeploy your app on Qovery
Go
1
star
42

scoop-qovery-cli

Scoop to install and update qovery cli
1
star
43

homebrew-qovery-cli

Brew tap Formula to install and update qovery cli
Ruby
1
star
44

qovery-client-typescript

TypeScript
1
star
45

engine-testing-lfs

Repository to test integration of git lfs
Dockerfile
1
star
46

frontend-boilerplate

Boilerplate of Qovery console technical stack (Nx, Ngxs, Rxjs)
TypeScript
1
star
47

simple-example-with-postgresql

Kotlin
1
star
48

undertaqer

Automatically destroy crash looped pods
Smarty
1
star
49

e2e-app

Go
1
star
50

qovery-chart

Qovery Helm Chart for Self-Managed version
Smarty
1
star
51

qovery-php-client

Qovery PHP client library
PHP
1
star
52

qovery-go-client

Qovery Go client library
Go
1
star
53

qovery-python-client

Python
1
star