rancher / kubewarden-ui

Kubewarden's User Interface
Apache License 2.0
11 stars 13 forks source link

Policy Reporter Link goes to "local" Cluster even though we selected a downstream cluster #545

Closed Martin-Weiss closed 11 months ago

Martin-Weiss commented 11 months ago

We can only see policy reporter in local cluster - never in downstream cluster when using the rancher UI extension integration of policy reporter.

rke-test is the downstream cluster: (URL: https://rancher.suse/dashboard/c/c-m-x8d85l5v/kubewarden/policy-reporter) grafik

local is the rancher cluster: (URL: https://rancher.suse/dashboard/c/local/kubewarden/policy-reporter) grafik

Steps to reproduce:

Deploy kubewarden in Rancher local cluster and in downstream cluster. Then access the Policy Reporter in local cluster and compare this with accessing the Policy Reporter in downstream cluster -> both are exactly the same so we can alway "only" see the local clusters policy report.

Issue: we see policy reporter results of rancher local cluster

Expectation: we can see the policy server results of the downstream cluster when we select them.

Martin-Weiss commented 11 months ago

On the CLI we can see different report results:

local cluster: grafik

downstream cluster: grafik

Martin-Weiss commented 11 months ago

FYI - this link works to access the downstream: https://rancher.suse/k8s/clusters/c-m-x8d85l5v/api/v1/namespaces/kubewarden/services/http:kubewarden-controller-ui:8080/proxy/#/ - so it really seems the extension renders the link wrong at the moment..

jordojordo commented 11 months ago

This has been fixed with #522 - the proxy URL was not prepending the cluster id and thus pointing to the Local cluster by default.

With 1.3.0-rc2, you can see the correct link when hovering over the "Policy Reporter UI" link at the top right, also note I do not have the Reporter installed on my local cluster: pr