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.
You can specify TTL as minutes
apiVersion: remover.onikle.com/v1
kind: JobRemover
metadata:
name: jobremover-sample
spec:
namespace: "default"
TTL: 30
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