<p>I'm running Jenkins pod with helm charts and having weird logs when starting jenkins jobs. The requested resources and limits are seems to be in default state - compared to what I set in values.</p>

<pre><code>helm install stable/jenkins --name jenkins -f jenkins.yaml
</code></pre>

<p>And after creating and running random job from UI</p>

<pre><code>Agent jenkins-agent-mql8q is provisioned from template Kubernetes Pod Template
---
apiVersion: "v1"
kind: "Pod"
metadata:
  annotations: {}
  labels:
    jenkins/jenkins-slave: "true"
    jenkins/label: "jenkins-jenkins-slavex"
  name: "jenkins-agent-mql8q"
spec:
  containers:
  - args:
    - "********"
    - "jenkins-agent-mql8q"
    env:
    - name: "JENKINS_SECRET"
      value: "********"
    - name: "JENKINS_TUNNEL"
      value: "jenkins-agent:50000"
    - name: "JENKINS_AGENT_NAME"
      value: "jenkins-agent-mql8q"
    - name: "JENKINS_NAME"
      value: "jenkins-agent-mql8q"
    - name: "JENKINS_AGENT_WORKDIR"
      value: "/home/jenkins/agent"
    - name: "JENKINS_URL"
      value: "http://jenkins:8080/"
    image: "jenkins/jnlp-slave:3.27.1"
    imagePullPolicy: "IfNotPresent"
    name: "jnlp"
    resources:
      limits:
        memory: "2Gi"
        cpu: "2"
      requests:
        memory: "1Gi"
        cpu: "1"
</code></pre>

<p>And my helm values is </p>

<pre><code>master:
(...)
  resources:
    requests:
      cpu: "1"
      memory: "1Gi"
    limits:
      cpu: "3"
      memory: "3Gi"
agent:
  resources:
    requests:
      cpu: "2"
      memory: "2Gi"
    limits:
      cpu: "4"
      memory: "3Gi"
</code></pre>

<p>Any idea why it spawns agents with default 1cpu/1Gi to 2cpu/2Gi</p>

<p>I've reproduced your scenario, I will explain how that works for me.
I'm using GKE with Kubernetes 1.15.3 and HELM 2.16.1.</p>

<p>I've downloaded the helm chart to my local machine, and decompress the file to customize the value.yaml:</p>

<pre><code>$ helm fetch stable/jenkins
$ tar xzvf jenkins-1.9.16.tgz
</code></pre>

<p>In jenkins folder, edit the lines 422-427  from <code>values.yaml</code> file.</p>

<pre><code>agent:
...
    requests:
      cpu: "2"
      memory: "2Gi"
    limits:
      cpu: "4"
      memory: "3Gi"
...
</code></pre>

<p>This will configure the agent container to spawn with the specified resources.</p>

<p>Perform other changes in file if you desire, for this example I'll let with default values.</p>

<p>Install helm chart:</p>

<p><code>helm install jenkins/ -n jenkins</code></p>

<p>After installed, follow the instructions on screen to access the jenkins console.</p>

<p>To verify if the agents will start with configured resources, let's create a new job using a simple shell command.</p>

<p><code>New Item &gt; Freestyle project</code></p>

<p>In Job configuration, select "Execute shell" above the section "Build" in dropdown list. Type any linux command as <code>id</code>, <code>ls</code>, <code>uname -a</code> etc... </p>

<p>Save and trigger <code>Build Now</code> button.</p>

<p>Verify in kubernetes for the new containers, in this case a new agent container is named with <code>default-6w3fq</code></p>

<p>See pod description:</p>

<p><code>kubectl describe pod default-6w3fq</code></p>

<pre><code>Name:         default-6w3fq
...
IP:           
Containers:
  jnlp:
    Image:      jenkins/jnlp-slave:3.27-1
...
    Limits:
      cpu:     4
      memory:  3Gi
    Requests:
      cpu:     2
      memory:  2Gi
...
</code></pre>

<p>You could wait for the job completion and see the job logs instead to use <code>kubectl</code> command.</p>

<p>I've tried to deploy with default values, and upgrade the helm chart with new values values... nothing happened.
That worked when I ran upgrade with <code>--force</code> flag:
<code>helm upgrade jenkins jenkins/ --force</code></p>

<blockquote>
  <p>--force - force resource updates through a replacement strategy</p>
</blockquote>

<p>References:
<a href="https://helm.sh/docs/helm/helm_upgrade/" rel="nofollow noreferrer">https://helm.sh/docs/helm/helm_upgrade/</a>
<a href="https://github.com/helm/charts/tree/master/stable/jenkins" rel="nofollow noreferrer">https://github.com/helm/charts/tree/master/stable/jenkins</a></p>
