Move test to tc1.
This commit is contained in:
parent
1495301ec8
commit
5d90a6a8a9
4 changed files with 117 additions and 2 deletions
1
dev-example/.gitignore
vendored
1
dev-example/.gitignore
vendored
|
|
@ -1 +1,2 @@
|
||||||
/test-vm-ci.yaml
|
/test-vm-ci.yaml
|
||||||
|
/kubeconfig.yaml
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,8 @@
|
||||||
"/Controller":
|
"/Controller":
|
||||||
namespace: vmop-dev
|
namespace: vmop-dev
|
||||||
"/Reconciler":
|
"/Reconciler":
|
||||||
runnerData:
|
runnerDataPvc:
|
||||||
storageClassName: null
|
storageClassName: rook-cephfs
|
||||||
loadBalancerService:
|
loadBalancerService:
|
||||||
labels:
|
labels:
|
||||||
label1: label1
|
label1: label1
|
||||||
|
|
|
||||||
47
dev-example/gen-pool-vm-crds.sh
Executable file
47
dev-example/gen-pool-vm-crds.sh
Executable file
|
|
@ -0,0 +1,47 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
function usage() {
|
||||||
|
cat >&2 <<EOF
|
||||||
|
Usage: $0 [OPTION]... [TEMPLATE]
|
||||||
|
Generate VM CRDs using TEMPLATE.
|
||||||
|
|
||||||
|
-c, --count Count of VMs to generate
|
||||||
|
-d, --destination DIR Generate into given directory (default: ".")
|
||||||
|
-h, --help Print this help
|
||||||
|
-p, --prefix PREFIX Prefix for generated file (default: basename of template)
|
||||||
|
EOF
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
count=0
|
||||||
|
destination=.
|
||||||
|
template=""
|
||||||
|
prefix=""
|
||||||
|
|
||||||
|
while [ "$#" -gt 0 ]; do
|
||||||
|
case "$1" in
|
||||||
|
-c|--count) shift; count=$1;;
|
||||||
|
-d|--destination) shift; destination="$1";;
|
||||||
|
-h|--help) shift; usage;;
|
||||||
|
-p|--prefix) shift; prefix="$1";;
|
||||||
|
-*) echo >&2 "Unknown option: $1"; exit 1;;
|
||||||
|
*) template="$1";;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ -z "$template" ]; then
|
||||||
|
usage
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$count" = "0" ]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
for number in $(seq 1 $count); do
|
||||||
|
if [ -z "$prefix" ]; then
|
||||||
|
prefix=$(basename $template .tpl.yaml)
|
||||||
|
fi
|
||||||
|
name="$prefix$number"
|
||||||
|
index=$(($number - 1))
|
||||||
|
esh -o $destination/$name.yaml $template number=$number index=$index
|
||||||
|
done
|
||||||
67
dev-example/test-vm.tpl.yaml
Normal file
67
dev-example/test-vm.tpl.yaml
Normal file
|
|
@ -0,0 +1,67 @@
|
||||||
|
apiVersion: "vmoperator.jdrupes.org/v1"
|
||||||
|
kind: VirtualMachine
|
||||||
|
metadata:
|
||||||
|
namespace: vmop-dev
|
||||||
|
name: test-vm<%= ${number} %>
|
||||||
|
annotations:
|
||||||
|
argocd.argoproj.io/sync-wave: "20"
|
||||||
|
|
||||||
|
spec:
|
||||||
|
image:
|
||||||
|
# repository: docker-registry.lan.mnl.de
|
||||||
|
# path: vmoperator/org.jdrupes.vmoperator.runner.qemu-arch
|
||||||
|
# pullPolicy: Always
|
||||||
|
# repository: ghcr.io
|
||||||
|
# path: mnlipp/org.jdrupes.vmoperator.runner.qemu-alpine
|
||||||
|
# version: "3.0.0"
|
||||||
|
source: registry.mnl.de/org/jdrupes/vm-operator/org.jdrupes.vmoperator.runner.qemu-arch:testing
|
||||||
|
pullPolicy: Always
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
- role: admin
|
||||||
|
may:
|
||||||
|
- "*"
|
||||||
|
- user: test
|
||||||
|
may:
|
||||||
|
- accessConsole
|
||||||
|
|
||||||
|
guestShutdownStops: true
|
||||||
|
|
||||||
|
cloudInit: {}
|
||||||
|
|
||||||
|
vm:
|
||||||
|
# state: Running
|
||||||
|
bootMenu: true
|
||||||
|
maximumCpus: 4
|
||||||
|
currentCpus: 2
|
||||||
|
maximumRam: 4Gi
|
||||||
|
currentRam: 3Gi
|
||||||
|
|
||||||
|
networks:
|
||||||
|
# No bridge on TC1
|
||||||
|
# - tap: {}
|
||||||
|
- user: {}
|
||||||
|
|
||||||
|
disks:
|
||||||
|
- volumeClaimTemplate:
|
||||||
|
metadata:
|
||||||
|
name: system
|
||||||
|
spec:
|
||||||
|
storageClassName: ceph-rbd3slow
|
||||||
|
dataSource:
|
||||||
|
name: test-vm-snapshot-1
|
||||||
|
kind: VolumeSnapshot
|
||||||
|
apiGroup: snapshot.storage.k8s.io
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
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
|
||||||
|
|
||||||
|
display:
|
||||||
|
spice:
|
||||||
|
port: <%= $((5910 + number)) %>
|
||||||
|
server: 192.168.179.20
|
||||||
Loading…
Add table
Add a link
Reference in a new issue