-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CRD conversion webhook and move example
- Add CRD conversion webhook pkg - Move example to harvester/webhook-sample
- Loading branch information
1 parent
0dac506
commit a15c5da
Showing
22 changed files
with
443 additions
and
557 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,15 +1,6 @@ | ||
# webhook | ||
|
||
Inspired by [rancher webhook](https://github.com/rancher/webhook) and [harvester webhook](https://github.com/harvester/harvester/tree/master/pkg/webhook), it's a framework for developing a Kubernetes webhook easily. | ||
Developers need to only implement a validator or mutator interface and register it to the webhook server. | ||
Developers need to only implement interface and register it to the webhook server. It supports validator, mutator and CRD conversion webhook. | ||
|
||
## Example | ||
The example implements a simple pod validator and pod mutator. | ||
- pod validator: log when a pod is deleted. | ||
- pod mutator: add label `example:example` when a pod is created. | ||
|
||
### How to deploy | ||
```shell | ||
export KUBECONFIG=<your kubeconfig> | ||
make apply | ||
``` | ||
Go to [harvester/webhook-sample](https://github.com/harvester/webhook-sample) to look a simple example. |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.