Skip to content

Commit adc5b47

Browse files
authored
Update README.md
fix: update plugin instruction
1 parent 45599a0 commit adc5b47

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,13 @@ The Kube-knark expose 2 hooks for user plugins [Example](https://github.com/chen
4949
- **OnK8sAPICallHook** - this hook accepts k8s api call event with all details (http request /response ,matching API spec)
5050
- **OnK8sFileConfigChangeHook** - this hook accepts master file configuration change event with command details (chown or chmod ,args and matching file change spec)
5151

52+
##### Compile user plugin
53+
```
54+
go build -buildmode=plugin -o=~/<plugin folder>/<plugin>.so ~/<plugin folder>/<plugin>.go
55+
```
5256
##### Copy plugin to folder (.kube-knark folder is created on the 1st startup)
5357
```
54-
cp <plugin>.go ~/.kube-knark/plugins/source/<plugin>.go
58+
cp ~/<plugin folder>/bench_plugin.so ~/.kube-knark/plugins/compile/<plugin>.so
5559
```
5660
## Supported Specs
5761
The Kube-knark support 2 specs and can be easily extended:

0 commit comments

Comments
 (0)