@@ -48,7 +48,7 @@ func (s *Service) Reconcile(ctx context.Context) (ctrl.Result, error) {
48
48
if err != nil {
49
49
s .scope .GCPManagedControlPlane .Status .Initialized = false
50
50
s .scope .GCPManagedControlPlane .Status .Ready = false
51
- conditions .MarkFalse (s .scope .ConditionSetter (), clusterv1 .ReadyCondition , infrav1exp .GKEControlPlaneReconciliationFailedReason , clusterv1 .ConditionSeverityError , err . Error () )
51
+ conditions .MarkFalse (s .scope .ConditionSetter (), clusterv1 .ReadyCondition , infrav1exp .GKEControlPlaneReconciliationFailedReason , clusterv1 .ConditionSeverityError , "describing cluster: %v" , err )
52
52
return ctrl.Result {}, err
53
53
}
54
54
if cluster == nil {
@@ -58,9 +58,9 @@ func (s *Service) Reconcile(ctx context.Context) (ctrl.Result, error) {
58
58
59
59
nodePools , _ , err := s .scope .GetAllNodePools (ctx )
60
60
if err != nil {
61
- conditions .MarkFalse (s .scope .ConditionSetter (), clusterv1 .ReadyCondition , infrav1exp .GKEControlPlaneReconciliationFailedReason , clusterv1 .ConditionSeverityError , err . Error () )
62
- conditions .MarkFalse (s .scope .ConditionSetter (), infrav1exp .GKEControlPlaneReadyCondition , infrav1exp .GKEControlPlaneReconciliationFailedReason , clusterv1 .ConditionSeverityError , err . Error () )
63
- conditions .MarkFalse (s .scope .ConditionSetter (), infrav1exp .GKEControlPlaneCreatingCondition , infrav1exp .GKEControlPlaneReconciliationFailedReason , clusterv1 .ConditionSeverityError , err . Error () )
61
+ conditions .MarkFalse (s .scope .ConditionSetter (), clusterv1 .ReadyCondition , infrav1exp .GKEControlPlaneReconciliationFailedReason , clusterv1 .ConditionSeverityError , "fetching node pools: %v" , err )
62
+ conditions .MarkFalse (s .scope .ConditionSetter (), infrav1exp .GKEControlPlaneReadyCondition , infrav1exp .GKEControlPlaneReconciliationFailedReason , clusterv1 .ConditionSeverityError , "fetching node pools: %v" , err )
63
+ conditions .MarkFalse (s .scope .ConditionSetter (), infrav1exp .GKEControlPlaneCreatingCondition , infrav1exp .GKEControlPlaneReconciliationFailedReason , clusterv1 .ConditionSeverityError , "fetching node pools: %v" , err )
64
64
return ctrl.Result {}, err
65
65
}
66
66
if s .scope .IsAutopilotCluster () {
@@ -83,9 +83,9 @@ func (s *Service) Reconcile(ctx context.Context) (ctrl.Result, error) {
83
83
84
84
if err = s .createCluster (ctx , & log ); err != nil {
85
85
log .Error (err , "failed creating cluster" )
86
- conditions .MarkFalse (s .scope .ConditionSetter (), clusterv1 .ReadyCondition , infrav1exp .GKEControlPlaneReconciliationFailedReason , clusterv1 .ConditionSeverityError , err . Error () )
87
- conditions .MarkFalse (s .scope .ConditionSetter (), infrav1exp .GKEControlPlaneReadyCondition , infrav1exp .GKEControlPlaneReconciliationFailedReason , clusterv1 .ConditionSeverityError , err . Error () )
88
- conditions .MarkFalse (s .scope .ConditionSetter (), infrav1exp .GKEControlPlaneCreatingCondition , infrav1exp .GKEControlPlaneReconciliationFailedReason , clusterv1 .ConditionSeverityError , err . Error () )
86
+ conditions .MarkFalse (s .scope .ConditionSetter (), clusterv1 .ReadyCondition , infrav1exp .GKEControlPlaneReconciliationFailedReason , clusterv1 .ConditionSeverityError , "creating cluster: %v" , err )
87
+ conditions .MarkFalse (s .scope .ConditionSetter (), infrav1exp .GKEControlPlaneReadyCondition , infrav1exp .GKEControlPlaneReconciliationFailedReason , clusterv1 .ConditionSeverityError , "creating cluster: %v" , err )
88
+ conditions .MarkFalse (s .scope .ConditionSetter (), infrav1exp .GKEControlPlaneCreatingCondition , infrav1exp .GKEControlPlaneReconciliationFailedReason , clusterv1 .ConditionSeverityError , "creating cluster: %v" , err )
89
89
return ctrl.Result {}, err
90
90
}
91
91
log .Info ("Cluster created provisioning in progress" )
@@ -212,7 +212,7 @@ func (s *Service) Delete(ctx context.Context) (ctrl.Result, error) {
212
212
}
213
213
214
214
if err = s .deleteCluster (ctx , & log ); err != nil {
215
- conditions .MarkFalse (s .scope .ConditionSetter (), infrav1exp .GKEControlPlaneDeletingCondition , infrav1exp .GKEControlPlaneReconciliationFailedReason , clusterv1 .ConditionSeverityError , err . Error () )
215
+ conditions .MarkFalse (s .scope .ConditionSetter (), infrav1exp .GKEControlPlaneDeletingCondition , infrav1exp .GKEControlPlaneReconciliationFailedReason , clusterv1 .ConditionSeverityError , "deleting cluster: %v" , err )
216
216
return ctrl.Result {}, err
217
217
}
218
218
log .Info ("Cluster deleting in progress" )
0 commit comments