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

Error when install dashboard on clean k8s cluster #8955

Closed
SergeSpinoza opened this issue Apr 22, 2024 · 14 comments
Closed

Error when install dashboard on clean k8s cluster #8955

SergeSpinoza opened this issue Apr 22, 2024 · 14 comments
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@SergeSpinoza
Copy link

What happened?

When I try to install dashboard to clean k8s cluster (version 1.27.3) via helm, I have error:

Release "kubernetes-dashboard" does not exist. Installing it now.
Error: template: kubernetes-dashboard/templates/secrets/csrf.yaml:22:6: executing "kubernetes-dashboard/templates/secrets/csrf.yaml" at <include "kubernetes-dashboard.app.csrf.secret.value" .>: error calling include: template: kubernetes-dashboard/templates/_helpers.tpl:83:63: executing "kubernetes-dashboard.app.csrf.secret.value" at <$secret.data>: wrong type for value; expected map[string]interface {}; got interface {}

For install dashboard I use command from https://github.com/kubernetes/dashboard?tab=readme-ov-file#installation:

helm repo add kubernetes-dashboard https://kubernetes.github.io/dashboard/

helm upgrade --install kubernetes-dashboard kubernetes-dashboard/kubernetes-dashboard --create-namespace --namespace kubernetes-dashboard

What did you expect to happen?

The dashboard will install correctly.

How can we reproduce it (as minimally and precisely as possible)?

Try to install dashboard on clean cluster k8s version 1.27.3

Anything else we need to know?

No response

What browsers are you seeing the problem on?

No response

Kubernetes Dashboard version

7.3.2

Kubernetes version

1.27.3

Dev environment

No response

@SergeSpinoza SergeSpinoza added the kind/bug Categorizes issue or PR as related to a bug. label Apr 22, 2024
@SergeSpinoza
Copy link
Author

Version of dashboard 7.1.0 works fine, other new versions (7.2.0 and higher) have the same error.

@floreks
Copy link
Member

floreks commented Apr 22, 2024

Are you doing a clean Dashboard install and using latest helm?

@SergeSpinoza
Copy link
Author

@floreks Yes, right.

@floreks
Copy link
Member

floreks commented Apr 23, 2024

I am not able to reproduce that. The only thing I can think of is that you have some leftover resources in your cluster that conflict with the new csrf secret format. You can try to install Dashboard in a different namespace i.e. dashboard

@MykolaDzhamQC
Copy link

I can reproduce the problem with Helm v3.9. It works well with Helm v3.14.4

@MykolaDzhamQC
Copy link

MykolaDzhamQC commented Apr 25, 2024

This is probably the change that causes the chard to not work with older versions of Helm: https://github.com/kubernetes/dashboard/pull/8882/files#diff-92db08aee8439a4e118fa16cbdeaebdc56a02bea105208db93f365a603645434R78

@floreks
Copy link
Member

floreks commented Apr 25, 2024

Yes, but this is not a bug on our side since only older helm does not work and the new one does.

/close

@k8s-ci-robot
Copy link
Contributor

@floreks: Closing this issue.

In response to this:

Yes, but this is not a bug on our side since only older helm does not work and the new one does.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@MykolaDzhamQC
Copy link

Yes, but this is not a bug on our side since only older helm does not work and the new one does.

Instructions don't mention however that some specific version of helm required. It's not that an older helm doesn't work - it does. It is that this chart uses something, that only works starting some version of helm, but it doesn't mention this anywhere.

@noelashford
Copy link

I also have the same issue and i am using helm 3.14.2-1 , i find it hard to believe this would only work in a slightly higher minor version? Seems like a bug to me as well ... ?

@floreks
Copy link
Member

floreks commented May 9, 2024

The last helm version with this issue is: v3.9.4
The first working version is: v3.10.0-rc.1

Feel free to look into the helm source to figure out what kind of bug was fixed in between those versions that made it work. There is nothing unusual used in the chart. It's just a secret lookup + index.

@MykolaDzhamQC
Copy link

The last helm version with this issue is: v3.9.4 The first working version is: v3.10.0-rc.1

Feel free to look into the helm source to figure out what kind of bug was fixed in between those versions that made it work. There is nothing unusual used in the chart. It's just a secret lookup + index.

Sorry, it's about the same as to say that the latest working version of the chart is 7.1.0 and it is then broken in 7.2.0. Just saying "the problem is not on my side" is counterproductive. If you believe there was a bug in helm that was fixed at specific version then it at least worth to clearly mention in the release that specific version of helm is required - that would at least save time for other people figuring out why it doesn't work for them.

@floreks
Copy link
Member

floreks commented May 10, 2024

Sorry, but that doesn't make sense. We do not have to test our chart against every helm version that was ever released just to see if it works or not and add notes about that to the release. If at the time of updating the chart all of our tests have passed with the helm version we use, then it is considered working on our side. We cannot be responsible for users in the matter of tool versions they use and whether they decide to keep them up to date or not.

For the record, we were not aware of such issues. It is a best practice to keep your tools up-to-date and not use versions that were released ~2 years ago. Helm v3.9.4 was released in August 2022.

@MykolaDzhamQC
Copy link

If you rely on something you have to at least clearly declare that you expect the version to be at least this specific version.
The same as it is usually declared "K8s versions supported: 1.XX, 1.XX-1" etc.
And helm is now critical dependency for you as "As of version 7.0.0, we have dropped support for Manifest-based installation. Only Helm-based installation is supported now."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

5 participants