Commit 5c50ea9
committed
fix: Remove Finalizer from resource if create returns error
The reason marking a resource as managed (putting the finalizer)
before attempting a create is a general practice in kubernetes. The main reason we
do it is to protect against deletion protection.
If we don't put the finalizer, there is no deletion protection against the resource.
The current adoption logic expects the resource to not be managed
(no finalizer) to trigger an adoption.
If the initial creation attempt of a resource fails due to any AWS
error, any subsequent reconciliations attempting to adopt an existing
resource will not succeed.
These changes set the resource as unmanaged if for any reason there is
an error during the create call, which will allow the adoption logic to
run in subsequent reconciliations.1 parent 4d837e7 commit 5c50ea9
1 file changed
+10
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
634 | 634 | | |
635 | 635 | | |
636 | 636 | | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
637 | 647 | | |
638 | 648 | | |
639 | 649 | | |
| |||
0 commit comments