@@ -127,6 +127,9 @@ func (r *DSPAReconciler) isDeploymentAvailable(ctx context.Context, dspa *dspav1
127
127
128
128
err := r .Get (ctx , types.NamespacedName {Name : component , Namespace : dspa .Namespace }, found )
129
129
if err == nil {
130
+ if found .Spec .Replicas != nil && * found .Spec .Replicas == 0 {
131
+ return false
132
+ }
130
133
for _ , s := range found .Status .Conditions {
131
134
if s .Type == "Available" && s .Status == corev1 .ConditionTrue {
132
135
return true
@@ -318,36 +321,37 @@ func (r *DSPAReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.
318
321
func (r * DSPAReconciler ) PublishMetrics (dspa * dspav1alpha1.DataSciencePipelinesApplication ,
319
322
apiServerReady , persistenceAgentReady , scheduledWorkflowReady ,
320
323
crReady metav1.Condition ) {
321
- r .Log .Info ("Publishing Ready Metrics" )
324
+ log := r .Log .WithValues ("namespace" , dspa .Namespace ).WithValues ("dspa_name" , dspa .Name )
325
+ log .Info ("Publishing Ready Metrics" )
322
326
if apiServerReady .Status == metav1 .ConditionTrue {
323
- r . Log .Info ("APIServer Ready" )
327
+ log .Info ("APIServer Ready" )
324
328
APIServerReadyMetric .WithLabelValues (dspa .Name , dspa .Namespace ).Set (1 )
325
329
} else {
326
- r . Log .Info ("APIServer Not Ready" )
330
+ log .Info ("APIServer Not Ready" )
327
331
APIServerReadyMetric .WithLabelValues (dspa .Name , dspa .Namespace ).Set (0 )
328
332
}
329
333
330
334
if persistenceAgentReady .Status == metav1 .ConditionTrue {
331
- r . Log .Info ("PersistanceAgent Ready" )
335
+ log .Info ("PersistanceAgent Ready" )
332
336
PersistenceAgentReadyMetric .WithLabelValues (dspa .Name , dspa .Namespace ).Set (1 )
333
337
} else {
334
- r . Log .Info ("PersistanceAgent Not Ready" )
338
+ log .Info ("PersistanceAgent Not Ready" )
335
339
PersistenceAgentReadyMetric .WithLabelValues (dspa .Name , dspa .Namespace ).Set (0 )
336
340
}
337
341
338
342
if scheduledWorkflowReady .Status == metav1 .ConditionTrue {
339
- r . Log .Info ("ScheduledWorkflow Ready" )
343
+ log .Info ("ScheduledWorkflow Ready" )
340
344
ScheduledWorkflowReadyMetric .WithLabelValues (dspa .Name , dspa .Namespace ).Set (1 )
341
345
} else {
342
- r . Log .Info ("ScheduledWorkflow Not Ready" )
346
+ log .Info ("ScheduledWorkflow Not Ready" )
343
347
ScheduledWorkflowReadyMetric .WithLabelValues (dspa .Name , dspa .Namespace ).Set (0 )
344
348
}
345
349
346
350
if crReady .Status == metav1 .ConditionTrue {
347
- r . Log .Info ("CR Fully Ready" )
351
+ log .Info ("CR Fully Ready" )
348
352
CrReadyMetric .WithLabelValues (dspa .Name , dspa .Namespace ).Set (1 )
349
353
} else {
350
- r . Log .Info ("CR Not Ready" )
354
+ log .Info ("CR Not Ready" )
351
355
CrReadyMetric .WithLabelValues (dspa .Name , dspa .Namespace ).Set (0 )
352
356
}
353
357
}
0 commit comments