mirror of
https://github.com/gravitational/teleport
synced 2024-10-21 09:44:51 +00:00
4da3e820ad
When the number of replicas of a resource is bigger than 1 - i.e. `kube_cluster`, `app`, `db` - `tsh request search` printed all the registered resources instead of ignoring the repeated rows. This PR excludes the repeated resource ids from the table and request command. Before: ``` $ tsh request search --kind kube_cluster Name Hostname Labels Resource ID ---------- -------- ------------------------------------------------------------------ ----------------------------------- local env=tiago /tele.local/kube_cluster/local my-cluster teleport.internal/resource-id=89b78b53-600f-4545-922c-96d20ee15182 /tele.local/kube_cluster/my-cluster my-cluster teleport.internal/resource-id=89b78b53-600f-4545-922c-96d20ee15182 /tele.local/kube_cluster/my-cluster my-cluster teleport.internal/resource-id=89b78b53-600f-4545-922c-96d20ee15182 /tele.local/kube_cluster/my-cluster To request access to these resources, run > tsh request create --resource /tele.local/kube_cluster/local --resource /tele.local/kube_cluster/my-cluster --resource /tele.local/kube_cluster/my-cluster --resource /tele.local/kube_cluster/my-cluster \ --reason <request reason> ``` After: ``` $ tsh request search --kind kube_cluster Name Hostname Labels Resource ID ---------- -------- ------------------------------------------------------------------ ----------------------------------- local env=tiago /tele.local/kube_cluster/local my-cluster teleport.internal/resource-id=89b78b53-600f-4545-922c-96d20ee15182 /tele.local/kube_cluster/my-cluster To request access to these resources, run > tsh request create --resource /tele.local/kube_cluster/local --resource /tele.local/kube_cluster/my-cluster \ --reason <request reason> ``` |
||
---|---|---|
.. | ||
common | ||
main.go |