Skip to content

Commit 4c7dcac

Browse files
committed
Correct status for scaled down deployments.
This change ensures that when persistent agent, scheduled workflow, and api server deployments are scaled down, the owning DSPA displays their status "Available" as "false". Signed-off-by: Humair Khan <[email protected]>
1 parent f0d4527 commit 4c7dcac

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

controllers/dspipeline_controller.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,9 @@ func (r *DSPAReconciler) isDeploymentAvailable(ctx context.Context, dspa *dspav1
127127

128128
err := r.Get(ctx, types.NamespacedName{Name: component, Namespace: dspa.Namespace}, found)
129129
if err == nil {
130+
if found.Spec.Replicas != nil && *found.Spec.Replicas == 0 {
131+
return false
132+
}
130133
for _, s := range found.Status.Conditions {
131134
if s.Type == "Available" && s.Status == corev1.ConditionTrue {
132135
return true

0 commit comments

Comments
 (0)