From 8d23ede5e2e8e0417b396e34f8949a5e90f5af9f Mon Sep 17 00:00:00 2001 From: Amanda Cameron Date: Fri, 20 Jan 2017 15:06:03 -0500 Subject: [PATCH 1/5] Convert chart jenkins to use the recommended pvc patterns --- stable/jenkins/templates/home-pvc.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/stable/jenkins/templates/home-pvc.yaml b/stable/jenkins/templates/home-pvc.yaml index 12a9fd0fac03..5bd696f3e565 100644 --- a/stable/jenkins/templates/home-pvc.yaml +++ b/stable/jenkins/templates/home-pvc.yaml @@ -10,7 +10,14 @@ metadata: release: "{{ .Release.Name }}" heritage: "{{ .Release.Service }}" annotations: - volume.alpha.kubernetes.io/storage-class: {{ .Values.Persistence.StorageClass | quote }} + {{- if .Values.Persistence.StorageClass }} + volume.beta.kubernetes.io/storage-class: {{ .Values.Persistence.StorageClass }} + {{ else }} + volume.alpha.kubernetes.io/storage-class: default + {{- end }} + {{- range $key, $value := .Values.Persistence.Annotations }} + {{ $key }}: {{ $value }} + {{- end }} spec: accessModes: - {{ .Values.Persistence.AccessMode | quote }} From a07265779f04b49e56c496d460b5d7e1996fc9e9 Mon Sep 17 00:00:00 2001 From: Vic Iglesias Date: Fri, 27 Jan 2017 15:38:52 -0800 Subject: [PATCH 2/5] Update home-pvc.yaml --- stable/jenkins/templates/home-pvc.yaml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/stable/jenkins/templates/home-pvc.yaml b/stable/jenkins/templates/home-pvc.yaml index 5bd696f3e565..c9d1c9874317 100644 --- a/stable/jenkins/templates/home-pvc.yaml +++ b/stable/jenkins/templates/home-pvc.yaml @@ -12,12 +12,9 @@ metadata: annotations: {{- if .Values.Persistence.StorageClass }} volume.beta.kubernetes.io/storage-class: {{ .Values.Persistence.StorageClass }} - {{ else }} + {{- else }} volume.alpha.kubernetes.io/storage-class: default {{- end }} - {{- range $key, $value := .Values.Persistence.Annotations }} - {{ $key }}: {{ $value }} - {{- end }} spec: accessModes: - {{ .Values.Persistence.AccessMode | quote }} From 9f5d4e1313314293596d44a56418e5ec11ee64e7 Mon Sep 17 00:00:00 2001 From: Vic Iglesias Date: Fri, 27 Jan 2017 15:39:09 -0800 Subject: [PATCH 3/5] Update Chart.yaml --- stable/jenkins/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stable/jenkins/Chart.yaml b/stable/jenkins/Chart.yaml index 9dab18825797..edf5be2867dd 100755 --- a/stable/jenkins/Chart.yaml +++ b/stable/jenkins/Chart.yaml @@ -1,6 +1,6 @@ name: jenkins home: https://jenkins.io/ -version: 0.1.7 +version: 0.1.8 description: A Jenkins Helm chart for Kubernetes. sources: - https://github.com/jenkinsci/jenkins From af14ad78463b82418f6df23f3beb2aa8e4a426ea Mon Sep 17 00:00:00 2001 From: Vic Iglesias Date: Fri, 27 Jan 2017 15:56:46 -0800 Subject: [PATCH 4/5] Update _helpers.tpl --- stable/jenkins/templates/_helpers.tpl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/stable/jenkins/templates/_helpers.tpl b/stable/jenkins/templates/_helpers.tpl index da95264bcc8f..f0d83d2edba6 100644 --- a/stable/jenkins/templates/_helpers.tpl +++ b/stable/jenkins/templates/_helpers.tpl @@ -3,14 +3,14 @@ Expand the name of the chart. */}} {{- define "name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 24 -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} {{- end -}} {{/* Create a default fully qualified app name. -We truncate at 24 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). */}} {{- define "fullname" -}} {{- $name := default .Chart.Name .Values.nameOverride -}} -{{- printf "%s-%s" .Release.Name $name | trunc 24 -}} -{{- end -}} \ No newline at end of file +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} From b5ae035bac633198d504b49a28769e7d13cffe24 Mon Sep 17 00:00:00 2001 From: Adnan Abdulhussein Date: Fri, 27 Jan 2017 17:36:55 -0800 Subject: [PATCH 5/5] fix notes for 1.5 --- stable/jenkins/templates/NOTES.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/stable/jenkins/templates/NOTES.txt b/stable/jenkins/templates/NOTES.txt index d857860b4214..07ab98bce438 100644 --- a/stable/jenkins/templates/NOTES.txt +++ b/stable/jenkins/templates/NOTES.txt @@ -1,5 +1,5 @@ 1. Get your '{{ .Values.Master.AdminUser }}' user password by running: - printf $(printf '\%o' `kubectl get secret --namespace {{ .Release.Namespace }} {{ template "fullname" . }} -o jsonpath="{.data.jenkins-admin-password[*]}"`);echo + printf $(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "fullname" . }} -o jsonpath="{.data.jenkins-admin-password}" | base64 --decode);echo 2. Get the Jenkins URL to visit by running these commands in the same shell: {{- if contains "NodePort" .Values.Master.ServiceType }} @@ -32,4 +32,3 @@ https://cloud.google.com/solutions/jenkins-on-container-engine ###### the Jenkins pod is terminated. ##### ################################################################################# {{- end }} -