Skip to content

Commit

Permalink
Generate VM's definitions
Browse files Browse the repository at this point in the history
Now `make generate` will generate VM's definitions under `cluster/`
instead of hard-coded examples.

Signed-off-by: Lukianov Artyom <[email protected]>
  • Loading branch information
Lukianov Artyom committed Apr 11, 2018
1 parent a4a5194 commit e3893e7
Show file tree
Hide file tree
Showing 30 changed files with 679 additions and 326 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ cluster/local/certs
_out
vendor/**/*_test.go
**/polarion.xml
tools/manifest-templator/manifest-templator
tools/vms-generator/vms-generator
24 changes: 24 additions & 0 deletions cluster/examples/vm-ephemeral.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: kubevirt.io/v1alpha1
kind: VirtualMachine
metadata:
creationTimestamp: null
name: vm-ephemeral
spec:
domain:
devices:
disks:
- disk:
bus: virtio
name: registrydisk
volumeName: registryvolume
machine:
type: ""
resources:
requests:
memory: 64M
terminationGracePeriodSeconds: 0
volumes:
- name: registryvolume
registryDisk:
image: kubevirt/cirros-registry-disk-demo:devel
status: {}
31 changes: 31 additions & 0 deletions cluster/examples/vm-fedora.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
apiVersion: kubevirt.io/v1alpha1
kind: VirtualMachine
metadata:
creationTimestamp: null
name: vm-fedora
spec:
domain:
devices:
disks:
- disk:
bus: virtio
name: registrydisk
volumeName: registryvolume
- disk:
bus: virtio
name: cloudinitdisk
volumeName: cloudinitvolume
machine:
type: ""
resources:
requests:
memory: 1024M
terminationGracePeriodSeconds: 0
volumes:
- name: registryvolume
registryDisk:
image: kubevirt/fedora-cloud-registry-disk-demo:devel
- cloudInitNoCloud:
userDataBase64: IyEvYmluL3NoCgplY2hvICdwcmludGVkIGZyb20gY2xvdWQtaW5pdCB1c2VyZGF0YScK
name: cloudinitvolume
status: {}
26 changes: 26 additions & 0 deletions cluster/examples/vm-flavor-small.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
apiVersion: kubevirt.io/v1alpha1
kind: VirtualMachine
metadata:
creationTimestamp: null
labels:
kubevirt.io/flavor: small
name: vm-flavor-small
spec:
domain:
devices:
disks:
- disk:
bus: virtio
name: registrydisk
volumeName: registryvolume
machine:
type: ""
resources:
requests:
memory: 64M
terminationGracePeriodSeconds: 0
volumes:
- name: registryvolume
registryDisk:
image: kubevirt/cirros-registry-disk-demo:devel
status: {}
38 changes: 38 additions & 0 deletions cluster/examples/vm-nocloud.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
apiVersion: kubevirt.io/v1alpha1
kind: VirtualMachine
metadata:
creationTimestamp: null
name: vm-nocloud
spec:
domain:
devices:
disks:
- disk:
bus: virtio
name: registrydisk
volumeName: registryvolume
- disk:
bus: virtio
name: cloudinitdisk
volumeName: cloudinitvolume
- disk:
bus: virtio
name: emptydisk
volumeName: emptydiskvolume
machine:
type: ""
resources:
requests:
memory: 64M
terminationGracePeriodSeconds: 0
volumes:
- name: registryvolume
registryDisk:
image: kubevirt/cirros-registry-disk-demo:devel
- cloudInitNoCloud:
userDataBase64: IyEvYmluL3NoCgplY2hvICdwcmludGVkIGZyb20gY2xvdWQtaW5pdCB1c2VyZGF0YScK
name: cloudinitvolume
- emptyDisk:
capacity: 2Gi
name: emptydiskvolume
status: {}
24 changes: 14 additions & 10 deletions cluster/vm-pvc.yaml → cluster/examples/vm-pvc.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
apiVersion: kubevirt.io/v1alpha1
kind: VirtualMachine
metadata:
creationTimestamp: null
name: vm-pvc
spec:
terminationGracePeriodSeconds: 0
domain:
resources:
requests:
memory: 64M
devices:
disks:
- name: mydisk
- disk:
bus: virtio
name: pvcdisk
volumeName: pvcvolume
disk:
dev: vda
machine:
type: ""
resources:
requests:
memory: 64M
terminationGracePeriodSeconds: 0
volumes:
- name: pvcvolume
persistentVolumeClaim:
claimName: disk-alpine
- name: pvcvolume
persistentVolumeClaim:
claimName: disk-alpine
status: {}
24 changes: 24 additions & 0 deletions cluster/examples/vm-sata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: kubevirt.io/v1alpha1
kind: VirtualMachine
metadata:
creationTimestamp: null
name: vm-sata
spec:
domain:
devices:
disks:
- disk:
bus: sata
name: registrydisk
volumeName: registryvolume
machine:
type: ""
resources:
requests:
memory: 64M
terminationGracePeriodSeconds: 0
volumes:
- name: registryvolume
registryDisk:
image: kubevirt/cirros-registry-disk-demo:devel
status: {}
50 changes: 27 additions & 23 deletions cluster/windows-demo.yaml → cluster/examples/vm-windows.yaml
Original file line number Diff line number Diff line change
@@ -1,42 +1,46 @@
apiVersion: kubevirt.io/v1alpha1
kind: VirtualMachine
metadata:
name: windows2012r2
creationTimestamp: null
name: vm-windows
spec:
terminationGracePeriodSeconds: 0
domain:
clock:
timer:
hpet:
present: false
hyperv: {}
pit:
tickPolicy: delay
rtc:
tickPolicy: catchup
utc: {}
cpu:
cores: 2
devices:
disks:
- disk:
bus: sata
name: pvcdisk
volumeName: pvcvolume
features:
acpi: {}
apic: {}
hyperv:
relaxed: {}
vapic: {}
spinlocks:
spinlocks: 8191
clock:
utc: {}
timer:
hpet:
present: false
pit:
tickPolicy: delay
rtc:
tickPolicy: catchup
hyperv: {}
vapic: {}
firmware:
uuid: 5d307ca9-b3ef-428c-8861-06e72d69f223
machine:
type: ""
resources:
requests:
memory: 512M
devices:
disks:
- name: server2012r2
volumeName: server2012r2
disk:
dev: vda
memory: 2Gi
terminationGracePeriodSeconds: 0
volumes:
- name: server2012r2
persistentVolumeClaim:
claimName: my-windows-image
- name: pvcvolume
persistentVolumeClaim:
claimName: disk-windows
status: {}
20 changes: 0 additions & 20 deletions cluster/vm-dev-sata.yaml

This file was deleted.

19 changes: 0 additions & 19 deletions cluster/vm-ephemeral.yaml

This file was deleted.

28 changes: 0 additions & 28 deletions cluster/vm-fedora.yaml

This file was deleted.

34 changes: 0 additions & 34 deletions cluster/vm-nocloud.yaml

This file was deleted.

19 changes: 0 additions & 19 deletions cluster/vm-small.yaml

This file was deleted.

Loading

0 comments on commit e3893e7

Please sign in to comment.