Skip to content

Commit f79e9f1

Browse files
authored
don't count components that are being deleted as deployed (#159)
1 parent ec767a9 commit f79e9f1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

internal/controller/appwrapper/appwrapper_controller.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,9 @@ func (r *AppWrapperReconciler) getComponentStatus(ctx context.Context, aw *workl
503503
cs := &aw.Status.ComponentStatus[componentIdx]
504504
obj := &metav1.PartialObjectMetadata{TypeMeta: metav1.TypeMeta{Kind: cs.Kind, APIVersion: cs.APIVersion}}
505505
if err := r.Get(ctx, types.NamespacedName{Name: cs.Name, Namespace: aw.Namespace}, obj); err == nil {
506-
summary.deployed += 1
506+
if obj.DeletionTimestamp.IsZero() {
507+
summary.deployed += 1
508+
}
507509
} else {
508510
if apierrors.IsNotFound(err) {
509511
meta.SetStatusCondition(&aw.Status.ComponentStatus[componentIdx].Conditions, metav1.Condition{

0 commit comments

Comments
 (0)