jenkinsci / helm-charts

Jenkins helm charts
https://artifacthub.io/packages/helm/jenkinsci/jenkins
Apache License 2.0
560 stars 882 forks source link

Failed Loading plugins at Chart 3.1.8 and jenkins 2.263.3 #247

Closed cybaj closed 3 years ago

cybaj commented 3 years ago

Describe the bug A clear and concise description of what the bug is. jenkins.war doesn't works in the pod.

Version of Helm and Kubernetes:

Helm Version:

$ helm version
version.BuildInfo{Version:"v3.5.1", GitCommit:"32c22239423b3b4ba6706d450bd044baffdcf9e6", GitTreeState:"dirty", GoVersion:"go1.15.7"}

Kubernetes Version:

$ kubectl version
Client Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.3", GitCommit:"1e11e4a2108024935ecfcb2912226cedeafd99df", GitTreeState:"clean", BuildDate:"2020-10-14T12:50:19Z", GoVersion:"go1.15.2", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.3", GitCommit:"1e11e4a2108024935ecfcb2912226cedeafd99df", GitTreeState:"clean", BuildDate:"2020-10-14T12:41:49Z", GoVersion:"go1.15.2", Compiler:"gc", Platform:"linux/amd64"}

Which version of the chart: 3.1.8

What happened: after init below happened.

$ kubectl logs pods/jenkins-0 -n jenkins -c jenkins
Running from: /usr/share/jenkins/jenkins.war
webroot: EnvVars.masterEnvVars.get("JENKINS_HOME")
2021-02-10 19:32:12.158+0000 [id=1] INFO    org.eclipse.jetty.util.log.Log#initialized: Logging initialized @1423ms to org.eclipse.jetty.util.log.JavaUtilLog
2021-02-10 19:32:12.528+0000 [id=1] INFO    winstone.Logger#logInternal: Beginning extraction from war file
2021-02-10 19:32:12.625+0000 [id=1] WARNING o.e.j.s.handler.ContextHandler#setContextPath: Empty contextPath
2021-02-10 19:32:12.831+0000 [id=1] INFO    org.eclipse.jetty.server.Server#doStart: jetty-9.4.33.v20201020; built: 2020-10-20T23:39:24.803Z; git: 1be68755656cef678b79a2ef1c2ebbca99e25420; jvm 1.8.0_242-b08
2021-02-10 19:32:13.970+0000 [id=1] INFO    o.e.j.w.StandardDescriptorProcessor#visitServlet: NO JSP Support for /, did not find org.eclipse.jetty.jsp.JettyJspServlet
2021-02-10 19:32:14.353+0000 [id=1] INFO    o.e.j.s.s.DefaultSessionIdManager#doStart: DefaultSessionIdManager workerName=node0
2021-02-10 19:32:14.354+0000 [id=1] INFO    o.e.j.s.s.DefaultSessionIdManager#doStart: No SessionScavenger set, using defaults
2021-02-10 19:32:14.358+0000 [id=1] INFO    o.e.j.server.session.HouseKeeper#startScavenging: node0 Scavenging every 660000ms
2021-02-10 19:32:20.084+0000 [id=1] INFO    hudson.WebAppMain#contextInitialized: Jenkins home directory: /var/jenkins_home found at: EnvVars.masterEnvVars.get("JENKINS_HOME")
2021-02-10 19:32:21.395+0000 [id=1] INFO    o.e.j.s.handler.ContextHandler#doStart: Started w.@18317edc{Jenkins v2.263.3,/,file:///var/jenkins_home/war/,AVAILABLE}{/var/jenkins_home/war}
2021-02-10 19:32:21.689+0000 [id=1] INFO    o.e.j.server.AbstractConnector#doStart: Started ServerConnector@6be46e8f{HTTP/1.1, (http/1.1)}{0.0.0.0:8080}
2021-02-10 19:32:21.692+0000 [id=1] INFO    org.eclipse.jetty.server.Server#doStart: Started @10993ms
2021-02-10 19:32:21.704+0000 [id=21]    INFO    winstone.Logger#logInternal: Winstone Servlet Engine running: controlPort=disabled
2021-02-10 19:32:27.904+0000 [id=28]    INFO    jenkins.InitReactorRunner$1#onAttained: Started initialization
2021-02-10 19:32:30.056+0000 [id=29]    INFO    jenkins.InitReactorRunner$1#onAttained: Listed all plugins
2021-02-10 19:32:34.277+0000 [id=28]    SEVERE  jenkins.InitReactorRunner$1#onTaskFailed: Failed Loading plugin Credentials Plugin v2.3.15 (credentials)
java.io.IOException: Failed to load: Credentials Plugin (2.3.15)
 - Update required: Configuration as Code Plugin (1.46) to be updated to 1.47 or higher
    at hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:952)
    at hudson.PluginManager$2$1$1.run(PluginManager.java:549)
    at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
    at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
    at jenkins.model.Jenkins$5.runTask(Jenkins.java:1131)
    at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
    at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
    at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
