Skip to content

Commit

Permalink
WIP: reacting to shovals restructure request
Browse files Browse the repository at this point in the history
Signed-off-by: Miguel Duarte Barroso <[email protected]>
  • Loading branch information
maiqueb committed Aug 30, 2023
1 parent 8cdcee6 commit 1aeff1c
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions enhancements/network/persistent-ips-sdn-secondary-networks.md
Original file line number Diff line number Diff line change
Expand Up @@ -417,9 +417,17 @@ will end up in a situation where the IP would be returned to the pool earlier
than it should, which would lead to the same IP in two workloads at the same
time: one of them shutting down, the other already readily processing traffic.

The garbage collection mechanism will behave differently depending on the
#### KubeVirt finalizers

The VM has a finalizer that prevents it from being deleted while the Virtual
Machine Instance (VMI, represents a running VM) is around; the VMI - in turn -
has a finalizer that prevents it from being deleted until the pod where the VM
runs is deleted.

Different
[DeletionPropagation](https://github.com/kubernetes/apimachinery/blob/3e2600dc79feea6cdc8a9224bc8a6a7fcfee1466/pkg/apis/meta/v1/types.go#L526)
configured by the user on the `DeleteOptions` provided when deleting the VM.
values will impact how Kubernetes will garbage collect the `PersistentIP`s when
deleting the VM object from the datastore.

#### Deleting the VM with background `DeletionPropagation`

Expand Down Expand Up @@ -452,12 +460,10 @@ sequenceDiagram
persistentIP-->>GC: persistentIP Deleted
```

The VM has a finalizer that prevents it from being deleted while the Virtual
Machine Instance (VMI, represents a running VM) is around; the VMI - in turn -
has a finalizer that prevents it from being deleted until the pod where the VM
runs is deleted. These two ensure the VM object is only removed from the
datastore after the VM has actually stopped. Thus, in this scenario, we have
avoided the potential issue described above.
The two finalizers mentioned above ensure the VM object is only removed from
the datastore after the VM has actually stopped. Since the `PersistentIP`
allocation is only removed **after** the VM is gone, we have avoided the
potential issue previously described.

#### Deleting the VM with foreground `DeletionPropagation`

Expand Down

0 comments on commit 1aeff1c

Please sign in to comment.