mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
[stable/jenkins] Add existing PVC (#716)
* Add existing PVC, for jenkins * clean up templating
This commit is contained in:
committed by
Sameer Naik
parent
3d2733d2c1
commit
05271f145f
@@ -1,6 +1,6 @@
|
||||
name: jenkins
|
||||
home: https://jenkins.io/
|
||||
version: 0.1.15
|
||||
version: 0.2.0
|
||||
description: Open source continuous integration server. It supports multiple SCM tools including CVS, Subversion and Git. It can execute Apache Ant and Apache Maven-based projects as well as arbitrary scripts.
|
||||
sources:
|
||||
- https://github.com/jenkinsci/jenkins
|
||||
|
||||
@@ -67,11 +67,33 @@ $ helm install --name my-release -f values.yaml stable/jenkins
|
||||
|
||||
## Persistence
|
||||
|
||||
The Jenkins image stores persistence under `/var/jenkins_home` path of the container. A Persistent Volume
|
||||
Claim is used to keep the data across deployments. This is known to work in GCE, AWS, and minikube.
|
||||
The Jenkins image stores persistence under `/var/jenkins_home` path of the container. A dynamically managed Persistent Volume
|
||||
Claim is used to keep the data across deployments, by default. This is known to work in GCE, AWS, and minikube. Alternatively,
|
||||
a previously configured Persistent Volume Claim can be used.
|
||||
|
||||
It is possible to mount several volumes using `Persistence.volumes` and `Persistence.mounts` parameters.
|
||||
|
||||
### Persistence Values
|
||||
|
||||
| Parameter | Description | Default |
|
||||
| --------- | ----------- | ------- |
|
||||
| `Persistence.Enabled` | Enable the use of a Jenkins PVC | `true` |
|
||||
| `Persistence.ExistingClaim` | Provide the name of a PVC | `nil` |
|
||||
| `Persistence.AccessMode` | The PVC access mode | `ReadWriteOnce` |
|
||||
| `Persistence.Size` | The size of the PVC | `8Gi` |
|
||||
| `Persistence.volumes` | Additional volumes | `nil` |
|
||||
| `Persistence.mounts` | Additional mounts | `nil` |
|
||||
|
||||
|
||||
#### Existing PersistentVolumeClaim
|
||||
|
||||
1. Create the PersistentVolume
|
||||
1. Create the PersistentVolumeClaim
|
||||
1. Install the chart
|
||||
```bash
|
||||
$ helm install --name my-release --set Persistence.ExistingClaim=PVC_NAME stable/jenkins
|
||||
```
|
||||
|
||||
## Custom ConfigMap
|
||||
|
||||
When creating a new chart with this chart as a dependency, CustomConfigMap can be used to override the default config.xml provided.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{{- if .Values.Persistence.Enabled }}
|
||||
{{- if and .Values.Persistence.Enabled (not .Values.Persistence.ExistingClaim) -}}
|
||||
kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
|
||||
@@ -96,7 +96,7 @@ spec:
|
||||
- name: jenkins-home
|
||||
{{- if .Values.Persistence.Enabled }}
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ template "fullname" . }}
|
||||
claimName: {{ .Values.Persistence.ExistingClaim | default (include "fullname" .) }}
|
||||
{{- else }}
|
||||
emptyDir: {}
|
||||
{{- end -}}
|
||||
|
||||
@@ -47,6 +47,11 @@ Agent:
|
||||
|
||||
Persistence:
|
||||
Enabled: true
|
||||
## A manually managed Persistent Volume and Claim
|
||||
## Requires Persistence.Enabled: true
|
||||
## If defined, PVC must be created manually before volume will be bound
|
||||
# ExistingClaim:
|
||||
|
||||
## If defined, volume.beta.kubernetes.io/storage-class: <StorageClass>
|
||||
## Default: volume.alpha.kubernetes.io/storage-class: default
|
||||
##
|
||||
|
||||
Reference in New Issue
Block a user