diff --git a/stable/jenkins/Chart.yaml b/stable/jenkins/Chart.yaml index 50a44c8687..60bd252b01 100755 --- a/stable/jenkins/Chart.yaml +++ b/stable/jenkins/Chart.yaml @@ -1,7 +1,7 @@ name: jenkins home: https://jenkins.io/ -version: 0.16.4 -appVersion: 2.107 +version: 0.16.5 +appVersion: 2.121.1 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. diff --git a/stable/jenkins/README.md b/stable/jenkins/README.md index 2caa3d261c..9417081200 100644 --- a/stable/jenkins/README.md +++ b/stable/jenkins/README.md @@ -38,8 +38,7 @@ The following tables list the configurable parameters of the Jenkins chart and t | `Master.Component` | k8s selector key | `jenkins-master` | | `Master.UseSecurity` | Use basic security | `true` | | `Master.AdminUser` | Admin username (and password) created as a secret if useSecurity is true | `admin` | -| `Master.Cpu` | Master requested cpu | `200m` | -| `Master.Memory` | Master requested memory | `256Mi` | +| `Master.resources` | Resources allocation (Requests and Limits) | `{requests: {cpu: 50m, memory: 256Mi}, limits: {cpu: 2000m, memory: 2048Mi}}`| | `Master.InitContainerEnv` | Environment variables for Init Container | Not set | | `Master.ContainerEnv` | Environment variables for Jenkins Container | Not set | | `Master.RunAsUser` | uid that jenkins runs with | `0` | @@ -90,8 +89,7 @@ The following tables list the configurable parameters of the Jenkins chart and t | `Agent.ImagePullSecret` | Agent image pull secret | Not set | | `Agent.ImageTag` | Agent image tag | `2.62` | | `Agent.Privileged` | Agent privileged container | `false` | -| `Agent.Cpu` | Agent requested cpu | `200m` | -| `Agent.Memory` | Agent requested memory | `256Mi` | +| `Agent.resources` | Resources allocation (Requests and Limits) | `{requests: {cpu: 200m, memory: 256Mi}, limits: {cpu: 200m, memory: 256Mi}}`| | `Agent.volumes` | Additional volumes | `nil` | 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 b657cbb830..b16fd6a520 100644 --- a/stable/jenkins/templates/config.yaml +++ b/stable/jenkins/templates/config.yaml @@ -67,10 +67,13 @@ data: ${computer.jnlpmac} ${computer.name} false - {{.Values.Agent.Cpu}} - {{.Values.Agent.Memory}} - {{.Values.Agent.Cpu}} - {{.Values.Agent.Memory}} + # Resources configuration is a little hacky. This was to prevent breaking + # changes, and should be cleanned up in the future once everybody had + # enough time to migrate. + {{.Values.Agent.Cpu | default .Values.Agent.resources.requests.cpu}} + {{.Values.Agent.Memory | default .Values.Agent.resources.requests.memory}} + {{.Values.Agent.Cpu | default .Values.Agent.resources.limits.cpu}} + {{.Values.Agent.Memory | default .Values.Agent.resources.limits.memory}} JENKINS_URL diff --git a/stable/jenkins/templates/jenkins-master-deployment.yaml b/stable/jenkins/templates/jenkins-master-deployment.yaml index b7687240fb..0eaf6a524a 100644 --- a/stable/jenkins/templates/jenkins-master-deployment.yaml +++ b/stable/jenkins/templates/jenkins-master-deployment.yaml @@ -140,10 +140,17 @@ spec: port: http initialDelaySeconds: {{ .Values.Master.HealthProbesReadinessTimeout }} {{- end }} + # Resources configuration is a little hacky. This was to prevent breaking + # changes, and should be cleanned up in the future once everybody had + # enough time to migrate. resources: +{{ if or .Values.Master.Cpu .Values.Master.Memory }} requests: cpu: "{{ .Values.Master.Cpu }}" memory: "{{ .Values.Master.Memory }}" +{{ else }} +{{ toYaml .Values.Master.resources | indent 12 }} +{{ end }} volumeMounts: {{- if .Values.Persistence.mounts }} {{ toYaml .Values.Persistence.mounts | indent 12 }} diff --git a/stable/jenkins/values.yaml b/stable/jenkins/values.yaml index 986b033415..feedb211d1 100644 --- a/stable/jenkins/values.yaml +++ b/stable/jenkins/values.yaml @@ -18,8 +18,13 @@ Master: UseSecurity: true AdminUser: admin # AdminPassword: - Cpu: "200m" - Memory: "256Mi" + resources: + requests: + cpu: "50m" + memory: "256Mi" + limits: + cpu: "2000m" + memory: "2048Mi" # Environment variables that get added to the init container (useful for e.g. http_proxy) # InitContainerEnv: # - name: http_proxy @@ -127,8 +132,13 @@ Agent: # ImagePullSecret: jenkins Component: "jenkins-slave" Privileged: false - Cpu: "200m" - Memory: "256Mi" + resources: + requests: + cpu: "200m" + memory: "256Mi" + limits: + cpu: "200m" + memory: "256Mi" # You may want to change this to true while testing a new image AlwaysPullImage: false # You can define the volumes that you want to mount for this container