From c0dc6cc48bf7bbd051599eb8d7c7ad9ea2b97c41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9sar=20Alba=20Lozano?= Date: Wed, 15 Aug 2018 23:02:59 +0200 Subject: [PATCH] Configure kubernetes plugin for including namespace value (#7164) * Configure kubernetes plugin for including namespace value * Update Chart.yaml --- stable/jenkins/Chart.yaml | 2 +- stable/jenkins/templates/config.yaml | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/stable/jenkins/Chart.yaml b/stable/jenkins/Chart.yaml index dcce03849a..9fe04ea269 100755 --- a/stable/jenkins/Chart.yaml +++ b/stable/jenkins/Chart.yaml @@ -1,6 +1,6 @@ name: jenkins home: https://jenkins.io/ -version: 0.16.19 +version: 0.16.20 appVersion: 2.121.2 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 diff --git a/stable/jenkins/templates/config.yaml b/stable/jenkins/templates/config.yaml index 6dee07bd82..afab208694 100644 --- a/stable/jenkins/templates/config.yaml +++ b/stable/jenkins/templates/config.yaml @@ -77,7 +77,11 @@ data: JENKINS_URL +{{- if .Values.Master.SlaveKubernetesNamespace }} + http://{{ template "jenkins.fullname" . }}.{{.Release.Namespace}}:{{.Values.Master.ServicePort}}{{ default "" .Values.Master.JenkinsUriPrefix }} +{{- else }} http://{{ template "jenkins.fullname" . }}:{{.Values.Master.ServicePort}}{{ default "" .Values.Master.JenkinsUriPrefix }} +{{- end }} @@ -100,9 +104,14 @@ data: https://kubernetes.default false - {{ .Release.Namespace }} + {{ default .Release.Namespace .Values.Master.SlaveKubernetesNamespace }} +{{- if .Values.Master.SlaveKubernetesNamespace }} + http://{{ template "jenkins.fullname" . }}.{{.Release.Namespace}}:{{.Values.Master.ServicePort}}{{ default "" .Values.Master.JenkinsUriPrefix }} + {{ template "jenkins.fullname" . }}-agent.{{.Release.Namespace}}:50000 +{{- else }} http://{{ template "jenkins.fullname" . }}:{{.Values.Master.ServicePort}}{{ default "" .Values.Master.JenkinsUriPrefix }} {{ template "jenkins.fullname" . }}-agent:50000 +{{- end }} 10 5 0