2021-02-10 19:32:34.285+0000 [id=28]    SEVERE  jenkins.InitReactorRunner$1#onTaskFailed: Failed Loading plugin Authentication Tokens API Plugin v1.4 (authentication-tokens)
java.io.IOException: Failed to load: Authentication Tokens API Plugin (1.4)
 - Failed to load: Credentials Plugin (2.3.15)
    at hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:952)
    at hudson.PluginManager$2$1$1.run(PluginManager.java:549)
    at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
    at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
    at jenkins.model.Jenkins$5.runTask(Jenkins.java:1131)
    at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
    at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
    at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
2021-02-10 19:32:34.292+0000 [id=27]    SEVERE  jenkins.InitReactorRunner$1#onTaskFailed: Failed Loading plugin Plain Credentials Plugin v1.7 (plain-credentials)
java.io.IOException: Failed to load: Plain Credentials Plugin (1.7)
 - Failed to load: Credentials Plugin (2.3.15)
    at hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:952)
    at hudson.PluginManager$2$1$1.run(PluginManager.java:549)
    at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
    at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
    at jenkins.model.Jenkins$5.runTask(Jenkins.java:1131)
    at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
    at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
    at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
2021-02-10 19:32:34.294+0000 [id=27]    SEVERE  jenkins.InitReactorRunner$1#onTaskFailed: Failed Loading plugin SSH Credentials Plugin v1.18.1 (ssh-credentials)
java.io.IOException: Failed to load: SSH Credentials Plugin (1.18.1)
 - Failed to load: Credentials Plugin (2.3.15)
    at hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:952)
    at hudson.PluginManager$2$1$1.run(PluginManager.java:549)
    at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
    at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
    at jenkins.model.Jenkins$5.runTask(Jenkins.java:1131)
    at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
    at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
    at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
2021-02-10 19:32:34.296+0000 [id=27]    SEVERE  jenkins.InitReactorRunner$1#onTaskFailed: Failed Loading plugin Credentials Binding Plugin v1.24 (credentials-binding)
java.io.IOException: Failed to load: Credentials Binding Plugin (1.24)
 - Failed to load: Credentials Plugin (2.3.15)
    at hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:952)
    at hudson.PluginManager$2$1$1.run(PluginManager.java:549)
    at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
    at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
    at jenkins.model.Jenkins$5.runTask(Jenkins.java:1131)
    at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
    at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
    at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
2021-02-10 19:32:34.301+0000 [id=26]    SEVERE  jenkins.InitReactorRunner$1#onTaskFailed: Failed Loading plugin Jenkins JSch dependency plugin v0.1.55.2 (jsch)
java.io.IOException: Failed to load: Jenkins JSch dependency plugin (0.1.55.2)
 - Failed to load: SSH Credentials Plugin (1.18.1)
    at hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:952)
    at hudson.PluginManager$2$1$1.run(PluginManager.java:549)
    at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
    at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
    at jenkins.model.Jenkins$5.runTask(Jenkins.java:1131)
    at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
    at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
    at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
2021-02-10 19:32:34.303+0000 [id=26]    SEVERE  jenkins.InitReactorRunner$1#onTaskFailed: Failed Loading plugin Jenkins Git client plugin v3.6.0 (git-client)
java.io.IOException: Failed to load: Jenkins Git client plugin (3.6.0)
 - Failed to load: Credentials Plugin (2.3.15)
    at hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:952)
    at hudson.PluginManager$2$1$1.run(PluginManager.java:549)
    at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
    at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
    at jenkins.model.Jenkins$5.runTask(Jenkins.java:1131)
    at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
    at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
    at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
2021-02-10 19:32:34.305+0000 [id=26]    SEVERE  jenkins.InitReactorRunner$1#onTaskFailed: Failed Loading plugin Jenkins GIT server Plugin v1.9 (git-server)
java.io.IOException: Failed to load: Jenkins GIT server Plugin (1.9)
 - Failed to load: Jenkins Git client plugin (3.6.0)
    at hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:952)
    at hudson.PluginManager$2$1$1.run(PluginManager.java:549)
    at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
    at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
    at jenkins.model.Jenkins$5.runTask(Jenkins.java:1131)
    at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
    at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
    at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
2021-02-10 19:32:34.360+0000 [id=28]    SEVERE  jenkins.InitReactorRunner$1#onTaskFailed: Failed Loading plugin Jenkins Git plugin v4.5.2 (git)
java.io.IOException: Failed to load: Jenkins Git plugin (4.5.2)
 - Failed to load: Credentials Plugin (2.3.15)
    at hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:952)
    at hudson.PluginManager$2$1$1.run(PluginManager.java:549)
    at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
    at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
    at jenkins.model.Jenkins$5.runTask(Jenkins.java:1131)
    at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
    at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
    at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
