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

Improve error message for unsupported kubeconfig encoding #2095

Open
omniproc opened this issue Jun 27, 2024 · 0 comments
Open

Improve error message for unsupported kubeconfig encoding #2095

omniproc opened this issue Jun 27, 2024 · 0 comments
Assignees
Labels
backend Issues related to the backend blocker Completely prevents the user from using the software. bug Something isn't working frontend Issues related to the frontend windows Issues related to Windows or WSL

Comments

@omniproc
Copy link

Currently when a kubeconfig file is loaded that has a unsupported encoding, e.g. Windows Powershell's "Out-File" default UTF-16 LE BOM, Headlamp will return the very vague error message "Load a valid kubeconfig".
This makes it hard to understand what's wrong with the file given that the syntax of the file itself will be perfectly fine.

Headlamp should either support different encodings or at very least report back that an encoding error occurred.

Steps to reproduce:

  1. Take a working kubeconfig my-working-kubeconfig.yaml and load it in Headlamp making sure it is accepted as valid kubeconfig
  2. Run the Powershell snippet Get-Content my-working-kubeconfig.yaml -Raw | Out-File my-failing-kubeconfig.yaml
  3. Try to load my-failing-kubeconfig.yaml
@joaquimrocha joaquimrocha added the frontend Issues related to the frontend label Jul 2, 2024
@illume illume added bug Something isn't working backend Issues related to the backend windows Issues related to Windows or WSL blocker Completely prevents the user from using the software. labels Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Issues related to the backend blocker Completely prevents the user from using the software. bug Something isn't working frontend Issues related to the frontend windows Issues related to Windows or WSL
Projects
Development

No branches or pull requests

4 participants