-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
wrkode
committed
Mar 11, 2023
1 parent
3dc123a
commit ea0498d
Showing
1 changed file
with
28 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,31 @@ | ||
# Namespace-watcher | ||
|
||
A Kubernetes Namespace Watcher. | ||
The watcher will add LimitRange for CPU, MEM and epheremeral-storage. | ||
namespace-watcher will watch the Kubernetes Event Stream and add LimitRange ```default-limits``` for CPU, MEM and epheremeral-storage to any new namespace created | ||
|
||
## Requirements | ||
|
||
kube-apiserver must have the the following admission-plugins enabled: | ||
```LimitRanger,DefaultStorageClass,NamespaceLifecycle,LimitRanger,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota,PodNodeSelector,PodPreset,DefaultLimitRange``` | ||
|
||
## Exclusions | ||
|
||
namespace-watcher, will not add limits to: | ||
|
||
- Any namespaces containing ```cattle`` in te name. | ||
- ```kube-system``` | ||
- ```kube-public``` | ||
- ```istio-system``` | ||
- ```kube-local``` | ||
- ```default``` | ||
|
||
## Deployment | ||
|
||
A serviceaccount, ClusterRole and ClusterRoleBinding are created to allow namespace-watcher to observe and update namespaces. | ||
download the manifest deployment.yaml and run: | ||
```kubectl apply -f deployment.yaml``` | ||
namespace-watcher will be deployed in the ```kube-system``` namespace | ||
|
||
## ToDo (future release) | ||
|
||
- Implement namespace exclusion as array in the manifest file |