2021-02-10 19:32:34.366+0000 [id=26]    SEVERE  jenkins.InitReactorRunner$1#onTaskFailed: Failed Loading plugin Kubernetes Credentials Plugin v0.8.0 (kubernetes-credentials)
java.io.IOException: Failed to load: Kubernetes Credentials Plugin (0.8.0)
 - Failed to load: Authentication Tokens API Plugin (1.4)
    at hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:952)
    at hudson.PluginManager$2$1$1.run(PluginManager.java:549)
    at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
    at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
    at jenkins.model.Jenkins$5.runTask(Jenkins.java:1131)
    at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
    at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
    at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
2021-02-10 19:32:34.370+0000 [id=28]    SEVERE  jenkins.InitReactorRunner$1#onTaskFailed: Failed Loading plugin Pipeline: Declarative Extension Points API v1.8.3 (pipeline-model-extensions)
java.io.IOException: Failed to load: Pipeline: Declarative Extension Points API (1.8.3)
 - Failed to load: Credentials Binding Plugin (1.24)
    at hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:952)
    at hudson.PluginManager$2$1$1.run(PluginManager.java:549)
    at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
    at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
    at jenkins.model.Jenkins$5.runTask(Jenkins.java:1131)
    at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
    at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
    at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
2021-02-10 19:32:34.372+0000 [id=28]    SEVERE  jenkins.InitReactorRunner$1#onTaskFailed: Failed Loading plugin Kubernetes plugin v1.27.6 (kubernetes)
java.io.IOException: Failed to load: Kubernetes plugin (1.27.6)
 - Failed to load: Authentication Tokens API Plugin (1.4)
    at hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:952)
    at hudson.PluginManager$2$1$1.run(PluginManager.java:549)
    at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
    at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
    at jenkins.model.Jenkins$5.runTask(Jenkins.java:1131)
    at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
    at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
    at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
2021-02-10 19:32:34.474+0000 [id=28]    SEVERE  jenkins.InitReactorRunner$1#onTaskFailed: Failed Loading plugin Pipeline: Input Step v2.12 (pipeline-input-step)
java.io.IOException: Failed to load: Pipeline: Input Step (2.12)
 - Failed to load: Credentials Plugin (2.3.15)
    at hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:952)
    at hudson.PluginManager$2$1$1.run(PluginManager.java:549)
    at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
    at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
    at jenkins.model.Jenkins$5.runTask(Jenkins.java:1131)
    at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
    at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
    at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
2021-02-10 19:32:34.482+0000 [id=26]    SEVERE  jenkins.InitReactorRunner$1#onTaskFailed: Failed Loading plugin Pipeline Graph Analysis Plugin v1.10 (pipeline-graph-analysis)
java.io.IOException: Failed to load: Pipeline Graph Analysis Plugin (1.10)
 - Failed to load: Pipeline: Input Step (2.12)
    at hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:952)
    at hudson.PluginManager$2$1$1.run(PluginManager.java:549)
    at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
    at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
    at jenkins.model.Jenkins$5.runTask(Jenkins.java:1131)
    at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
    at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
    at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
2021-02-10 19:32:34.492+0000 [id=29]    SEVERE  jenkins.InitReactorRunner$1#onTaskFailed: Failed Loading plugin Pipeline: Shared Groovy Libraries v2.17 (workflow-cps-global-lib)
java.io.IOException: Failed to load: Pipeline: Shared Groovy Libraries (2.17)
 - Failed to load: Credentials Plugin (2.3.15)
    at hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:952)
    at hudson.PluginManager$2$1$1.run(PluginManager.java:549)
    at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
    at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
    at jenkins.model.Jenkins$5.runTask(Jenkins.java:1131)
    at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
    at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
    at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
2021-02-10 19:32:34.498+0000 [id=27]    SEVERE  jenkins.InitReactorRunner$1#onTaskFailed: Failed Loading plugin Pipeline: Declarative v1.8.3 (pipeline-model-definition)
java.io.IOException: Failed to load: Pipeline: Declarative (1.8.3)
 - Failed to load: Pipeline: Shared Groovy Libraries (2.17)
    at hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:952)
    at hudson.PluginManager$2$1$1.run(PluginManager.java:549)
    at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
    at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
    at jenkins.model.Jenkins$5.runTask(Jenkins.java:1131)
    at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
    at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
    at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
2021-02-10 19:32:34.502+0000 [id=27]    SEVERE  jenkins.InitReactorRunner$1#onTaskFailed: Failed Loading plugin Pipeline: REST API Plugin v2.19 (pipeline-rest-api)
java.io.IOException: Failed to load: Pipeline: REST API Plugin (2.19)
 - Failed to load: Pipeline Graph Analysis Plugin (1.10)
    at hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:952)
    at hudson.PluginManager$2$1$1.run(PluginManager.java:549)
    at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
    at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
    at jenkins.model.Jenkins$5.runTask(Jenkins.java:1131)
    at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
    at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
    at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
