Skip to content

Commit

Permalink
add annotation controller docs
Browse files Browse the repository at this point in the history
Signed-off-by: Achref Ben Saadd <[email protected]>
  • Loading branch information
achrefbensaad committed Jul 4, 2022
1 parent 7410c1c commit 6d85e92
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
18 changes: 18 additions & 0 deletions contribution/development_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,23 @@
$ cd KubeArmor/KubeArmor
~/KubeArmor/KubeArmor$ make run
```
* Annotation controller
Starting from KubeArmor v0.5 annotations are applied via an annotation controller, the controller code can be found under `pkg/KubeArmorAnnotation`.
To install the controller from KubeArmor docker repository run
```text
$ cd KubeArmor/pkg/KubeArmorAnnotation
~/KubeArmor/pkg/KubeArmorAnnotation$ make deploy
```
To install the controller (local version) to your cluster run
```text
$ cd KubeArmor/pkg/KubeArmorAnnotation
~/KubeArmor/pkg/KubeArmorAnnotation$ make docker-build deploy
```
if you need to setup a local registry to push you image, use `docker-registry.sh` script under `~/KubeArmor/contribution/local-registry` directory
## Code Directories
Expand Down Expand Up @@ -264,6 +281,7 @@ Here, we briefly give you an overview of KubeArmor's directories.
```text
pkg/KubeArmorPolicy/ - KubeArmorPolicy CRD generated by Kube-Builder
pkg/KubeArmorHostPolicy/ - KubeArmorHostPolicy CRD generated by Kube-Builder
pkg/KubeArmorAnnotation/ - KubeArmorAnnotation Annotation controller/webhook generated by Kube-Builder
```

* Files for testing
Expand Down
15 changes: 15 additions & 0 deletions contribution/testing_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,21 @@

There are two ways to check the functionalities of KubeArmor: 1) testing KubeArmor manually and 2) using the testing framework.

# 0. Make sure that the annotation controller is installed on the cluster (Applicable for Steps 1 and 2)

- To install the controller from KubeArmor docker repository to your cluster run

```text
$ cd KubeArmor/pkg/KubeArmorAnnotation
~/KubeArmor/pkg/KubeArmorAnnotation$ make deploy
```
- To install the controller (local version) to your cluster run

```text
$ cd KubeArmor/pkg/KubeArmorAnnotation
~/KubeArmor/pkg/KubeArmorAnnotation$ make docker-build deploy
```

# 1. Test KubeArmor manually

## 1.1. Run 'kubectl proxy' in background
Expand Down

0 comments on commit 6d85e92

Please sign in to comment.