Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cuisongliu/webhook
kubernetes的webhook脚手架
https://github.com/cuisongliu/webhook
certificate generator kubernetes webhook
Last synced: 15 days ago
JSON representation
kubernetes的webhook脚手架
- Host: GitHub
- URL: https://github.com/cuisongliu/webhook
- Owner: cuisongliu
- License: apache-2.0
- Created: 2021-04-07T11:18:15.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-04-25T10:46:19.000Z (over 3 years ago)
- Last Synced: 2024-12-21T11:02:03.772Z (20 days ago)
- Topics: certificate, generator, kubernetes, webhook
- Language: Go
- Homepage:
- Size: 43.9 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.MD
- License: LICENSE
Awesome Lists containing this project
README
# k8s webhook手脚架
1. 自动签发证书
- 进入 `example/cert/testdata` 执行 `kubectl apply -f webhook_init.yaml` 进行初始化webhook
- 进入 `example/cert` 调整参数执行cert.go
- 进入 `example/cert/testdata` 执行 `kubectl get -f webhook_init.yaml -o yaml ` 验证是否替换证书和service成功
- `example/cert/rbac.yaml`是需要的rbac,用管理员权限可忽略
2. 普通webhook (借鉴kubebuilder实现)
- main.go加入方法
```go
hookServer := mgr.GetWebhookServer()
webhook.SetupWebhook(hookServer, mgr)
```