2021-02-10 19:32:34.503+0000 [id=27]    SEVERE  jenkins.InitReactorRunner$1#onTaskFailed: Failed Loading plugin Pipeline: Stage View Plugin v2.19 (pipeline-stage-view)
java.io.IOException: Failed to load: Pipeline: Stage View Plugin (2.19)
 - Failed to load: Pipeline: REST API Plugin (2.19)
    at hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:952)
    at hudson.PluginManager$2$1$1.run(PluginManager.java:549)
    at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
    at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
    at jenkins.model.Jenkins$5.runTask(Jenkins.java:1131)
    at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
    at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
    at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
2021-02-10 19:32:34.504+0000 [id=27]    SEVERE  jenkins.InitReactorRunner$1#onTaskFailed: Failed Loading plugin Pipeline v2.6 (workflow-aggregator)
java.io.IOException: Failed to load: Pipeline (2.6)
 - Failed to load: Pipeline: Stage View Plugin (2.19)
    at hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:952)
    at hudson.PluginManager$2$1$1.run(PluginManager.java:549)
    at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
    at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
    at jenkins.model.Jenkins$5.runTask(Jenkins.java:1131)
    at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
    at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
    at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
2021-02-10 19:33:03.745+0000 [id=27]    INFO    jenkins.InitReactorRunner$1#onAttained: Prepared all plugins
2021-02-10 19:33:03.847+0000 [id=27]    INFO    jenkins.InitReactorRunner$1#onAttained: Started all plugins
2021-02-10 19:33:10.783+0000 [id=27]    INFO    jenkins.InitReactorRunner$1#onAttained: Augmented all extensions
2021-02-10 19:33:10.936+0000 [id=26]    INFO    jenkins.InitReactorRunner$1#onAttained: System config loaded
2021-02-10 19:33:13.543+0000 [id=26]    SEVERE  jenkins.InitReactorRunner$1#onTaskFailed: Failed ConfigurationAsCode.init
java.lang.IllegalArgumentException: No hudson.slaves.Cloud implementation found for kubernetes
    at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.lambda$lookupDescriptor$11(HeteroDescribableConfigurator.java:211)
    at io.vavr.control.Option.orElse(Option.java:321)
    at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.lookupDescriptor(HeteroDescribableConfigurator.java:210)
    at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.lambda$configure$3(HeteroDescribableConfigurator.java:84)
    at io.vavr.Tuple2.apply(Tuple2.java:238)
    at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.configure(HeteroDescribableConfigurator.java:83)
    at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.check(HeteroDescribableConfigurator.java:92)
    at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.check(HeteroDescribableConfigurator.java:55)
    at io.jenkins.plugins.casc.BaseConfigurator.configure(BaseConfigurator.java:344)
    at io.jenkins.plugins.casc.BaseConfigurator.check(BaseConfigurator.java:287)
    at io.jenkins.plugins.casc.ConfigurationAsCode.lambda$checkWith$8(ConfigurationAsCode.java:755)
    at io.jenkins.plugins.casc.ConfigurationAsCode.invokeWith(ConfigurationAsCode.java:691)
    at io.jenkins.plugins.casc.ConfigurationAsCode.checkWith(ConfigurationAsCode.java:755)
    at io.jenkins.plugins.casc.ConfigurationAsCode.configureWith(ConfigurationAsCode.java:740)
    at io.jenkins.plugins.casc.ConfigurationAsCode.configureWith(ConfigurationAsCode.java:616)
    at io.jenkins.plugins.casc.ConfigurationAsCode.configure(ConfigurationAsCode.java:298)
    at io.jenkins.plugins.casc.ConfigurationAsCode.init(ConfigurationAsCode.java:290)
Caused: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:104)
Caused: java.lang.Error
    at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:110)
    at hudson.init.TaskMethodFinder$TaskImpl.run(TaskMethodFinder.java:175)
    at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
    at jenkins.model.Jenkins$5.runTask(Jenkins.java:1131)
    at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
    at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
    at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
2021-02-10 19:33:13.552+0000 [id=20]    SEVERE  hudson.util.BootFailure#publish: Failed to initialize Jenkins
java.lang.IllegalArgumentException: No hudson.slaves.Cloud implementation found for kubernetes
    at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.lambda$lookupDescriptor$11(HeteroDescribableConfigurator.java:211)
    at io.vavr.control.Option.orElse(Option.java:321)
    at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.lookupDescriptor(HeteroDescribableConfigurator.java:210)
    at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.lambda$configure$3(HeteroDescribableConfigurator.java:84)
    at io.vavr.Tuple2.apply(Tuple2.java:238)
    at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.configure(HeteroDescribableConfigurator.java:83)
    at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.check(HeteroDescribableConfigurator.java:92)
    at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.check(HeteroDescribableConfigurator.java:55)
    at io.jenkins.plugins.casc.BaseConfigurator.configure(BaseConfigurator.java:344)
    at io.jenkins.plugins.casc.BaseConfigurator.check(BaseConfigurator.java:287)
    at io.jenkins.plugins.casc.ConfigurationAsCode.lambda$checkWith$8(ConfigurationAsCode.java:755)
    at io.jenkins.plugins.casc.ConfigurationAsCode.invokeWith(ConfigurationAsCode.java:691)
    at io.jenkins.plugins.casc.ConfigurationAsCode.checkWith(ConfigurationAsCode.java:755)
    at io.jenkins.plugins.casc.ConfigurationAsCode.configureWith(ConfigurationAsCode.java:740)
    at io.jenkins.plugins.casc.ConfigurationAsCode.configureWith(ConfigurationAsCode.java:616)
    at io.jenkins.plugins.casc.ConfigurationAsCode.configure(ConfigurationAsCode.java:298)
    at io.jenkins.plugins.casc.ConfigurationAsCode.init(ConfigurationAsCode.java:290)
