From 1499f6608566ef831068ac4e532d1d8552c46328 Mon Sep 17 00:00:00 2001 From: Javier Arauz Date: Mon, 11 Feb 2019 08:09:20 +0100 Subject: [PATCH] [stable/jenkins] Added slave Pod env vars (#8743) * [stable/jenkins] Added slave Pod env vars Signed-off-by: ecejjar * Bumped up chart version Signed-off-by: ecejjar * Added envVars to values.yaml Signed-off-by: ecejjar --- stable/jenkins/Chart.yaml | 2 +- stable/jenkins/README.md | 1 + stable/jenkins/templates/config.yaml | 9 ++++++++- stable/jenkins/values.yaml | 4 ++++ 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/stable/jenkins/Chart.yaml b/stable/jenkins/Chart.yaml index 057a5ab96d..580a0e733c 100755 --- a/stable/jenkins/Chart.yaml +++ b/stable/jenkins/Chart.yaml @@ -1,6 +1,6 @@ name: jenkins home: https://jenkins.io/ -version: 0.29.3 +version: 0.30.0 appVersion: lts 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/README.md b/stable/jenkins/README.md index abebf29db9..d0baf1ab36 100644 --- a/stable/jenkins/README.md +++ b/stable/jenkins/README.md @@ -111,6 +111,7 @@ Some third-party systems, e.g. GitHub, use HTML-formatted data in their payload | `Agent.Privileged` | Agent privileged container | `false` | | `Agent.resources` | Resources allocation (Requests and Limits) | `{requests: {cpu: 200m, memory: 256Mi}, limits: {cpu: 200m, memory: 256Mi}}`| | `Agent.volumes` | Additional volumes | `nil` | +| `Agent.envVars | Environment variables for the slave Pod | Not set | Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. diff --git a/stable/jenkins/templates/config.yaml b/stable/jenkins/templates/config.yaml index 898dcf5e59..ebbf771cb9 100644 --- a/stable/jenkins/templates/config.yaml +++ b/stable/jenkins/templates/config.yaml @@ -100,7 +100,14 @@ data: - + +{{- range $index, $var := .Values.Agent.envVars }} + + {{ $var.name }} + {{ $var.value }} + +{{- end }} + {{- if .Values.Agent.ImagePullSecret }} diff --git a/stable/jenkins/values.yaml b/stable/jenkins/values.yaml index db131ecfb5..85f4355f89 100644 --- a/stable/jenkins/values.yaml +++ b/stable/jenkins/values.yaml @@ -276,6 +276,10 @@ Agent: # Allowed types are: ConfigMap, EmptyDir, HostPath, Nfs, Pod, Secret # Configure the attributes as they appear in the corresponding Java class for that type # https://github.com/jenkinsci/kubernetes-plugin/tree/master/src/main/java/org/csanchez/jenkins/plugins/kubernetes/volumes + # Pod-wide ennvironment, these vars are visible to any container in the slave pod + envVars: + # - name: PATH + # value: /usr/local/bin volumes: # - type: Secret # secretName: mysecret