Skip to content

Commit f9292b6

Browse files
authored
Deprecate DV garbage collection (#3197)
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 <[email protected]>
1 parent e463ce8 commit f9292b6

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

docs/cluster-configuration.md

-22
Original file line numberDiff line numberDiff line change
@@ -1328,28 +1328,6 @@ metadata:
13281328
}
13291329
]
13301330
```
1331-
##### Disable DataVolume garbage collection
1332-
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:
1333-
```yaml
1334-
metadata:
1335-
annotations:
1336-
containerizeddataimporter.kubevirt.io/jsonpatch: |-
1337-
[
1338-
{
1339-
"op": "add",
1340-
"path": "/spec/config/dataVolumeTTLSeconds",
1341-
"value": -1
1342-
}
1343-
]
1344-
```
1345-
Or from CLI:
1346-
```bash
1347-
$ kubectl annotate --overwrite -n kubevirt-hyperconverged hco kubevirt-hyperconverged \
1348-
containerizeddataimporter.kubevirt.io/jsonpatch='[{"op": "add", \
1349-
"path": "/spec/config/dataVolumeTTLSeconds", \
1350-
"value": -1 }]'
1351-
```
1352-
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.
13531331
##### Modify DataVolume Upload URL
13541332
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:
13551333
```yaml

0 commit comments

Comments
 (0)