containerized-data-importer/doc/datavolume-annotations.md
Edu Gómez Escandell f3d0060353
Update DataVolume doc references from the 'pvc' API to the 'storage' API (#3244)
* Docs: Replace instances of pvc with storage

All instances of DataVolume > Spec > PVC have been replaced with storage,
except for two cases in datavolumes.md:
- Data Volumes>Target Storage/PVC>PVC
    https://github.com/kubevirt/containerized-data-importer/blob/338bafe/doc/datavolumes.md#pvc
- Data Volumes>Source>PVC source
    https://github.com/kubevirt/containerized-data-importer/blob/338bafe/doc/datavolumes.md#pvc-source

Signed-off-by: Edu Gómez Escandell <egomez@redhat.com>

* Docs: Replace `Storage` with `storage` in doc/datavolumes.md

I also reworded it so that the paragraph does not start in lower-case.

Signed-off-by: Edu Gómez Escandell <egomez@redhat.com>

* Docs: Remove optional default 'accessModes: ReadWriteOnce' from docs

Removed from storage options, I still kept it for the pvc.

Signed-off-by: Edu Gómez Escandell <egomez@redhat.com>

* Docs: Remove resources/requests/storage when cloning a PVC

This argument is optional. Only removed for 'storage', not 'pvc'.

Signed-off-by: Edu Gómez Escandell <egomez@redhat.com>

* Replace 'pvc' with 'storage' API in manifests

Signed-off-by: Edu Gómez Escandell <egomez@redhat.com>

* Docs: Moved 'Target Storage/PVC' section above 'Source'

Signed-off-by: Edu Gómez Escandell <egomez@redhat.com>

* Docs: Rephrase the Storage target section to emphasize it over PVC

Signed-off-by: Edu Gómez Escandell <egomez@redhat.com>

* Fix empty field in YAML file

Signed-off-by: Edu Gómez Escandell <egomez@redhat.com>

* Rephrase prose around filesystem volume mode

Signed-off-by: Edu Gómez Escandell <egomez@redhat.com>

* Fix grammar and spelling

Signed-off-by: Edu Gómez Escandell <egomez@redhat.com>

* Write acces mode in upgrade-testing-artifacts manifest

Signed-off-by: Edu Gómez Escandell <egomez@redhat.com>

* Update doc/datavolumes.md

Co-authored-by: Alexander Wels <awels@redhat.com>
Signed-off-by: Edu Gómez Escandell <edu1997xyz@gmail.com>

---------

Signed-off-by: Edu Gómez Escandell <egomez@redhat.com>
Signed-off-by: Edu Gómez Escandell <edu1997xyz@gmail.com>
Co-authored-by: Alexander Wels <awels@redhat.com>
2024-06-07 19:02:12 +02:00

2.2 KiB

Data Volume Annotations

Introduction

CDI allows adding specific annotations to a DV or PVC to be passed to the Transfer Pods and control their behavior. Only specifically allowed annotations are passed, to prevent unexpected behavior due to missing testing coverage.

Multus

Anntoations allows controlling which network will be used by the importer pod:

  • k8s.v1.cni.cncf.io/networks: networkname - pod will get both the default network from the cluster, and the secondary multus network.
  • v1.multus-cni.io/default-network: networkname - pod will get the multus network as its default network.

For example:

apiVersion: cdi.kubevirt.io/v1beta1
kind: DataVolume
metadata:
  name: dv-ann
  annotations:
      v1.multus-cni.io/default-network: bridge-network
spec:
  source:
      http:
         url: "http://mirrors.nav.ro/fedora/linux/releases/33/Cloud/x86_64/images/Fedora-Cloud-Base-33-1.2.x86_64.qcow2"
  storage:
    resources:
      requests:
        storage: 1Gi

Further reference on setting Multus secondary network can be found here.

AspenMesh / istio

  • sidecar.istio.io/inject: "false" - disables sidecar injection to the pod

For example:

apiVersion: cdi.kubevirt.io/v1beta1
kind: DataVolume
metadata:
  name: dv-am
  annotations:
      sidecar.istio.io/inject: "false"
spec:
  source:
      http:
         url: "http://mirrors.nav.ro/fedora/linux/releases/33/Cloud/x86_64/images/Fedora-Cloud-Base-33-1.2.x86_64.qcow2"
  storage:
    resources:
      requests:
        storage: 1Gi

To enable sidecar injection in namespace:

kubectl label namespace default istio-injection=enabled
kubectl get namespace default -L istio-injection

Linkerd Mesh

  • linkerd.io/inject: "false" - disables sidecar injection to the pod

For example:

apiVersion: cdi.kubevirt.io/v1beta1
kind: DataVolume
metadata:
  name: dv-am
  annotations:
      linkerd.io/inject: "false"
spec:
  source:
      http:
         url: "http://mirrors.nav.ro/fedora/linux/releases/33/Cloud/x86_64/images/Fedora-Cloud-Base-33-1.2.x86_64.qcow2"
  storage:
    resources:
      requests:
        storage: 1Gi