Caused: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:104)
Caused: java.lang.Error
    at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:110)
    at hudson.init.TaskMethodFinder$TaskImpl.run(TaskMethodFinder.java:175)
    at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
    at jenkins.model.Jenkins$5.runTask(Jenkins.java:1131)
    at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
    at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
    at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
Caused: org.jvnet.hudson.reactor.ReactorException
    at org.jvnet.hudson.reactor.Reactor.execute(Reactor.java:282)
    at jenkins.InitReactorRunner.run(InitReactorRunner.java:50)
    at jenkins.model.Jenkins.executeReactor(Jenkins.java:1164)
    at jenkins.model.Jenkins.<init>(Jenkins.java:964)
    at hudson.model.Hudson.<init>(Hudson.java:85)
    at hudson.model.Hudson.<init>(Hudson.java:81)
    at hudson.WebAppMain$3.run(WebAppMain.java:295)
Caused: hudson.util.HudsonFailedToLoad
    at hudson.WebAppMain$3.run(WebAppMain.java:312)
2021-02-10 19:33:15.393+0000 [id=20]    INFO    jenkins.model.Jenkins#cleanUp: Stopping Jenkins
2021-02-10 19:33:15.599+0000 [id=20]    INFO    jenkins.model.Jenkins$18#onAttained: Started termination
2021-02-10 19:33:15.754+0000 [id=20]    INFO    jenkins.model.Jenkins$18#onAttained: Completed termination
2021-02-10 19:33:15.756+0000 [id=20]    INFO    jenkins.model.Jenkins#_cleanUpDisconnectComputers: Starting node disconnection
2021-02-10 19:33:15.797+0000 [id=20]    INFO    jenkins.model.Jenkins#_cleanUpShutdownPluginManager: Stopping plugin manager
2021-02-10 19:33:15.836+0000 [id=20]    INFO    jenkins.model.Jenkins#_cleanUpPersistQueue: Persisting build queue
2021-02-10 19:33:16.106+0000 [id=20]    INFO    jenkins.model.Jenkins#_cleanUpAwaitDisconnects: Waiting for node disconnection completion
2021-02-10 19:33:16.106+0000 [id=20]    INFO    jenkins.model.Jenkins#cleanUp: Jenkins stopped
2021-02-10 19:34:35.337+0000 [id=22]    INFO    winstone.Logger#logInternal: JVM is terminating. Shutting down Jetty

What you expected to happen:

jenkins works.

How to reproduce it (as minimally and precisely as possible):

I followed this tutorial. only applied two things modified.

Anything else we need to know:

Overrides for generated resource names

See templates/_helpers.tpl

nameOverride:

fullnameOverride:

namespaceOverride:

For FQDN resolving of the controller service. Change this value to match your existing configuration.

ref: https://github.com/kubernetes/dns/blob/master/docs/specification.md

clusterZone: "cluster.local"

renderHelmLabels: true

controller:

Used for label app.kubernetes.io/component

componentName: "jenkins-controller" image: "jenkins/jenkins" tag: "2.263.3" imagePullPolicy: "Always" imagePullSecretName:

Optionally configure lifetime for controller-container

lifecycle:

postStart:

exec:

command:

- "uname"

- "-a"

disableRememberMe: false numExecutors: 0

configures the executor mode of the Jenkins node. Possible values are: NORMAL or EXCLUSIVE

executorMode: "NORMAL"

This is ignored if enableRawHtmlMarkupFormatter is true

markupFormatter: plainText customJenkinsLabels: []

The default configuration uses this secret to configure an admin user

If you don't need that user or use a different security realm then you can disable it

adminSecret: true

hostNetworking: false

When enabling LDAP or another non-Jenkins identity source, the built-in admin account will no longer exist.

If you disable the non-Jenkins identity store and instead use the Jenkins internal one,

you should revert controller.adminUser to your preferred admin user:

adminUser: "admin"

adminPassword:

admin: existingSecret: "" userKey: jenkins-admin-user passwordKey: jenkins-admin-password

This values should not be changed unless you use your custom image of jenkins or any devired from. If you want to use

Cloudbees Jenkins Distribution docker, you should set jenkinsHome: "/var/cloudbees-jenkins-distribution"

jenkinsHome: "/var/jenkins_home"

This values should not be changed unless you use your custom image of jenkins or any devired from. If you want to use

Cloudbees Jenkins Distribution docker, you should set jenkinsRef: "/usr/share/cloudbees-jenkins-distribution/ref"

