lens icon indicating copy to clipboard operation
lens copied to clipboard

Pod secrets does not get updated, until you visit secrets tab

Open yod527 opened this issue 1 year ago • 3 comments

Describe the bug When you viewing a pod information, pod's secret content may not update until you visit a secret tab. However, in reality contents of a pod secret is updated, so lens is viewing incorrect info. To Reproduce Steps to reproduce the behavior:

  1. Go to Workloads/Pods
  2. Sort pods by specific namespace
  3. Click on any pod name, so pod information screen appears from the right
  4. Scroll down to environment vars
  5. Show value of environment variable which is mounted as k8s secret (click eye button)
  6. See the secret value

*** Outside lens **

  1. Update or Recreate corresponding secret with new secret value in k8s
  2. Restart or Recreate corresponding pod in k8s

*** Back to Lens **

  1. Click on freshly-created pod name, so pod information screen appears from the right
  2. Scroll down to environment vars
  3. Show value of environment variable which is mounted as k8s secret, which we have updated in previous step (click eye button)
  4. You will see the old secret content, which is false.

*** Workarounds ***

  • Restart the entire lens app so it will fetch updated secret value
  • Navigate to Config/Secrets, and show the contents of freshly-updated secret

After doing any of those, Lens started to show updated secret value, in case of returning to a pos

Expected behavior

  1. Go to Workloads/Pods
  2. Sort pods by specific namespace
  3. Click on any pod name, so pod information screen appears from the right
  4. Scroll down to environment vars
  5. Show value of environment variable which is mounted as k8s secret (click eye button)
  6. See the secret value

*** Outside lens **

  1. Update or Recreate corresponding secret with new secret value in k8s
  2. Restart or Recreate corresponding pod in k8s

*** Back to Lens **

  1. Click on freshly-created pod name, so pod information screen appears from the right
  2. Scroll down to environment vars
  3. Show value of environment variable which is mounted as k8s secret, which we have updated in previous step (click eye button)
  4. The secret value is updated, and showing same value which you have entered in a previous step.

Screenshots If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • Lens Version: 2023.5.310801-latest
  • OS: MacOS
  • Installation method (e.g. snap or AppImage in Linux): dmg

Logs: When you run the application executable from command line you will see some logging output. Please paste them here:

Your logs go here...

Kubeconfig: Quite often the problems are caused by malformed kubeconfig which the application tries to load. Please share your kubeconfig, remember to remove any secret and sensitive information.

your kubeconfig here

Additional context In my case - I'm using EKS with csi-secrets-store csi driver + secrets-provider-aws-secrets-store-csi-driver to mount secrets value to pod's env variables, (as k8s secrets), but I don't think it makes much difference.

yod527 avatar Jun 09 '23 09:06 yod527

I have the same issue... Really confusing sometimes.

Would be awesome if you can fix it :)

antonengelhardt avatar Feb 05 '24 08:02 antonengelhardt

still present

alekc avatar Apr 04 '24 19:04 alekc

STILL AN EXISTING ONE

manibk31 avatar Jul 10 '24 16:07 manibk31