lens icon indicating copy to clipboard operation
lens copied to clipboard

Secrets not visible in navigation

Open erikverheij opened this issue 2 years ago • 1 comments

Describe the bug I have access to all the secrets of several namespaces in our cluster. However, the item "Secrets" is not available under "Config" in the navigation.

After changing my permissions to view all secrets in all namespaces the item becomes visible. Maybe Lens is looking for secrets in the default namespace when determining whether to show the item in the navigation?

image

To Reproduce Steps to reproduce the behavior:

  1. Create a k8s user that has access to all secrets in a specific namespace
  2. Create a secret in this namespace
  3. Verify with kubectl you can list the secrets (kubectl get secret -n your-namespace)
  4. Open or restart Lens
  5. Navigate to "Config"
  6. "Secrets" should be visible, but isn't.

Expected behavior "Secrets" should be available in the Navigation under Config.

Environment:

  • Lens Version: 2022.12.11410-latest
  • OS: Windows 11 Pro
  • Installation method (e.g. snap or AppImage in Linux): .exe file.

Kubeconfig:

apiVersion: v1
clusters:
- cluster:
    certificate-authority-data: xxxxx
    server: xxxxx
  name: xxxxx
contexts:
- context:
    cluster: xxxxx
    user: xxxxx
  name: xxxxx
current-context: xxxxx
kind: Config
preferences: {}
users:
- name: xxxxx
  user:
    exec:
      apiVersion: client.authentication.k8s.io/v1beta1
      args:
      - --region
      - eu-central-1
      - eks
      - get-token
      - --cluster-name
      - xxxxx
      command: aws
      env:
      - name: AWS_PROFILE
        value: xxxxx

erikverheij avatar Dec 12 '22 09:12 erikverheij

The version of Lens Desktop that you are using only checks the first 10 namespaces retrieved from the kube API for showing those values. On master there is a new and improved checker that will resolve this issue for you without having to give yourself undue permissions.

#6657 is the PR that resolves some known issues with the current implementation.

Nokel81 avatar Dec 12 '22 14:12 Nokel81

This has now been fixed

Nokel81 avatar Mar 28 '23 13:03 Nokel81