Updated Documentation

This commit is contained in:
sharmapulkit04 2021-08-23 18:57:26 +05:30
parent ba66ba4c4d
commit 586515b212
4 changed files with 34 additions and 5 deletions

View File

@ -241,7 +241,7 @@ kubectl --context remote-k8s --namespace default get po
Tests are written using [Ginkgo](https://onsi.github.io/ginkgo/) with [Gomega](https://onsi.github.io/gomega/). Tests are written using [Ginkgo](https://onsi.github.io/ginkgo/) with [Gomega](https://onsi.github.io/gomega/).
Run unit tests with go fmt, lint, statickcheck, vet: Run unit tests with go fmt, lint, staticcheck, vet:
```bash ```bash
make verify make verify
@ -262,6 +262,12 @@ make minikube-start
make e2e make e2e
``` ```
Run helm e2e tests:
```bash
eval $(bin/minikube docker-env)
make helm-e2e
```
Run the specific e2e test: Run the specific e2e test:
```bash ```bash
@ -292,8 +298,12 @@ kubectl get secret jenkins-operator-credentials-<cr_name> -o 'jsonpath={.data.us
kubectl get secret jenkins-operator-credentials-<cr_name> -o 'jsonpath={.data.password}' | base64 -d kubectl get secret jenkins-operator-credentials-<cr_name> -o 'jsonpath={.data.password}' | base64 -d
``` ```
### Webhook
To deploy the operator along with webhook, run :
```bash
make deploy-webhook
```
It uses [cert-manager](https://cert-manager.io/) as an external dependancy.
## Self-learning ## Self-learning
@ -314,4 +324,3 @@ kubectl get secret jenkins-operator-credentials-<cr_name> -o 'jsonpath={.data.pa
[minikube]:https://kubernetes.io/docs/tasks/tools/install-minikube/ [minikube]:https://kubernetes.io/docs/tasks/tools/install-minikube/
[virtualbox]:https://www.virtualbox.org/wiki/Downloads [virtualbox]:https://www.virtualbox.org/wiki/Downloads
[install_dev_tools]:https://jenkinsci.github.io/kubernetes-operator/docs/developer-guide/tools/ [install_dev_tools]:https://jenkinsci.github.io/kubernetes-operator/docs/developer-guide/tools/

View File

@ -35,3 +35,8 @@ The **Jenkins Operator** design incorporates the following concepts:
Operator state is kept in the custom resource status section, which is used for storing any configuration events or job statuses managed by the operator. Operator state is kept in the custom resource status section, which is used for storing any configuration events or job statuses managed by the operator.
It helps to maintain or recover the desired state even after the operator or Jenkins restarts. It helps to maintain or recover the desired state even after the operator or Jenkins restarts.
## Webhook
It rejects/accepts admission requests based on potential security warnings in plugins present in the jenkins custom resource.

View File

@ -898,4 +898,15 @@ below is the full list of those volumeMounts:
* jenkins-home * jenkins-home
* scripts * scripts
* init-configuration * init-configuration
* operator-credentials * operator-credentials
## Validating Webhook
You can also have a validating webhook which can be used to validate security warnings in plugins. It can be easily installed via helm charts by setting webhook.enabled in values.yaml or in the command line flag.
>webhook.enabled=true
Also, you can deploy it via kubectl manifests,
To enable security validation in the jenkins custom resource set
>jenkins.ValidateSecurityWarnings=true
**Note**: The webhook takes some time to get up and running,also when helm renders the template the validating webhook configuration is applied at last, hence if the user wants to deploy a jenkins custom resource with validation turned on, he needs to wait for sometime. After the webhook is up and running the user can deploy the jenkins custom resource using *helm* or *kubectl*

View File

@ -0,0 +1,4 @@
# Webhook
You can also have a validating webhook which can be used to validate security warnings in plugins. It can be easily deployed via helm charts just set webhook.enabled to true in helm charts and set jenkins.ValidateSecurityWarnings to true in the jenkins cr.