lensapp / lens

Lens - The way the world runs Kubernetes
https://k8slens.dev/
MIT License
22.59k stars 1.47k forks source link

Namespace error when upgrading a helm chart #5767

Closed Startouf closed 2 years ago

Startouf commented 2 years ago

Describe the bug I am trying to upgrade a helm chart "cert-manager" that I had added to the namespace "cert-manager" from the UI

I get the following error message

the namespace from the provided object "kube-system" does not match the namespace "cert-manager". You must pass '--namespace=kube-system' to perform this operation.

To Reproduce Steps to reproduce the behavior:

  1. Go to Lens > Helm > Releases
  2. Click on a release, the upgrade
  3. Select a higher version
  4. See error

Expected behavior The helm chart should be upgraded in its namespace

Screenshots

Screenshot 2022-07-01 at 12 01 15

Environment (please complete the following information):

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

N/A

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.

cyrilduchon-doris@Cyril-DD-MacbookPro staging % cat ~/.kube/config
apiVersion: v1
clusters:
- cluster:
    certificate-authority-data: XXX==
    server: https://XXX.yl4.eu-central-1.eks.amazonaws.com
  name: arn:aws:eks:eu-central-1:XXX:cluster/mjg-dev
- cluster:
    certificate-authority-data: XXX==
    server: https://XXX.gr7.eu-central-1.eks.amazonaws.com
  name: arn:aws:eks:eu-central-1:XXX:cluster/mjg-production
contexts:
- context:
    cluster: arn:aws:eks:eu-central-1:XXX:cluster/mjg-dev
    user: arn:aws:eks:eu-central-1:XXX:cluster/mjg-dev
  name: arn:aws:eks:eu-central-1:XXX:cluster/mjg-dev
- context:
    cluster: arn:aws:eks:eu-central-1:113227347315:cluster/mjg-production
    user: arn:aws:eks:eu-central-1:113227347315:cluster/mjg-production
  name: arn:aws:eks:eu-central-1:113227347315:cluster/mjg-production
current-context: arn:aws:eks:eu-central-1:113227347315:cluster/mjg-dev
kind: Config
preferences: {}
users:
- name: arn:aws:eks:eu-central-1:xxx:cluster/mjg-dev
  user:
    exec:
      apiVersion: client.authentication.k8s.io/v1alpha1
      args:
      - --region
      - eu-central-1
      - eks
      - get-token
      - --cluster-name
      - mjg-dev
      command: aws
      env: null
      interactiveMode: IfAvailable
      provideClusterInfo: false
- name: arn:aws:eks:eu-central-1:xxx:cluster/mjg-production
  user:
    exec:
      apiVersion: client.authentication.k8s.io/v1alpha1
      args:
      - --region
      - eu-central-1
      - eks
      - get-token
      - --cluster-name
      - mjg-production
      command: aws
      env: null
      interactiveMode: IfAvailable
      provideClusterInfo: false

Additional context Add any other context about the problem here.

jim-docker commented 2 years ago

5827 may be related

jansav commented 2 years ago

5827 may be related

Not related. I've seen this too when installing charts but doesn't affect the end result there.

jansav commented 2 years ago

Making it "blocker" since I managed to reproduce this issue so that you are not able to open details for release at all. User has no way to fix it if encountered.