Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions internal/controller/appwrapper/resource_management.go
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,18 @@ func (r *AppWrapperReconciler) createComponent(ctx context.Context, aw *workload
}
// fall through. This is not actually an error. The object already exists and the correct appwrapper owns it.
} else {
// resource not actually created; patch status to reflect that
orig := copyForStatusPatch(aw)
meta.SetStatusCondition(&aw.Status.ComponentStatus[componentIdx].Conditions, metav1.Condition{
Type: string(workloadv1beta2.ResourcesDeployed),
Status: metav1.ConditionFalse,
Reason: "ComponentCreationErrored",
})
if patchErr := r.Status().Patch(ctx, aw, client.MergeFrom(orig)); patchErr != nil {
// ugh. Patch failed, so retry the create so we can get to a consistient state
return patchErr, false
}
// return actual error
return err, meta.IsNoMatchError(err) || apierrors.IsInvalid(err) // fatal
}
}
Expand Down
Loading