Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JENKINS-56140] Expire Kubernetes clients after one day #429

Merged
merged 1 commit into from
Feb 18, 2019

Conversation

carlossg
Copy link
Contributor

Make it configurable too

@FilipB
Copy link

FilipB commented Feb 14, 2019

I assume that the default value of org.csanchez.jenkins.plugins.kubernetes.clients.cacheExpiration can be overwritten when the jenkins is started with -Dorg.csanchez.jenkins.plugins.kubernetes.clients.cacheExpiration=numberOfSeconds right?

@carlossg
Copy link
Contributor Author

correct

@carlossg carlossg merged commit 9d595ff into master Feb 18, 2019
@carlossg carlossg deleted the JENKINS-56140 branch February 18, 2019 09:45
@DmitriyStoyanov
Copy link

Thank you for this solution, today found, that on AWS EKS cluster token creates with 14 minutes expiration time and connection created only one time after 15 minutes cannot be used with exception:
io.fabric8.kubernetes.client.KubernetesClientException: Failure executing: GET at: https://xxx.us-east-1.eks.amazonaws.com/api/v1/namespaces/kubernetes-plugin/pods?labelSelector=jenkins%3Dslave. Message: Unauthorized! Token may have expired! Please log-in again. Unauthorized.
fixed by adding -Dorg.csanchez.jenkins.plugins.kubernetes.clients.cacheExpiration=60 in jenkins start parameters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants