From 425795c7d4e6ce81932918aca2a1462384d4507f Mon Sep 17 00:00:00 2001 From: "Igor D.C" Date: Mon, 31 Aug 2020 22:46:10 +0000 Subject: Introduce Monitor support for CSR resource These changes allow the Monitor to also track CSR (CertificateSigningResource) resources which will make it possible to know when a certificate has been issued by the K8s cluster signer. In turn, DCM will be able to read, store and use that certificate to generate kubeconfigs. Out-of-tree actions required: - publish monitor's docker image built from this source onto emcov2/monitor:latest Issue-ID: MULTICLOUD-1143 Change-Id: I7facd27bbfe08891151bb3b6a9a19948435e24e4 Signed-off-by: Igor D.C --- src/monitor/pkg/controller/resourcebundlestate/helpers.go | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/monitor/pkg/controller/resourcebundlestate/helpers.go') diff --git a/src/monitor/pkg/controller/resourcebundlestate/helpers.go b/src/monitor/pkg/controller/resourcebundlestate/helpers.go index 9a6538b4..4d6be370 100644 --- a/src/monitor/pkg/controller/resourcebundlestate/helpers.go +++ b/src/monitor/pkg/controller/resourcebundlestate/helpers.go @@ -52,3 +52,12 @@ func listResources(cli client.Client, namespace string, return nil } + +// listClusterResources lists non-namespace resources based +// on the selectors provided. +// The data is returned in the pointer to the runtime.Object +// provided as argument. +func listClusterResources(cli client.Client, + labelSelector map[string]string, returnData runtime.Object) error { + return listResources(cli, "", labelSelector, returnData) +} -- cgit 1.2.3-korg