Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated jenkins/README.md #567

Merged
merged 2 commits into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/jenkins/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
appVersion: "v2.222.1"
description: A Helm chart for deploying Jenkins on OpenShift with some additional build agents and plugins
name: jenkins
version: 1.0.10
version: 1.0.11
home: https://github.com/redhat-cop/helm-charts
icon: https://www.jenkins.io/images/logos/jenkins/256.png
maintainers:
Expand Down
49 changes: 27 additions & 22 deletions charts/jenkins/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,35 @@
[Jenkins](https://jenkins.io/) is an open source automation server which enables developers around the world to reliably build, test, and deploy their software.

## Introduction

This chart helps you to create a Jenkins master and agents on Openshift cluster. It also allows you to customize them based on your needs.

## Installing Jenkins

To install Jenkins on your current namespace:

```bash
$ helm template -f jenkins/values.yaml jenkins | oc apply -f-
helm template -f jenkins/values.yaml jenkins | oc apply -f-
```
The above command deploys Jenkins on a cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation.

The above command deploys Jenkins on a cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation.

## Configuration

The following table lists the configurable parameters of the Jenkins chart and their default values.

### Jenkins Master

| Parameter | Description | Default |
| ------------------------------------------------ | --------------------------------------------------------------------------- | ---------------------------------------------------- |
| `appName` | Name of the application | `jenkins` |
| `route` | Enable openshift route | `true` |
| `route` | Enable openshift route | `true` |
| `source_secret.name` | Name of the secret object | `git-auth` |
| `source_secret.username` | Username of the git account | `idm-sa` |
| `source_secret.password` | Password of the git account | `thisisdefinitelymypassword` |
| `sealed_secret.name` | Name of the secret object | `nexus-password` |
| `sealed_secret.username` | Encrypted username data | `AgBd8kR+KbG+FiOpYP4SlR80npiNiZI...` |
| `sealed_secret.password` | Encrypted password data | `AgBd8kR+KbG+FiOpYP4SlR80npiNiZI...` |
| `sealed_secret.name` | Name of the secret object | `nexus-password` |
| `sealed_secret.username` | Encrypted username data | `AgBd8kR+KbG+FiOpYP4SlR80npiNiZI...` |
| `sealed_secret.password` | Encrypted password data | `AgBd8kR+KbG+FiOpYP4SlR80npiNiZI...` |
| `deployment.openshiftauth` | Enable Openshift OAuth for Jenkins master | `true` |
| `deployment.imagestream.name` | Imagestream name for Jenkins master | `jenkins` |
| `deployment.imagestream.tag` | Imagestream tag for Jenkins master | `latest` |
Expand All @@ -38,8 +40,8 @@ The following table lists the configurable parameters of the Jenkins chart and t
| `deployment.limits.cpu_request` | Starting request of cpu that Jenkins master use | `500m` |
| `deployment.limits.cpu_limit` | Maximum amount of memory Jenkins master use | `1` |
| `deployment.env_vars` | Environment variables for Jenkins master | `''` |
| `persistence.accessModes` | Access mode for Jenkins PV | `''` |
| `persistence.volumeSize` | Volume size for Jenkins PV | `''` |
| `persistence.accessModes` | Access mode for Jenkins PV | `''` |
| `persistence.volumeSize` | Volume size for Jenkins PV | `''` |
| `services.jenkins.port_name` | Port name of service for Jenkins master | `web` |
| `services.jenkins.port` | Port of Jenkins master service | `80` |
| `services.jenkins.target_port` | Target port of Jenkins master service | `8080` |
Expand All @@ -49,18 +51,20 @@ The following table lists the configurable parameters of the Jenkins chart and t
| `services.jenkins-jnlp.port` | Port of Jenkins master service | `50000` |
| `services.jenkins-jnlp.target_port` | Target port of Jenkins JNLP service | `50000` |
| `services.jenkins-jnlp.selector` | Selector for Jenkins JNLP service to match with Jenkins master deployment | `jenkins` |
|`buildconfigs.name`| Build and ImageStream name | `''`
|`buildconfigs.name.strategy_type`| Build strategy type for Jenkins | `Docker`
|`buildconfigs.name.source_repo`| Git repo URL for custom | `https://github.com/redhat-cop/containers-quickstarts`
|`buildconfigs.name.source_repo_ref`| Git Reference of custom Jenkins | `master`
|`buildconfigs.name.source_context_dir`| The directory in the source repository where Jenkins master docker build is | `/`
|`buildconfigs.name.builder_image_kind`| Builder image kind | `ImageStreamTag`
|`buildconfigs.name.builder_image_name`| Builder image name for custom build | `''`
|`buildconfigs.name.builder_image_tag`| Builder image tag for custom build | `''`
|`role` | The value of role value for Jenkins Agent ImageStream. It is used for Jenkins sync plugin to discover agents automatically | `jenkins-slave` |
|`configAsCode.configMap` | The name of the ConfigMap to create and associate with the Jenkins DeploymentConfig in order to be used for Configuration-as-Code | `null` |
|`configAsCode.body` | The body content of the configuration-as-code which will be stored in the ConfigMap, mounted in the Jenkins pod, and read in as Configuration by the Configuration-as-Code plugin | `null` |
| `buildconfigs.name` | Build and ImageStream name | `''` |
| `buildconfigs.name.strategy_type` | Build strategy type for Jenkins | `Docker` |
| `buildconfigs.name.source_repo` | Git repo URL for custom | `https://github.com/redhat-cop/containers-quickstarts` |
| `buildconfigs.name.source_repo_ref` | Git Reference of custom Jenkins | `master` |
| `buildconfigs.name.source_context_dir` | The directory in the source repository where Jenkins master docker build is | `/` |
| `buildconfigs.name.builder_image_kind` | Builder image kind | `ImageStreamTag` |
| `buildconfigs.name.builder_image_name` | Builder image name for custom build | `''` |
| `buildconfigs.name.builder_image_tag` | Builder image tag for custom build | `''` |
| `role` | The value of role value for Jenkins Agent ImageStream. It is used for Jenkins sync plugin to discover agents automatically | `jenkins-slave` |
| `configAsCode.configMap` | The name of the ConfigMap to create and associate with the Jenkins DeploymentConfig in order to be used for Configuration-as-Code | `null` |
| `configAsCode.body` | The body content of the configuration-as-code which will be stored in the ConfigMap, mounted in the Jenkins pod, and read in as Configuration by the Configuration-as-Code plugin | `null` |

### Environment Variables

There are additional environment variables you can set to customize your Jenkins based on your needs. You can update these values on your [values](https://github.com/redhat-cop/helm-charts/blob/master/charts/jenkins/values.yaml#L23) file.
| Variable | Description | Default |
| ------------------------------------------------ | --------------------------------------------------------------------------- | ---------------------------------------------------- |
Expand All @@ -80,9 +84,9 @@ There are additional environment variables you can set to customize your Jenkins
| `GITLAB_TOKEN` | GitLab API token to access repos and projects | `''` |
| `GITLAB_GROUP_NAME` | GitLab group name where projects are stored | `rht-labs` |


### Jenkins Agents
Following agents are created by default when you install the chart. They are designed to run in OpenShift as described [here](https://docs.openshift.com/container-platform/latest/openshift_images/using_images/images-other-jenkins.html#images-other-jenkins-config-kubernetes_images-other-jenkins). You can find more details at [containers-quickstarts](https://github.com/redhat-cop/containers-quickstarts") repository.

Following agents are created by default when you install the chart. They are designed to run in OpenShift as described [here](https://docs.openshift.com/container-platform/latest/openshift_images/using_images/images-other-jenkins.html#images-other-jenkins-config-kubernetes_images-other-jenkins). You can find more details at [containers-quickstarts](https://github.com/redhat-cop/containers-quickstarts) repository.

- jenkins-agent-ansible
- jenkins-agent-arachni
Expand All @@ -104,8 +108,9 @@ Following agents are created by default when you install the chart. They are des
You can remove the ones you do not need by deleting the related imagestream and buildconfig blocks from [values](https://github.com/redhat-cop/helm-charts/blob/master/charts/jenkins/values.yaml#L80) file.

### Persistence

If you want to set your Jenkins as ephemeral, you should either remove the persistence [block](https://github.com/redhat-cop/helm-charts/blob/master/charts/jenkins/values.yaml#L55) from your values file or set persistent value as below during the installation:

```bash
$ helm template --set persistence='' -f jenkins/values.yaml jenkins | oc apply -f-
helm template --set persistence='' -f jenkins/values.yaml jenkins | oc apply -f-
```