Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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脚手架

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)
```