Skip to content

Commit

Permalink
fix: correctly remove old finalizers
Browse files Browse the repository at this point in the history
Signed-off-by: Donnie Adams <[email protected]>
  • Loading branch information
thedadams committed Jan 9, 2025
1 parent 012efa7 commit 88d7c84
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/controller/migrations.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ func removeOldFinalizers(req router.Request, _ router.Response) error {
finalizers := req.Object.GetFinalizers()
originalCount := len(finalizers)
for i := 0; i < len(finalizers); i++ {
if strings.HasPrefix("otto.otto8.ai/", finalizers[i]) {
if strings.HasPrefix(finalizers[i], "otto.otto8.ai/") {
finalizers = append(finalizers[:i], finalizers[i+1:]...)
i--
}
Expand Down

0 comments on commit 88d7c84

Please sign in to comment.