Skip to content

Commit 59f3a13

Browse files
tronghnmortenlj
andcommitted
resolved: abort if target instance has status UpdateFailed
Co-authored-by: Morten Lied Johansen <[email protected]>
1 parent e4cc353 commit 59f3a13

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

internal/pkg/resolved/resolved.go

+4
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,10 @@ func ResolveInstance(ctx context.Context, app *nais_io_v1alpha1.Application, mgr
155155
}
156156

157157
if len(sqlInstance.Status.Conditions) == 0 || sqlInstance.Status.Conditions[0].Reason != "UpToDate" {
158+
if sqlInstance.Status.Conditions[0].Reason == "UpdateFailed" {
159+
return nil, fmt.Errorf("sql instance update has failed: %s", sqlInstance.Status.Conditions[0].Message)
160+
}
161+
158162
time.Sleep(3 * time.Second)
159163
continue
160164
}

0 commit comments

Comments
 (0)