Skip to content

k8s 命名空间资源保护,避免资源误删除

Notifications You must be signed in to change notification settings

suyanhj/namespaceProtect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Namespace Protect

k8s命名空间删除保护operator,使用kopf实现

通过为crd为命名空间配置注解,实现删除保护

安装

git clone https://github.com/suyanhj/namespaceProtect.git --depth=1
cd namespaceProtect
make install

调试

命令运行

operator

python3 -m kopf run --verbose --standalone --log-format=full --liveness http://0.0.0.0:8080 main/np_operator.py 

准入控制webhook

cd tools
sh cert.sh
sh registry-webhook.sh
python3 main/np_webhook.py

k8s运行

sh tools/dk-build.sh operator webhook
make install

About

k8s 命名空间资源保护,避免资源误删除

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published