Add example configurations.
This commit is contained in:
parent
9e83712c9b
commit
8acd98d703
6 changed files with 107 additions and 21 deletions
|
|
@ -1,10 +1,16 @@
|
||||||
# Example setup for development
|
# Example setup
|
||||||
|
|
||||||
The CRD must be deployed independently. Apart from that, the
|
The CRD must be deployed independently.
|
||||||
`kustomize.yaml` defines a namespace for the manager (and the VMs
|
|
||||||
managed by it). You will most likely want to patch the PVC
|
```sh
|
||||||
for the image repository.
|
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 local-path.
|
||||||
|
|
||||||
The `kustomize.yaml` does not include the test VM. Before creating
|
The `kustomize.yaml` does not include the test VM. Before creating
|
||||||
the test VM, you will again most likely want to change the
|
the test VM, you will again most likely want to change the
|
||||||
disk definition.
|
disk definition. The sample file uses a reference to some
|
||||||
|
manually allocated PV.
|
||||||
|
|
|
||||||
|
|
@ -6,16 +6,16 @@ resources:
|
||||||
|
|
||||||
namespace: vmop-demo
|
namespace: vmop-demo
|
||||||
|
|
||||||
# patches:
|
patches:
|
||||||
# - patch: |-
|
- patch: |-
|
||||||
# kind: PersistentVolumeClaim
|
kind: PersistentVolumeClaim
|
||||||
# apiVersion: v1
|
apiVersion: v1
|
||||||
# metadata:
|
metadata:
|
||||||
# name: vmop-image-repository
|
name: vmop-image-repository
|
||||||
# spec:
|
spec:
|
||||||
# accessModes:
|
accessModes:
|
||||||
# - ReadWriteOnce
|
- ReadWriteOnce
|
||||||
# resources:
|
resources:
|
||||||
# requests:
|
requests:
|
||||||
# storage: 10Gi
|
storage: 10Gi
|
||||||
# storageClassName: local-path
|
storageClassName: local-path
|
||||||
|
|
|
||||||
|
|
@ -14,12 +14,12 @@ spec:
|
||||||
|
|
||||||
vm:
|
vm:
|
||||||
maximumCpus: 4
|
maximumCpus: 4
|
||||||
currentCpus: 3
|
currentCpus: 2
|
||||||
maximumRam: "8 GiB"
|
maximumRam: "8 GiB"
|
||||||
currentRam: "4 GiB"
|
currentRam: "4 GiB"
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
- tap: {}
|
- user: {}
|
||||||
|
|
||||||
disks:
|
disks:
|
||||||
- volumeClaimTemplate:
|
- volumeClaimTemplate:
|
||||||
|
|
@ -35,6 +35,10 @@ spec:
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
storage: 40Gi
|
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:
|
display:
|
||||||
spice:
|
spice:
|
||||||
|
|
|
||||||
15
example/rook-ceph/Readme.md
Normal file
15
example/rook-ceph/Readme.md
Normal 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.
|
||||||
21
example/rook-ceph/kustomization.yaml
Normal file
21
example/rook-ceph/kustomization.yaml
Normal 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
|
||||||
40
example/rook-ceph/test-vm.yaml
Normal file
40
example/rook-ceph/test-vm.yaml
Normal 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
|
||||||
Loading…
Add table
Add a link
Reference in a new issue