From 802f6449bad4c0f4d36ee953d4ff4204e2f7c700 Mon Sep 17 00:00:00 2001 From: Guang Ya Liu Date: Tue, 5 Sep 2017 23:35:14 +0800 Subject: [PATCH] [stable/jenkins] Use storageClassName for jenkins. (#1997) --- stable/jenkins/Chart.yaml | 2 +- stable/jenkins/templates/home-pvc.yaml | 13 +++++++------ stable/jenkins/values.yaml | 11 ++++++++--- 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/stable/jenkins/Chart.yaml b/stable/jenkins/Chart.yaml index 4c50098496..b7f43472b1 100755 --- a/stable/jenkins/Chart.yaml +++ b/stable/jenkins/Chart.yaml @@ -1,6 +1,6 @@ name: jenkins home: https://jenkins.io/ -version: 0.8.8 +version: 0.8.9 appVersion: 2.67 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: diff --git a/stable/jenkins/templates/home-pvc.yaml b/stable/jenkins/templates/home-pvc.yaml index 5ffb9bdcf5..1c49a021ad 100644 --- a/stable/jenkins/templates/home-pvc.yaml +++ b/stable/jenkins/templates/home-pvc.yaml @@ -8,16 +8,17 @@ metadata: chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" release: "{{ .Release.Name }}" heritage: "{{ .Release.Service }}" - annotations: - {{- if .Values.Persistence.StorageClass }} - volume.beta.kubernetes.io/storage-class: {{ .Values.Persistence.StorageClass }} - {{- else }} - volume.alpha.kubernetes.io/storage-class: default - {{- end }} spec: accessModes: - {{ .Values.Persistence.AccessMode | quote }} resources: requests: storage: {{ .Values.Persistence.Size | quote }} +{{- if .Values.Persistence.StorageClass }} +{{- if (eq "-" .Values.Persistence.StorageClass) }} + storageClassName: "" +{{- else }} + storageClassName: "{{ .Values.Persistence.StorageClass }}" +{{- end }} +{{- end }} {{- end }} diff --git a/stable/jenkins/values.yaml b/stable/jenkins/values.yaml index e9add68e30..998c5abe66 100644 --- a/stable/jenkins/values.yaml +++ b/stable/jenkins/values.yaml @@ -102,10 +102,15 @@ Persistence: ## If defined, PVC must be created manually before volume will be bound # ExistingClaim: - ## If defined, volume.beta.kubernetes.io/storage-class: - ## Default: volume.alpha.kubernetes.io/storage-class: default + ## jenkins data Persistent Volume Storage Class + ## If defined, storageClassName: + ## If set to "-", storageClassName: "", which disables dynamic provisioning + ## If undefined (the default) or set to null, no storageClassName spec is + ## set, choosing the default provisioner. (gp2 on AWS, standard on + ## GKE, AWS & OpenStack) ## - # StorageClass: + # StorageClass: "-" + AccessMode: ReadWriteOnce Size: 8Gi volumes: