JAVA_OPTS in jenkins k8s deployment, does not seem to take into account -Xss (stack size)

8/13/2020

In my jenkins deployment (for which I am using the official helm chart

        - name: JAVA_OPTS
          value: |
            -Djava.awt.headless=true -Dorg.csanchez.jenkins.plugins.kubernetes.PodTemplate.connectionTimeout=180 -Dhudson.slaves.NodeProvisioner.initialDelay=0 -Xss512k

but when I log in to the pod:

jenkins@jenkins-cd-5f4b845c5d-cd877:/$ java -XX:+PrintFlagsFinal -version | grep ThreadStackSize
     intx CompilerThreadStackSize                   = 0                                   {pd product}
     intx ThreadStackSize                           = 1024                                {pd product}
     intx VMThreadStackSize                         = 1024                                {pd product}

why the -Xss512k has no effect and the ThreadStackSize remains at 1M?

-- pkaramol
java
jenkins
kubernetes

1 Answer

8/13/2020

From Jenkins helm chart documentation Chart

"Additionally, you may want to add env vars for the Jenkins container, and the JVM (master.javaOpts)."

-- Vlad Ulshin
Source: StackOverflow