tektoncd / dashboard

A dashboard for Tekton!
Apache License 2.0
863 stars 258 forks source link

Add support for configuring default namespace #3334

Closed AlanGreene closed 4 months ago

AlanGreene commented 4 months ago

Changes

Resolves https://github.com/tektoncd/dashboard/issues/3297

When the Dashboard deployment's --default-namespace arg is set, this configures teh default namespace selected when loading the application instead of 'All Namespaces' being selected.

This behaviour will only be triggered when the Dashboard is loaded with no path on the URL, i.e. only for the root (which automatically redirects to the About page).

The reason for this limitation is that handling the default namespace configuration as part of the normal namespace processing would break the ability to select 'All Namespaces' from the namespace filter dropdown, as well as causing issues with URL consistency. It would also be impossible to differentiate between a user attempting to visit a namespaced page (e.g. PipelineRuns) with 'All Namespaces' selected, vs. with no selection which would be expected to use the default namespace instead.

/kind feature

Submitter Checklist

As the author of this PR, please check off the items in this checklist:

Release Notes

Add the ability to configure the default namespace selected in the UI instead of 'All Namespaces' when the user visits the application root (i.e. `/`).
tekton-robot commented 4 months ago

Skipping CI for Draft Pull Request. If you want CI signal for your change, please convert it to an actual PR. You can still manually trigger a test run with /test all

AlanGreene commented 4 months ago

/kind documentation /test all

AlanGreene commented 4 months ago

Some additional testing required to ensure compatibility between this new config option and the existing tenant namespaces behaviour, and no other unexpected side effects.

AlanGreene commented 4 months ago

Thanks Brian, updated those strings πŸ‘

tekton-robot commented 4 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: briangleeson

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

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/tektoncd/dashboard/blob/main/OWNERS)~~ [briangleeson] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment