all repos — janny @ 029611c5fc8222d5cf5da4f2d96c9cd13f9f3759

clean up Kubernetes resources after a set TTL

readme (view raw)

 1JANNY
 2
 3A work-in-progress Kubernetes application to clean up Kubernetes
 4resources after a set TTL.
 5
 6
 7ROADMAP
 8
 9[x] Implement basic resource cleaning
10[ ] Black/whitelist resources
11[ ] Expiry timestamp
12[ ] Helm chart
13
14
15DEVELOPING
16
17Setup a local minikube cluster[1]. Then, clone this repo and install
18dependencies:
19
20    $ poetry shell
21    $ poetry install
22
23Build a docker image (gets stored in minikube's registry):
24
25    $ eval $(minikube env-docker)
26    $ docker build -t janny:latest .
27
28Finally, deploy to your cluster:
29
30    $ kubectl create sa janny
31    $ kubectl apply -f deploy/
32
33This will create a ServiceAccount, ClusterRole, ClusterRoleBinding and a
34Deployment. Edit to suit your needs.
35
36Note: Absolutely nothing works at the moment, so don't even bother.
37
38
39PRIOR ART
40
41https://codeberg.org/hjacobs/kube-janitor: While kube-janitor already
42does the same thing, it's written using pykube, which has been
43undeveloped since 2017.
44
45
46[1]: https://minikube.sigs.k8s.io/docs/