aboutsummaryrefslogtreecommitdiffstats
path: root/src/k8splugin
diff options
context:
space:
mode:
authorLukasz Rajewski <lukasz.rajewski@orange.com>2021-08-06 16:43:32 +0200
committerLukasz Rajewski <lukasz.rajewski@orange.com>2021-08-06 16:43:32 +0200
commit0a1b40c1042ebdf212c46f67dd62bf13c2eee5aa (patch)
tree89f2eaa38487a81903f399e6b21510d6e77fb710 /src/k8splugin
parentb3fe5915cbd68b62b533af833eebda771dd5d899 (diff)
Optimized status discovery0.9.0
Optimized status discovery Issue-ID: MULTICLOUD-1372 Signed-off-by: Lukasz Rajewski <lukasz.rajewski@orange.com> Change-Id: I854bc88676f4bc3b5f35e8a303d94603ce61a91d
Diffstat (limited to 'src/k8splugin')
-rw-r--r--src/k8splugin/internal/app/instance.go17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/k8splugin/internal/app/instance.go b/src/k8splugin/internal/app/instance.go
index c12b0a68..8c924af3 100644
--- a/src/k8splugin/internal/app/instance.go
+++ b/src/k8splugin/internal/app/instance.go
@@ -306,19 +306,16 @@ Main:
status, err := k8sClient.GetResourceStatus(oneResource, resResp.Namespace)
if err != nil {
cumulatedErrorMsg = append(cumulatedErrorMsg, err.Error())
+ isReady = false
} else {
generalStatus = append(generalStatus, status)
- }
-
- ready, err := v.checkRssStatus(oneResource, k8sClient, resResp.Namespace, status)
+ ready, err := v.checkRssStatus(oneResource, k8sClient, resResp.Namespace, status)
- if !ready || err != nil {
- isReady = false
- if err != nil {
- cumulatedErrorMsg = append(cumulatedErrorMsg, err.Error())
- } else {
- apiVersion, kind := oneResource.GVK.ToAPIVersionAndKind()
- cumulatedErrorMsg = append(cumulatedErrorMsg, kind+"/"+apiVersion+" ("+oneResource.Name+") is not ready")
+ if !ready || err != nil {
+ isReady = false
+ if err != nil {
+ cumulatedErrorMsg = append(cumulatedErrorMsg, err.Error())
+ }
}
}
}