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

Wrong cloud node configuration selected while using inherit from

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Blocker Blocker
    • kubernetes-plugin
    • None
    • jenkins: 2.232.3
      kubernetes: 3580.v78271e5631dc

      Context:

      • Jenkins master is running in Kubernetes cluster and deploy through Helm chart.
      • A node Cloud configuration is added by default (name: `kubernetes`) with a `k8s-agent` pod template.
      • An external Kubernetes is added to node Cloud configuration (name: `specific`) with a `k8s-specific` pod template.

      When running pipelines:

      pipeline {
          agent {
              kubernetes {
                  inheritFrom 'k8s-agent'
              }
          }
          
          stages {
              stage('Main') {
                  steps {
                      echo 'Bonjour'
                  }
              }
          }
      }

      Pod is provisionned on `specific` Kubernetes cluster instead of `kubernetes` one)

          [JENKINS-68606] Wrong cloud node configuration selected while using inherit from

          Logan Mzz added a comment -

          I tried to activate Restrict pipeline support to authorized folders but got ERROR: Not authorized to use Kubernetes cloud: null

          Logan Mzz added a comment - I tried to activate Restrict pipeline support to authorized folders but got ERROR: Not authorized to use Kubernetes cloud: null

          Logan Mzz added a comment -

          Any workaround, except editing all my existing pipeline to specify cloud option ?

          Logan Mzz added a comment - Any workaround, except editing all my existing pipeline to specify cloud option ?

          Logan Mzz added a comment -

          I finally find out how to workaround this.

          Despite documentation says cloud option default to kubernetes it defaults to first one. As I'm using Helm chart + JCasC, I just had to make my additional files arrive (in alphabetical order) after default configuration (jcasc-default-config.yaml).

          Logan Mzz added a comment - I finally find out how to workaround this. Despite documentation says cloud option default to kubernetes it defaults to first one. As I'm using Helm chart + JCasC, I just had to make my additional files arrive (in alphabetical order) after default configuration ( jcasc-default-config.yaml ).

          Please, when you find such inconsistency in the plugin documentation, don't hesitate to send a pull request to help the next ones who might encounter this problem.

          Vincent Latombe added a comment - Please, when you find such inconsistency in the plugin documentation, don't hesitate to send a pull request to help the next ones who might encounter this problem.

          Logan Mzz added a comment -

          vlatombe
          Can you confirm it's a documentation issue and not a behavior one ?

          Logan Mzz added a comment - vlatombe Can you confirm it's a documentation issue and not a behavior one ?

            Unassigned Unassigned
            loganmzz Logan Mzz
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: