headlamp icon indicating copy to clipboard operation
headlamp copied to clipboard

Resolve “Error loading Login” and ShiftedDate frontend error in Headlamp Helm chart (#4033)

Open Manas-Dikshit opened this issue 1 month ago • 6 comments

Fixes #4033 — “Digital Ocean - Error loading Login” Summary This PR addresses both the backend login issue and frontend rendering error reported in issue #4033 when deploying Headlamp via Helm on DigitalOcean Kubernetes (and similar managed clusters).

Root Cause The backend was not correctly configured to use the in-cluster Kubernetes config, leading to: error loading kubeconfig files: error reading kubeconfig file: open : no such file or directory

The frontend was using an older image version that triggered: TypeError: Class constructor ShiftedDate cannot be invoked without 'new'

Fix Implemented Enabled in-cluster mode explicitly:

config: inCluster: true

Added explicit backend arguments and environment variables:

extraArgs:

  • "--in-cluster" extraEnv:
  • name: HEADLAMP_IN_CLUSTER value: "true"

Pinned Headlamp image version to 0.37.0, which resolves the ShiftedDate frontend error. Ensured service account and cluster role binding are properly created for OIDC login.

Files Updated charts/headlamp/values.yaml Testing Deployed updated chart via Helm: helm upgrade --install headlamp ./charts/headlamp -f values.yaml

Verified: Backend successfully loads in-cluster configuration. OIDC login flow completes without “Error loading login”. Frontend loads correctly without ShiftedDate error.

Tested on: DigitalOcean Kubernetes Minikube (local)

Result Headlamp now authenticates properly via OIDC, runs cleanly in-cluster, and the frontend loads without JS exceptions.

Manas-Dikshit avatar Oct 27 '25 18:10 Manas-Dikshit

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Manas-Dikshit Once this PR has been reviewed and has the lgtm label, please assign sniok for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

k8s-ci-robot avatar Oct 27 '25 18:10 k8s-ci-robot

CLA Signed

The committers listed above are authorized under a signed CLA.

  • :white_check_mark: login: Manas-Dikshit / name: Manas Ranjan Dikshit (e9fdb52f07fb35c5722baa323fb39e91c9a6f606)

Welcome @Manas-Dikshit!

It looks like this is your first PR to kubernetes-sigs/headlamp 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/headlamp has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. :smiley:

k8s-ci-robot avatar Oct 27 '25 18:10 k8s-ci-robot

signed @skoeva

Manas-Dikshit avatar Oct 27 '25 21:10 Manas-Dikshit

Hii @Manas-Dikshit most of this code doesn't justify why things are added or removed, can you please provide better commit messages and description for them

ashu8912 avatar Oct 29 '25 05:10 ashu8912

@Manas-Dikshit , can you reply the questions in the previous comments? Also please rebase your PR.

joaquimrocha avatar Nov 21 '25 16:11 joaquimrocha