Giter Club home page Giter Club logo

cleanup-job's Introduction

thoth-cleanup-job

A job for cleaning up old OpenShift or Kubernetes objects created by one-time analyses in Thoth.

This periodic job (CronJob) queries Jobs, ImageStreams, ConfigMaps and BuildConfigs that have label set to mark=cleanup and based on TTL, old objects are deleted. The TTL can be provided in the following ways:

  • using THOTH_CLEANUP_DEFAULT_TTL environment variable provided to the thoth-cleanup CronJob deployment
  • in the label under the ttl key - for example in the job spec label ttl=5d means "delete the given job after 5 days" - this overrides the above configuration option

If there is no ttl set in the resourse labels and there is no THOTH_CLEANUP_DEFAULT_TTL set in the deployement, the TTL configuration defaults to 7 days.

Running cleanup-job locally

You can run cleanup-job locally from your laptop. It will transparently talk to the cluster - assuming you are logged in and have sufficient privileges on the cleaned namespace (edit is required):

$ pipenv install   # Install all the requirements
$ oc login <cluster-url>  # Make sure you are logged in to the cluster.
$ KUBERNETES_VERIFY_TLS=0 pipenv run python3 app.py --cleanup-namespace thoth-test-core

TLS verification is skipped if cluster certs should not be checked (unsafe).

cleanup-job's People

Contributors

bissenbay avatar durandom avatar fridex avatar goern avatar harshad16 avatar kpostoffice avatar leonjia0112 avatar sesheta avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.