Fixed docs and Makefile

This commit is contained in:
sharmapulkit04 2021-08-31 18:55:46 +05:30
parent 7ae767ac84
commit 78d33977a7
4 changed files with 22 additions and 16 deletions

View File

@ -519,15 +519,14 @@ kubebuilder:
test -f ${ENVTEST_ASSETS_DIR}/setup-envtest.sh || curl -sSLo ${ENVTEST_ASSETS_DIR}/setup-envtest.sh https://raw.githubusercontent.com/kubernetes-sigs/controller-runtime/v0.7.0/hack/setup-envtest.sh
source ${ENVTEST_ASSETS_DIR}/setup-envtest.sh; fetch_envtest_tools $(ENVTEST_ASSETS_DIR); setup_envtest_env $(ENVTEST_ASSETS_DIR);
#TODO: Integrate with master Makefile
# start the cluster locally and set it to use the docker daemon from minikube
# install cert-manager v1.5.1
install-cert-manager: minikube-start
kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v1.5.1/cert-manager.yaml
uninstall-cert-manager: minikube-start
kubectl delete -f https://github.com/jetstack/cert-manager/releases/download/v1.5.1/cert-manager.yaml
#Launch cert-manager and deploy the operator locally along with webhook
# Deploy the operator locally along with webhook using helm charts
deploy-webhook: container-runtime-build
@echo "+ $@"
bin/helm upgrade jenkins chart/jenkins-operator --install --set-string operator.image=${IMAGE_NAME} --set webhook.enabled=true --set jenkins.enabled=false

View File

@ -262,7 +262,7 @@ make minikube-start
make e2e
```
Run helm e2e tests:
Run Helm e2e tests:
```bash
eval $(bin/minikube docker-env)
make helm-e2e
@ -304,7 +304,7 @@ To deploy the operator along with webhook, run :
eval $(minikube docker-env)
make deploy-webhook
```
It uses [cert-manager](https://cert-manager.io/) as an external dependancy.
It uses [cert-manager](https://cert-manager.io/) as an external dependency.
## Self-learning

View File

@ -895,21 +895,27 @@ below is the full list of those volumeMounts:
* operator-credentials
## Validating Webhook
A validating webhook can be used in order to increase monitoring capabilities of the security issues. It will look for security vulnerabilities in the base and requested plugins. It can be easily installed via helm charts by setting webhook.enabled in values.yaml.
Validating webhook can be used in order to increase the Operator's capabilities to monitor security issues. It will look for security vulnerabilities in the base and requested plugins. It can be easily installed via Helm charts by setting webhook.enabled in values.yaml.
**Note**: The webhook takes some time to get up and running. It's recommended to first deploy the Operator and later Jenkins Custom Resource by using toggles in `values.yaml`.
For the installation with yaml manifests (without using Helm chart), first, install cert-manager:
**Note**: The webhook takes some time to get up and running. It's recommended to first deploy Operator and later Jenkins Custom Resource by using toggles in values.yaml
If the installation happens with yamls,
First, install cert-manager:
```bash
kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v1.5.1/cert-manager.yaml
```
It takes some time to get cert-manager up and running.
Then, install the webhook and other required resources:
```bash
kubectl apply -f https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/deploy/all-in-one-webhook.yaml
```
Now, download the manifests for the operator and other resources from [here](https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/deploy/all-in-one-v1alpha2.yaml) and please provide these additional fields in the operator manifest:
<pre><code>
<pre>
<code>
apiVersion: apps/v1
kind: Deployment
metadata:
@ -934,7 +940,7 @@ spec:
- /manager
args:
- --leader-elect
<span style="color:orange">- --validate-security-warnings</span>
<b>- --validate-security-warnings</b>
image: jenkins-operator:54231733-dirty
name: jenkins-operator
imagePullPolicy: IfNotPresent
@ -964,7 +970,7 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
<span style="color:orange">volumeMounts:
<b>volumeMounts:
- mountPath: /tmp/k8s-webhook-server/serving-certs
name: webhook-certs
readOnly: true
@ -973,10 +979,11 @@ spec:
secret:
defaultMode: 420
secretName: jenkins-webhook-certificate
terminationGracePeriodSeconds: 10</span>
terminationGracePeriodSeconds: 10</b>
</code>
</pre>
To enable security validation in the jenkins custom resource set
To enable security validation in the jenkins custom resource,set
>jenkins.ValidateSecurityWarnings=true

View File

@ -38,4 +38,4 @@ It helps to maintain or recover the desired state even after the operator or Jen
## Webhook
It rejects/accepts admission requests based on potential security warnings in plugins present in the jenkins custom resource.
It rejects/accepts admission requests based on potential security warnings in plugins present in the Jenkins Custom Resource.