Skip to content

Commit

Permalink
Deprecate DV garbage collection (#3197)
Browse files Browse the repository at this point in the history
After several releases with GC disabled by default, we decided to
deprecate it, as unfortunately it violates fundamental principle of
Kubernetes. CR should not be auto-deleted when it completes its role
(Job with TTLSecondsAfterFinished is an exception), and once CR was
created we can assume it is there until explicitly deleted. In addition,
CR should keep idempotency, so the same CR manifest can be applied
multiple times, as long as it is a valid update (e.g. DataVolume
validation webhook does not allow updating the spec).

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>
  • Loading branch information
arnongilboa authored Dec 11, 2024
1 parent e463ce8 commit f9292b6
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions docs/cluster-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -1328,28 +1328,6 @@ metadata:
}
]
```
##### Disable DataVolume garbage collection
To disable [DataVolume garbage collection](https://github.com/kubevirt/containerized-data-importer/blob/main/doc/datavolumes.md#garbage-collection-of-successfully-completed-datavolumes), the following annotation should be added to the HyperConverged CR:
```yaml
metadata:
annotations:
containerizeddataimporter.kubevirt.io/jsonpatch: |-
[
{
"op": "add",
"path": "/spec/config/dataVolumeTTLSeconds",
"value": -1
}
]
```
Or from CLI:
```bash
$ kubectl annotate --overwrite -n kubevirt-hyperconverged hco kubevirt-hyperconverged \
containerizeddataimporter.kubevirt.io/jsonpatch='[{"op": "add", \
"path": "/spec/config/dataVolumeTTLSeconds", \
"value": -1 }]'
```
To enable DataVolume garbage collection put any non-negative value for the `dataVolumeTTLSeconds`, which is the time in seconds after DataVolume completion it can be garbage collected.
##### Modify DataVolume Upload URL
The user wants to override the default URL used when uploading to a DataVolume, by setting the CDI CR's `spec.config.uploadProxyURLOverride` to `myproxy.example.com`. In order to do that, the following annotation should be added to the HyperConverged CR:
```yaml
Expand Down

0 comments on commit f9292b6

Please sign in to comment.