jenkinsRef: "/usr/share/jenkins/ref"

Path to the jenkins war file which is used by jenkins-plugin-cli.

jenkinsWar: "/usr/share/jenkins/jenkins.war" resources: requests: cpu: "50m" memory: "256Mi" limits: cpu: "2000m" memory: "4096Mi"

Environment variables that get added to the init container (useful for e.g. http_proxy)

initContainerEnv:

- name: http_proxy

value: "http://192.168.64.1:3128"

containerEnv:

- name: http_proxy

value: "http://192.168.64.1:3128"

Set min/max heap here if needed with:

javaOpts: "-Xms512m -Xmx512m"

jenkinsOpts: ""

jenkinsUrl: ""

If you set this prefix and use ingress controller then you might want to set the ingress path below

jenkinsUriPrefix: "/jenkins"

Enable pod security context (must be true if podSecurityContextOverride, runAsUser or fsGroup are set)

usePodSecurityContext: true

Note that runAsUser, fsGroup, and securityContextCapabilities are

being deprecated and replaced by podSecurityContextOverride.

Set runAsUser to 1000 to let Jenkins run as non-root user 'jenkins' which exists in 'jenkins/jenkins' docker image.

When setting runAsUser to a different value than 0 also set fsGroup to the same value:

runAsUser: 1000 fsGroup: 1000

If you have PodSecurityPolicies that require dropping of capabilities as suggested by CIS K8s benchmark, put them here

securityContextCapabilities: {}

drop:

- NET_RAW

Completely overwrites the contents of the securityContext, ignoring the

values provided for the deprecated fields: runAsUser, fsGroup, and

securityContextCapabilities. In the case of mounting an ext4 filesystem,

it might be desirable to use supplementalGroups instead of fsGroup in

the securityContext block: https://github.com/kubernetes/kubernetes/issues/67014#issuecomment-589915496

podSecurityContextOverride:

runAsUser: 1000

runAsNonRoot: true

supplementalGroups: [1000]

capabilities: {}

servicePort: 8080 targetPort: 8080

For minikube, set this to NodePort, elsewhere use LoadBalancer

Use ClusterIP if your setup includes ingress controller

serviceType: "NodePort"

Jenkins controller service annotations

serviceAnnotations: {}

Jenkins controller custom labels

statefulSetLabels: {}

foo: bar

bar: foo

Jenkins controller service labels

serviceLabels: {}

service.beta.kubernetes.io/aws-load-balancer-backend-protocol: https

Put labels on Jenkins controller pod

podLabels: {}

Used to create Ingress record (should used with ServiceType: ClusterIP)

nodePort: 32000 # <to set explicitly, choose port between 30000-32767

Enable Kubernetes Liveness and Readiness Probes

if Startup Probe is supported, enable it too

~ 2 minutes to allow Jenkins to restart when upgrading plugins. Set ReadinessTimeout to be shorter than LivenessTimeout.

healthProbes: true probes: startupProbe: httpGet: path: '{{ default "" .Values.controller.jenkinsUriPrefix }}/login' port: http periodSeconds: 10 timeoutSeconds: 5 failureThreshold: 12 livenessProbe: failureThreshold: 5 httpGet: path: '{{ default "" .Values.controller.jenkinsUriPrefix }}/login' port: http periodSeconds: 10 timeoutSeconds: 5 readinessProbe: failureThreshold: 3 httpGet: path: '{{ default "" .Values.controller.jenkinsUriPrefix }}/login' port: http periodSeconds: 10 timeoutSeconds: 5 agentListenerPort: 50000 agentListenerHostPort: disabledAgentProtocols:

agent: enabled: true defaultsProviderTemplate: ""

URL for connecting to the Jenkins contoller

jenkinsUrl:

connect to the specified host and port, instead of connecting directly to the Jenkins controller

jenkinsTunnel: kubernetesConnectTimeout: 5 kubernetesReadTimeout: 15 maxRequestsPerHostStr: "32" namespace: image: "jenkins/inbound-agent" tag: "4.6-1" workingDir: "/home/jenkins" customJenkinsLabels: []

name of the secret to be used for image pulling

imagePullSecretName: componentName: "jenkins-agent" websocket: false privileged: false runAsUser: runAsGroup: resources: requests: cpu: "512m" memory: "512Mi" limits: cpu: "512m" memory: "512Mi"

You may want to change this to true while testing a new image

alwaysPullImage: false

Controls how agent pods are retained after the Jenkins build completes

Possible values: Always, Never, OnFailure

podRetention: "Never"

You can define the volumes that you want to mount for this container

Allowed types are: ConfigMap, EmptyDir, HostPath, Nfs, PVC, 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

volumes: []

- type: ConfigMap

configMapName: myconfigmap

mountPath: /var/myapp/myconfigmap

- type: EmptyDir

mountPath: /var/myapp/myemptydir

memory: false

- type: HostPath

hostPath: /var/lib/containers

mountPath: /var/myapp/myhostpath

- type: Nfs

