Description of problem: `oc get project name --watch` run by cluster-admin should not print all projects first Resource like `oc get pod name --watch` does not have the issue. Version-Release number of selected component (if applicable): v3.11.15 How reproducible: Always Steps to Reproduce: 1. Suppose cluster-admin wants to watch an existing project xxia-proj, run: oc get project xxia-proj --watch Actual results: 1. It prints all projects first Expected results: 1. It needs not print all projects, because I only want to watch one project Additional info: Normal user of multiple projects does not has the issue
You can work around this issue by getting the namespace instead: ``` oc get namespace xxia-proj --watch ```
It appears that when watching events for a single, particular project, as a cluster admin, `watch.Until()` will return events for all other projects in the cluster, despite asking to watch a single, particular project. I will investigate this further, for now I have a patch that handles this case at the command level [2]. 1. https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/get/get.go#L688 2. https://github.com/openshift/origin/pull/21131
Updated Origin PR: https://github.com/openshift/origin/pull/21167
Commit pushed to master at https://github.com/openshift/origin https://github.com/openshift/origin/commit/4528aa09b789710b6efcddb6c2994ce4260763e9 fix projects when watching with selector Bug 1633101 Filters events for projects on membership-change for a user based on a field or label selector provided by a consumer of project events.
Checked in latest 3.11.36, issue still exists. Looks like the code only goes into 4.0? If yes, pls update Target Release and drop bug from above 3.11 advisory. Thanks
Tested 4.0.0-0.47.0, the issue is fixed.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2019:0758