summaryrefslogtreecommitdiffstats
path: root/src/dcm/pkg/module/cluster.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/dcm/pkg/module/cluster.go')
-rw-r--r--src/dcm/pkg/module/cluster.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/dcm/pkg/module/cluster.go b/src/dcm/pkg/module/cluster.go
index 253b37a3..33de7acf 100644
--- a/src/dcm/pkg/module/cluster.go
+++ b/src/dcm/pkg/module/cluster.go
@@ -315,6 +315,10 @@ func (v *ClusterClient) GetClusterConfig(project, logicalCloud, clusterReference
return "", pkgerrors.Wrap(err, "An error occurred while parsing the cluster status.")
}
+ if len(rbstatus.CsrStatuses) == 0 {
+ return "", pkgerrors.New("The certificate for this cluster hasn't been issued yet. Please try later.")
+ }
+
// validate that we indeed obtained a certificate before persisting it in the database:
approved := false
for _, c := range rbstatus.CsrStatuses[0].Status.Conditions {