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

feat: allow hiding "All namespaces" in namespaces dropdown list #9547

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

avanish23
Copy link

@avanish23 avanish23 commented Oct 17, 2024

Closes #8894
With this PR a new option is enabled in the global setting to hide the all-namespaces option in the namespaces dropdown menu in UI.
Briefly explain why this is required
Hides all namespace fields in the namespace selection dropbox to avoid accidental selection in large clusters and prevent OOM errors.

/kind feature

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Oct 17, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: avanish23
Once this PR has been reviewed and has the lgtm label, please assign shu-mutou for approval. For more information see the Kubernetes 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
Copy link
Contributor

Welcome @avanish23!

It looks like this is your first PR to kubernetes/dashboard 🎉. 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/dashboard 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. 😃

@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Oct 17, 2024
Copy link

codecov bot commented Oct 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 37.10%. Comparing base (b5e9919) to head (6732017).
Report is 8 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9547      +/-   ##
==========================================
+ Coverage   37.09%   37.10%   +0.01%     
==========================================
  Files         283      283              
  Lines       11830    11833       +3     
  Branches      202      201       -1     
==========================================
+ Hits         4388     4391       +3     
  Misses       7167     7167              
  Partials      275      275              

@floreks
Copy link
Member

floreks commented Oct 17, 2024

This feels like a hacky workaround. We are working on introducing a dynamic cache that should greatly improve responsiveness in large clusters. However, storing cached data will probably require greater memory limits.

@avanish23
Copy link
Author

/retest

@k8s-ci-robot
Copy link
Contributor

@avanish23: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

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-sigs/prow repository.

@avanish23 avanish23 changed the title Allow hiding "All namespaces" in namespaces dropdown list feat: allow hiding "All namespaces" in namespaces dropdown list Oct 17, 2024
@avanish23
Copy link
Author

/kind feature

@k8s-ci-robot k8s-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Oct 17, 2024
@avanish23
Copy link
Author

This feels like a hacky workaround. We are working on introducing a dynamic cache that should greatly improve responsiveness in large clusters. However, storing cached data will probably require greater memory limits.

Yes, I agree. This could be treated as a temporary workaround until we have the fix you are talking about.
Do you have any potential issues/concerns this could bring up?

@floreks
Copy link
Member

floreks commented Oct 17, 2024

Ye, I don't like introducing temporary flags that will be deprecated and removed shortly after being introduced. It can be confusing. Also, we are trying to avoid container flags that directly manipulate the UI. It should probably be done in a different way. Possibly via settings.

@avanish23
Copy link
Author

avanish23 commented Oct 17, 2024

Ok, this makes sense to be using setting instead. I think it should be added as part of the global setting.
Let me do it that way.

Update: I have made changes to use the settings instead of the container flags.
@floreks looking for reviews.
Thanks!

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Oct 17, 2024
(cherry picked from commit 534a365efcf56aa7b3592b55e0885d021f97688c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow hiding "All namespaces" in namespaces dropdown list
3 participants