Skip to content

Commit

Permalink
Enable the required kubevirt features
Browse files Browse the repository at this point in the history
Signed-off-by: Pramodh Pallapothu <[email protected]>
  • Loading branch information
Pramodh Pallapothu authored and eriknordmark committed Dec 13, 2023
1 parent d00af13 commit 0e53bd4
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/kube/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ COPY cluster-init.sh /usr/bin/
COPY cgconfig.conf /etc
# kubevirt yaml files are patched files and will be removed later, look at cluster-init.sh
COPY kubevirt-operator.yaml /etc
COPY kubevirt-features.yaml /etc
RUN mkdir -p /etc/containerd
COPY config-k3s.toml /etc/containerd/
RUN mkdir -p /etc/rancher/k3s
Expand Down
3 changes: 3 additions & 0 deletions pkg/kube/cluster-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,9 @@ if [ ! -f /var/lib/all_components_initialized ]; then
logmsg "Installing CDI version $CDI_VERSION"
kubectl create -f https://github.com/kubevirt/containerized-data-importer/releases/download/$CDI_VERSION/cdi-operator.yaml
kubectl create -f https://github.com/kubevirt/containerized-data-importer/releases/download/$CDI_VERSION/cdi-cr.yaml
#Add kubevirt feature gates
kubectl apply -f /etc/kubevirt-features.yaml

touch /var/lib/kubevirt_initialized
fi

Expand Down
17 changes: 17 additions & 0 deletions pkg/kube/kubevirt-features.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: kubevirt.io/v1
kind: KubeVirt
metadata:
name: kubevirt
namespace: kubevirt
spec:
configuration:
permittedHostDevices:
pciHostDevices: # <- PCIe passthrough devices like nvme drives
mediatedDevices: # <- GPUs
developerConfiguration:
featureGates:
- LiveMigration
- HostDisk
- Snapshot
- HostDevices
- GPU

0 comments on commit 0e53bd4

Please sign in to comment.