mountPath: /var/myapp/mynfs

readOnly: false

serverAddress: "192.0.2.0"

serverPath: /var/lib/containers

- type: PVC

claimName: mypvc

mountPath: /var/myapp/mypvc

readOnly: false

- type: Secret

defaultMode: "600"

mountPath: /var/myapp/mysecret

secretName: mysecret

Pod-wide environment, these vars are visible to any container in the agent pod

You can define the workspaceVolume that you want to mount for this container

Allowed types are: DynamicPVC, EmptyDir, HostPath, Nfs, PVC

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/workspace

workspaceVolume: {}

- type: DynamicPVC

configMapName: myconfigmap

- type: EmptyDir

memory: false

- type: HostPath

hostPath: /var/lib/containers

- type: Nfs

readOnly: false

serverAddress: "192.0.2.0"

serverPath: /var/lib/containers

- type: PVC

claimName: mypvc

readOnly: false

Pod-wide environment, these vars are visible to any container in the agent pod

envVars: []

- name: PATH

value: /usr/local/bin

nodeSelector: {}

Key Value selectors. Ex:

jenkins-agent: v1

Executed command when side container gets started

command: args: "${computer.jnlpmac} ${computer.name}"

Side container name

sideContainerName: "jnlp"

Doesn't allocate pseudo TTY by default

TTYEnabled: false

Max number of spawned agent

containerCap: 10

Pod name

podName: "default"

Allows the Pod to remain active for reuse until the configured number of

minutes has passed since the last step was executed on it.

idleMinutes: 0

Raw yaml template for the Pod. For example this allows usage of toleration for agent pods.

https://github.com/jenkinsci/kubernetes-plugin#using-yaml-to-define-pod-templates

https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/

yamlTemplate: ""

yamlTemplate: |-

apiVersion: v1

kind: Pod

spec:

tolerations:

- key: "key"

operator: "Equal"

value: "value"

Defines how the raw yaml field gets merged with yaml definitions from inherited pod templates: merge or override

yamlMergeStrategy: "override"

Timeout in seconds for an agent to be online

connectTimeout: 100

Annotations to apply to the pod.

annotations: {}

Below is the implementation of custom pod templates for the default configured kubernetes cloud.

Add a key under podTemplates for each pod template. Each key (prior to | character) is just a label, and can be any value.

Keys are only used to give the pod template a meaningful name. The only restriction is they may only contain RFC 1123 \ DNS label

characters: lowercase letters, numbers, and hyphens. Each pod template can contain multiple containers.

For this pod templates configuration to be loaded the following values must be set:

controller.JCasC.defaultConfig: true

Best reference is https:///configuration-as-code/reference#Cloud-kubernetes. The example below creates a python pod template.

podTemplates: {}

python: |

- name: python

label: jenkins-python

serviceAccount: jenkins

containers:

- name: python

image: python:3

command: "/bin/sh -c"

args: "cat"

ttyEnabled: true

privileged: true

resourceRequestCpu: "400m"

resourceRequestMemory: "512Mi"

resourceLimitCpu: "1"

resourceLimitMemory: "1024Mi"

Here you can add additional agents

They inherit all values from agent so you only need to specify values which differ

additionalAgents: {}

maven:

podName: maven

customJenkinsLabels: maven

An example of overriding the jnlp container

sideContainerName: jnlp

image: jenkins/jnlp-agent-maven

tag: latest

python:

podName: python

customJenkinsLabels: python

sideContainerName: python

image: python

tag: "3"

command: "/bin/sh -c"

args: "cat"

TTYEnabled: true

persistence: enabled: true

A manually managed Persistent Volume and Claim

Requires persistence.enabled: true

If defined, PVC must be created manually before volume will be bound

existingClaim:

jenkins data Persistent Volume Storage Class

If defined, storageClassName:

If set to "-", storageClassName: "", which disables dynamic provisioning

If undefined (the default) or set to null, no storageClassName spec is

set, choosing the default provisioner. (gp2 on AWS, standard on

GKE, AWS & OpenStack)

storageClass: jenkins-pv annotations: {} accessMode: "ReadWriteOnce" size: "8Gi" volumes:

- name: nothing

emptyDir: {}

mounts:

- mountPath: /var/nothing

name: nothing

readOnly: true

networkPolicy:

Enable creation of NetworkPolicy resources.

enabled: false

For Kubernetes v1.4, v1.5 and v1.6, use 'extensions/v1beta1'

For Kubernetes v1.7, use 'networking.k8s.io/v1'

apiVersion: networking.k8s.io/v1

You can allow agents to connect from both within the cluster (from within specific/all namespaces) AND/OR from a given external IP range

internalAgents: allowed: true podLabels: {} namespaceLabels: {}

project: myproject

externalAgents: {}

ipCIDR: 172.17.0.0/16

except:

- 172.17.1.0/24

Install Default RBAC roles and bindings

rbac: create: true readSecrets: false

serviceAccount: create: false

The name of the service account is autogenerated by default

name: jenkins annotations: {}

serviceAccountAgent:

