dashboard icon indicating copy to clipboard operation
dashboard copied to clipboard

Helm chart - Setting settings.clusterName forces settings.itemsPerPage to 0 if not set explicitly

Open mlbiam opened this issue 3 years ago • 4 comments

What happened?

When deploying the dashboard into a vCluster, where the metrics services aren't available, the dashboard is unable to list any resources.
Screen Shot 2022-09-12 at 11 08 43 AM

And when listing Pods:

Screen Shot 2022-09-12 at 11 10 04 AM

In the dashboard Pod's logs -

2022/09/12 15:11:06 [2022-09-12T15:11:06Z] Incoming HTTP/1.1 GET /api/v1/pod/openunison?itemsPerPage=0&page=1&sortBy=d%!C(MISSING)creationTimestamp request from 192.168.2.112: 
2022/09/12 15:11:06 Getting list of all pods in the cluster
2022/09/12 15:11:06 [2022-09-12T15:11:06Z] Outcoming response to 192.168.2.112 with 200 status code
2022/09/12 15:11:06 Internal error occurred: No metric client provided. Skipping metrics.
2022/09/12 15:11:06 Getting pod metrics
2022/09/12 15:11:06 Internal error occurred: No metric client provided. Skipping metrics.
2022/09/12 15:11:06 [2022-09-12T15:11:06Z] Outcoming response to 192.168.2.112 with 200 status code

However, if I try to get pods using the same user:

k get pods -n openunison
NAME                                             READY   STATUS      RESTARTS   AGE
openunison-operator-6cb7444cc6-jhvqj             1/1     Running     0          9d
openunison-orchestra-8dcc5dbd7-44jzl             1/1     Running     0          9d
kube-oidc-proxy-orchestra-68c66857f9-fqcpz       1/1     Running     0          9d
ouhtml-orchestra-login-portal-7fcb97b996-mzbcx   1/1     Running     0          9d
check-certs-orchestra-27712920-2dzb9             0/1     Completed   0          2d13h
check-certs-orchestra-27714360-2bmf2             0/1     Completed   0          37h
check-certs-orchestra-27715800-ghwqk             0/1     Completed   0          13h

The integration with dashboard is via an impersonating reverse proxy.

What did you expect to happen?

pods should be listed

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

probably the easiest way: https://www.tremolosecurity.com/post/vcluster-enterprise-authentication

Anything else we need to know?

The vCluster has no metrics deployed

What browsers are you seeing the problem on?

Chrome, Safari, Firefox

Kubernetes Dashboard version

NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION kubernetes-dashboard kubernetes-dashboard 1 2022-09-02 18:08:46.044357215 +0000 UTC deployed kubernetes-dashboard-5.10.0 2.6.1

Kubernetes version

1.23

Dev environment

No response

mlbiam avatar Sep 12 '22 15:09 mlbiam

The metrics log is basically a warning. Go to settings view and increase items per page number. It looks like it is 0. Possibly you have used some custom way to deploy Dashboard and settings are not available.

floreks avatar Sep 12 '22 16:09 floreks

Go to settings view and increase items per page number.

yep, this fixed it

Possibly you have used some custom way to deploy Dashboard and settings are not available.

no, just using the helm chart:

kubectl create ns kubernetes-dashboard
helm install kubernetes-dashboard kubernetes-dashboard/kubernetes-dashboard --set settings.clusterName=$VCLUSTER_LABEL -n kubernetes-dashboard

mlbiam avatar Sep 12 '22 16:09 mlbiam

Looks like the issue is that if any of the settings options are set, then any that aren't explicitly set are set to 0

mlbiam avatar Sep 12 '22 17:09 mlbiam

Just to say we have also ran into this when we set the

  _global: '{"logsAutoRefreshTimeInterval":10,"resourceAutoRefreshTimeInterval":0}'

those took effect but it set itemsPerPage to 0 causing the mentioned issue. It seems the entire settings block gets dumped if you set any of them.

kiich avatar Sep 27 '22 09:09 kiich

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Feb 05 '23 10:02 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle rotten
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot avatar Mar 07 '23 10:03 k8s-triage-robot

Will be fixed by #8708

floreks avatar Mar 01 '24 11:03 floreks