Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-70287

Kubernetes plugin doesn't respect privileged=false in jnlp container if it is defined differently in multiple Pod Templates and inheriting from a parent with privileged=true

XMLWordPrintable

      on the same Kubernetes cloud I've multiple Pod Templates

      • a Template "jnlp", with 1 Container Template "jnlp" having Run in privileged mode = true.
      • a Template "jnlp-child" inheriting from pod template "jnlp", with 2 Containers Templates: 1 having Run in privileged mode = true and 1 having Run in privileged mode = false

      I run a pipeline on label of "jnlp-child"

      I check the containers in K8s: both have privileged mode = true

      It seems the root cause is that the templates are inheriting the privileged mode from the parent, and overriding the flag on the child

      IMHO, a Boolean flag shall not be inherited from parent, since when unchecking it in the child cannot override it if it is checked in the parent

      N.B.: if I set privileged mode = false in the parent, and run the same scenario, I get 1 child container with privileged mode = true and 1 with privileged mode = falseas expected

            mifitous Michael
            mifitous Michael
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: