Helm install gives error while installing jenkins

10/23/2019

While I am trying to install jenkins using Helm chart, it gives error.

$ helm install --name jenkins --namespace jenkins --values values.yml stable/jenkins

Error: render error in "jenkins/templates/deprecation.yaml": template: jenkins/templates/deprecation.yaml:105:14: executing "jenkins/templates/deprecation.yaml" at : error calling fail: Master.ServiceType does no longer exist. It has been renamed to master.serviceType

values.yml

Master:
  ServicePort: 8080
  ServiceType: NodePort
  NodePort: 32123
  ScriptApproval:
    - "method groovy.json.JsonSlurperClassic parseText java.lang.String"
    - "new groovy.json.JsonSlurperClassic"
    - "staticMethod org.codehaus.groovy.runtime.DefaultGroovyMethods leftShift java.util.Map java.util.Map"
    - "staticMethod org.codehaus.groovy.runtime.DefaultGroovyMethods split java.lang.String"
  InstallPlugins:
    - kubernetes:1.7.1   
    - workflow-aggregator:2.5   
    - workflow-job:2.21   
    - credentials-binding:1.16   
    - git:3.9.1   
Agent:
  volumes:
    - type: HostPath
      hostPath: /var/run/docker.sock
      mountPath: /var/run/docker.sock

Persistence:
  enabled: true
  StorageClass: jenkins-volume   
  Size: 3Gi

NetworkPolicy:
  enabled: false
  ApiVersion: extensions/v1beta1

rbac:
  install: true
  serviceAccountName: default
  apiVersion: v1beta1
  roleRef: cluster-admin
-- Abhishek Parmar
jenkins
kubernetes
kubernetes-helm
minikube
yaml

1 Answer

10/23/2019

Your values.yaml file isn't compatible with jenkins's values.yaml. You should follow the format they suggest.

master:
  servicePort: 8080
  serviceType: NodePort
  nodePort: 32123
  scriptApproval:
    - "method groovy.json.JsonSlurperClassic parseText java.lang.String"
    - "new groovy.json.JsonSlurperClassic"
    - "staticMethod org.codehaus.groovy.runtime.DefaultGroovyMethods leftShift java.util.Map java.util.Map"
    - "staticMethod org.codehaus.groovy.runtime.DefaultGroovyMethods split java.lang.String"
  installPlugins:
    - kubernetes:1.7.1   
    - workflow-aggregator:2.5   
    - workflow-job:2.21   
    - credentials-binding:1.16   
    - git:3.9.1 

  ......

You can find the actual format at jenkins/values.yaml.

-- Masudur Rahman
Source: StackOverflow