1
0
Fork
You've already forked openshift-janitor-operator
0
Automatically clean up stale projects on OpenShift
  • Go 95.2%
  • Shell 2.7%
  • Dockerfile 2.1%
Find a file
2020年03月09日 19:59:46 +11:00
build Generate with operator-sdk 2020年03月06日 23:58:19 +11:00
cmd/manager Basic README 2020年03月07日 14:49:19 +11:00
deploy Update the sweep spec to include more controls. 2020年03月09日 19:59:46 +11:00
pkg Update the sweep spec to include more controls. 2020年03月09日 19:59:46 +11:00
version Generate with operator-sdk 2020年03月06日 23:58:19 +11:00
.gitignore Generate with operator-sdk 2020年03月06日 23:58:19 +11:00
go.mod Now properly evaluating projects 2020年03月08日 22:03:13 +11:00
go.sum Now properly evaluating projects 2020年03月08日 22:03:13 +11:00
README.md Update the sweep spec to include more controls. 2020年03月09日 19:59:46 +11:00
run-local.sh Design Sweep type first (it will be the job equivalent to cronjob) 2020年03月08日 20:09:47 +11:00
tools.go Generate with operator-sdk 2020年03月06日 23:58:19 +11:00

openshift-janitor-operator

Make sure your OpenShift Dev Cluster stays free of Junk!

Summary

The OpenShift Janitor takes care of Projects that people have created and abandoned on an OpenShift cluster.

Normally this happens in a cluster which is not tightly controlled but which is multi-tenanted.

Whitelisting Projects

The following system related namespaces are whitelisted by default and will never be deleted:

default
kube-*
openshift
openshift-*

Usage

Sweep

A Sweep object is a one time cluster scan for old Projects. To sweep your cluster every few days or weeks, use the Janitor resource.

apiVersion: com.github.mosen.openshift-janitor/v1alpha1
kind: Sweep
metadata:
 name: example-sweep
spec:
 # The age of a project, after which the owner will be warned about its removal.
 warnAgeDays: 83
 # The maximum number of days old a Project can be before it is removed
 deleteAgeDays: 90
 # Don't delete these projects/namespaces.
 ignoreProjects:
 - my-favourite-project
 # Don't delete projects/namespaces which have this annotation.
 ignoreAnnotation:
 com.github.mosen.openshift-janitor: "ignore"

Janitor

(TODO)