Skip to content
/ pleco Public
forked from Qovery/pleco

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

License

Notifications You must be signed in to change notification settings

xorilog/pleco

 
 

Repository files navigation

Pleco

Push DockerHub Artifact HUB

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

Protect resources from deletion with a protection tag, do_no_delete.

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


Supported resources

  • AWS
    • Document db databases
    • Elasticache databases
    • RDS databases
    • EBS volumes
    • ELB load balancers
    • EC2 Key pairs
    • ECR repositories
    • EKS clusters
    • IAM groups
    • IAM users
    • IAM policies
    • IAM roles
    • Cloudwatch logs
    • KMS keys
    • VPC vpcs
    • VPC internet gateways
    • VPC route tables
    • VPC subnets
    • VPC security groups
    • S3 buckets
  • DIGITAL OCEAN
  • 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 aws resources you need to set the following environment variables:

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

Basic command

A pleco command has the following structure:

pleco start [options]

General options

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 exemple:

-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 the resources you can check:

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

Example

pleco start --level debug -i 240 -a eu-west-3 -e -r -m -c -l -b -p -s -w -n -u -z -o -y

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 98.0%
  • Smarty 1.7%
  • Dockerfile 0.3%