Helm chart - Setting settings.clusterName forces settings.itemsPerPage to 0 if not set explicitly
What happened?
When deploying the dashboard into a vCluster, where the metrics services aren't available, the dashboard is unable to list any resources.

And when listing Pods:

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
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.
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
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
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.
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/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas 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
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/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas 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
Will be fixed by #8708