Fix permissions issue on ServiceDetails under RBAC (#3433)

- Only watch the namespace that the service is in instead of all of them

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton authored and GitHub committed 2021-07-20 07:34:23 +03:00
1 parent 70448159d3
commit c590bccffa
1 file changed
+3
@@ -39,9 +39,12 @@ interface Props extends KubeObjectDetailsProps<Service> {
@observer
export class ServiceDetails extends React.Component<Props> {
componentDidMount() {
const { object: service } = this.props;
disposeOnUnmount(this, [
kubeWatchApi.subscribeStores([endpointStore], {
preload: true,
namespaces: [service.getNs()],
}),
]);
}