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

Credentials get stale when using Kubeconfig file rotating periodically

XMLWordPrintable

      This is related to using kubernetes slaves via the Jenkins Cloud configuration. We use kubeconfig files to authenticate with the API server and we regenerate them daily using a cron job. We successfully update the credentials using groovy code, but the kubernetes-plugin doesn't detect the change and continues to use the old file until it eventually expires. It is behaving like it cached the credential somewhere. Our manual workaround is to go to Manage Jenkins -> Configure System and set the credential to 'none', save, return to Configure system and set it again. If we don't set it to none and just click save or use groovy to do a Jenkins save(), it doesn't reload the credential. This confirms that the credential is correct, but the kubernetes plugin needed some coercion to reload the credential. We would expect the credential change to be detected or the kubernetes plugin should read the file fresh each time it is used.

            Unassigned Unassigned
            jsmilani John Smilanick
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: