From 645c6a331cd00043fcf9f567f5f261a9db070918 Mon Sep 17 00:00:00 2001 From: Eric Multanen Date: Wed, 12 Aug 2020 15:33:12 -0700 Subject: Enhance the status query API This patch enhances the status query API. - The ResourceBundleState CRD is modified to just use the k8s Pod structure instead of a customized struct. - Status queries can either present results showing the rsync status of the composite app and resources or from information received from the cluster via the ResourceBundleState CR - Query parameters are provided to the API call to customize the query and response - Support for querying status of cluster network intents is added Issue-ID: MULTICLOUD-1042 Signed-off-by: Eric Multanen Change-Id: Icca4cdd901e2f2b446414fade256fc24d87594cd --- src/monitor/pkg/controller/resourcebundlestate/pod_controller.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/monitor/pkg/controller/resourcebundlestate/pod_controller.go') diff --git a/src/monitor/pkg/controller/resourcebundlestate/pod_controller.go b/src/monitor/pkg/controller/resourcebundlestate/pod_controller.go index 65a324db..0f7ce47e 100644 --- a/src/monitor/pkg/controller/resourcebundlestate/pod_controller.go +++ b/src/monitor/pkg/controller/resourcebundlestate/pod_controller.go @@ -136,7 +136,7 @@ func (r *podReconciler) deleteFromSingleCR(cr *v1alpha1.ResourceBundleState, nam if rstatus.Name == name { //Delete that status from the array cr.Status.PodStatuses[i] = cr.Status.PodStatuses[length-1] - cr.Status.PodStatuses[length-1] = v1alpha1.PodStatus{} + cr.Status.PodStatuses[length-1] = corev1.Pod{} cr.Status.PodStatuses = cr.Status.PodStatuses[:length-1] return nil } @@ -167,9 +167,9 @@ func (r *podReconciler) updateSingleCR(cr *v1alpha1.ResourceBundleState, pod *co cr.Status.ResourceCount++ // Add it to CR - cr.Status.PodStatuses = append(cr.Status.PodStatuses, v1alpha1.PodStatus{ + cr.Status.PodStatuses = append(cr.Status.PodStatuses, corev1.Pod{ + TypeMeta: pod.TypeMeta, ObjectMeta: pod.ObjectMeta, - Ready: false, Status: pod.Status, }) -- cgit 1.2.3-korg