1

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
  • 12,615
  • 22
  • 104
  • 231
  • 1
    Things that _run_ java to accomplish a task, like IDEs and databases and Tomcat, sometimes use `JAVA_OPTS` to set options to pass _to_ java on commandline, but java itself (run directly) does not use this envvar; in addition to commandline it uses (reads and parses) `JDK_JAVA_OPTIONS` since j9 (documented) and `_JAVA_OPTIONS JAVA_TOOL_OPTIONS` (undocumented). See https://stackoverflow.com/questions/28327620/difference-between-java-options-java-tool-options-and-java-opts – dave_thompson_085 Aug 13 '20 at 11:46

1 Answers1

0

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
  • 357
  • 1
  • 5