Specifies whether a ServiceAccount should be created

create: false

The name of the ServiceAccount to use.

If not set and create is true, a name is generated using the fullname template

name: annotations: {}

Backup cronjob configuration

Ref: https://github.com/maorfr/kube-tasks

backup:

Backup must use RBAC

So by enabling backup you are enabling RBAC specific for backup

enabled: false

Used for label app.kubernetes.io/component

componentName: "backup"

Schedule to run jobs. Must be in cron time format

Ref: https://crontab.guru/

schedule: "0 2 *" labels: {} annotations: {}

Example for authorization to AWS S3 using kube2iam or IRSA

# Can also be done using environment variables
# iam.amazonaws.com/role: "jenkins"
# "eks.amazonaws.com/role-arn": "arn:aws:iam::123456789012:role/jenkins-backup"

Set this to terminate the job that is running/failing continously and set the job status to "Failed"

activeDeadlineSeconds: "" image: repository: "maorfr/kube-tasks" tag: "0.2.0"

Additional arguments for kube-tasks

Ref: https://github.com/maorfr/kube-tasks#simple-backup

extraArgs: []

Add existingSecret for AWS credentials

existingSecret: {}

Example for using an existing secret

jenkinsaws:

Use this key for AWS access key ID

 # awsaccesskey: jenkins_aws_access_key

Use this key for AWS secret access key

 # awssecretkey: jenkins_aws_secret_key

Add additional environment variables

jenkinsgcp:

Use this key for GCP credentials

 # gcpcredentials: credentials.json

env: []

Example environment variable required for AWS credentials chain

- name: "AWS_REGION"

value: "us-east-1"

resources: requests: memory: 1Gi cpu: 1 limits: memory: 1Gi cpu: 1

Destination to store the backup artifacts

Supported cloud storage services: AWS S3, Minio S3, Azure Blob Storage, Google Cloud Storage

Additional support can added. Visit this repository for details

Ref: https://github.com/maorfr/skbn

destination: "s3://jenkins-data/backup"

By enabling only the jenkins_home/jobs folder gets backed up, not the whole jenkins instance

onlyJobs: false

Enable backup pod security context (must be true if runAsUser or fsGroup are set)

usePodSecurityContext: true

When setting runAsUser to a different value than 0 also set fsGroup to the same value:

runAsUser: 1000 fsGroup: 1000 securityContextCapabilities: {}

drop:

- NET_RAW

checkDeprecation: true

jayfo commented 3 years ago

Ran into this same issue, the cause is this line:

java.io.IOException: Failed to load: Credentials Plugin (2.3.15)
 - Update required: Configuration as Code Plugin (1.46) to be updated to 1.47 or higher

Workaround was to override default plugins via controller.installPlugins, updating the version:

controller:
  # Override the default plugins so we can control versions
  installPlugins:
    - kubernetes:1.27.6
    - workflow-aggregator:2.6
    - git:4.5.2
    - configuration-as-code:1.47
cybaj commented 3 years ago

@jayfo Thank you very much!

Can I ask you something?

after pod works fine, I get IP like below as tutorial said.

$ export NODE_PORT=$(kubectl get --namespace jenkins -o jsonpath="{.spec.ports[0].nodePort}" services jenkins)  && export NODE_IP=$(kubectl get nodes --namespace jenkins -o jsonpath="{.items[0].status.addresses[0].address}") && echo http://$NODE_IP:$NODE_PORT/login
http://192.168.65.3:32000/login

I don't know how the interface 192.168.65.3 could be made. I couldn't enter that URL. I had to use below method, and localhost:8080.

kubectl -n jenkins port-forward jenkins-0 8080:8080 -n jenkins

Is that any way to enter the jenkins web ui by http://192.168.65.3:32000/login?

starkca90 commented 3 years ago

@cybaj, the Service is being deployed as a ClusterIP which should only be reachable inside your Kubernetes cluster.

The "dirty" way to reach it without port forwarding is set the serviceType to NodeIP which would make it that you access it with the IP of the node the pod is running on.

A better approach would be to set it to LoadBalancer, but the availability of that depends on the type of Kubernetes cluster you are using. If you are using one from a cloud provider (Google, Azure, AWS, DigitalOcean...) they will have documentation on setting up a LoadBalancer Server. If you are using a "bare metal" deployment, you could use something like MetalLB.

The best approach would be Ingress, but that comes with it's own complexities...

So, for a lab environment, assuming you have only one node in your Kubernetes cluster, you could likely get away with NodeIP. If this will be a production environment, I would seriously consider getting to Ingress.

cybaj commented 3 years ago

@starkca90 Ah, I see. So The IP 192.168.65.3 is of ClusterIP which is only reachable inside the cluster. As you say, I must try NodeIP in lab environment, and Ingress too. Thank you for your such kindness.

abdennour commented 3 years ago

after deciding to not use only LTS ( e.g. 2.263.4), i hit the wall of plugins. Finally, i was forced to use the latest whether is it stable or not.. i am now using 2.278