Skip to content

A Kubernetes Custom Resource that deletes completed jobs in the specified namespace.

Notifications You must be signed in to change notification settings

YZ775/k8s-job-remover

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kubernetes Job Remover

Description

This Custom Resource deletes completed jobs in the specified namespace that elapsed specified time.

This software was developed because Google Kubernetes Engine does not support ttlSecondsAfterFinished in stable channel yet.

Sample

You can specify TTL as minutes

apiVersion: remover.onikle.com/v1
kind: JobRemover
metadata:
  name: jobremover-sample
spec:
  namespace: "default"
  TTL: 30

Installation(WIP)

Requirement

Go
Docker
Kubebuilder
kubectl



Before installation, set kubectl context as desired cluster's one.


Make Docker image

make docker-build



Then, upload controller image to some container registry, and edit image field in config/manager/manager.yaml

If you are using kind, the command below is fine.

kind load docker-image controller:latest



Apply CRDs

make install
make deploy



If you want to deploy JobRemover as a sample setting,please use this command.

kubectl apply -f config/samples/remover_v1_jobremover.yaml

About

A Kubernetes Custom Resource that deletes completed jobs in the specified namespace.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published