Combine both daemonset lookup errors (windows retained as secondary)

Co-authored-by: kaovilai <11228024+kaovilai@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-08-25 18:27:05 +00:00
committed by GitHub
co-authored by kaovilai
parent ef5375e3e3
commit da01c1ca95
2 changed files with 31 additions and 3 deletions
+1 -3
View File
@@ -100,9 +100,7 @@ func IsReady(ctx context.Context, namespace string, crClient ctrlclient.Client)
if err := crClient.Get(ctx, ctrlclient.ObjectKey{Namespace: namespace, Name: daemonsetWindows}, dsWindows); err != nil {
dsWindows = nil
if !apierrors.IsNotFound(err) {
if lookupErr == nil {
lookupErr = errors.Wrap(err, "failed to get windows node-agent daemonset")
}
lookupErr = errors.CombineErrors(lookupErr, errors.Wrap(err, "failed to get windows node-agent daemonset"))
}
}