-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
If persistHome is enabled, the token in .kube/config isn't renewed #22924
Comments
@batleforc thanks for reporting. I believe this is a Che-Dashboard issue, as the Dashboard's backend is responsible for injecting the kube config into the workspace pod, however, I believe this injection only happens if the kubeconfig file doesn't exist in the pods filesystem. When persistUserHome is enabled, the kubeconfig file will persist on the PVC and thus will persist. The required fix would probably be to re-create the kubeconfig file on workspace startup if a certain amount of time has passed since the workspace was last started (I'm not sure if we can actually track this). Or, to just always re-inject/overwrite the kubeconfig file on workspace startup. |
If there is no other kubeconfig mounted through a secret/configmap, wouldn't checking if the file matches a possible template checking if the token work and if not update it ? |
That seems like a much better idea than my suggestions, +1 :) |
I forgot to include, but the problem has been reproduced in the latest version of DevSpaces on OpenShift |
Hello, |
@batleforc no update so far, unfortunately. @ibuziuk maybe something for the next sprint for team A? |
Is it possible to check if it's okay for you. I kind of need this fixed :/ |
@batleforc Thank you for submitting a PR for this :) I've pinged members of the team responsible for the Che Dashboard to take a look at your PR. For testing your PR, it's worth checking whether the liveness setup in the IDP can be modified to be less than 12 hours (so that the reviewers don't have to wait as long). |
In the env I tested, the idp liveness was set to 6 / 8 / 12h, don't know how I can help further. |
And i force logout my user too |
@batleforc thanks for the info 🙏🏻 |
@batleforc Thank you for the contribution, the fix should be part of the 7.89.0 - https://twitter.com/eclipse_che/status/1816081779607928954 🎉 |
Describe the bug
Hello,
I have setup two kinds of env, one based on the udi and one that I build. With both image and the persistHome option enabled, I end up with a Kubeconfig with outdated token after 12 hours (the liveness setup in the IDP).
This bug has been found on Kubernetes (K3s,MicroK8s,kubeadm) and will be tested on OpenShift.
Fixed by deleting the /home/user/.kube folder and restarting the workspace
Che version
7.84@latest
Steps to reproduce
kubectl get pod
Expected behavior
Well, i expect my token to be renewed each time i start a WorkSpace
Runtime
Kubernetes (vanilla)
Screenshots
Installation method
chectl/latest, chectl/next
Environment
Windows, Linux
Eclipse Che Logs
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: