Add example configurations.

This commit is contained in:
Michael Lipp 2023-08-12 18:27:22 +02:00
parent 9e83712c9b
commit 8acd98d703
6 changed files with 107 additions and 21 deletions

View file

@ -0,0 +1,15 @@
# Example setup
The CRD must be deployed independently.
```sh
kubectl apply -f https://github.com/mnlipp/VM-Operator/raw/main/deploy/crds/vms-crd.yaml
```
Apart from that, the `kustomize.yaml` defines a namespace for the manager
(and the VMs managed by it) and patches the repository PVC to create
a small volume using a ceph fs.
The `kustomize.yaml` does not include the test VM. Before creating
the test VM, you will again most likely want to change the
disk definition. The sample file claims a ceph block device.

View file

@ -0,0 +1,21 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- https://github.com/mnlipp/VM-Operator/deploy
namespace: vmop-demo
patches:
- patch: |-
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: vmop-image-repository
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
storageClassName: local-path

View file

@ -0,0 +1,40 @@
apiVersion: "vmoperator.jdrupes.org/v1"
kind: VirtualMachine
metadata:
namespace: vmop-demo
name: test-vm
spec:
image:
# Defaults:
# repository: ghcr.io
# path: mnlipp/org.jdrupes.vmoperator.runner.qemu-arch
# version: latest
pullPolicy: Always
vm:
maximumCpus: 4
currentCpus: 2
maximumRam: "8 GiB"
currentRam: "4 GiB"
networks:
- user: {}
disks:
- volumeClaimTemplate:
metadata:
name: test-vm-system
spec:
storageClassName: rook-ceph-block
resources:
requests:
storage: 40Gi
- cdrom:
# image: ""
image: https://download.fedoraproject.org/pub/fedora/linux/releases/38/Workstation/x86_64/iso/Fedora-Workstation-Live-x86_64-38-1.6.iso
# image: "Fedora-Workstation-Live-x86_64-38-1.6.iso"
display:
spice:
port: 5910