Skip to content

Commit

Permalink
Generate all manifests from code
Browse files Browse the repository at this point in the history
Signed-off-by: Marc Sluiter <[email protected]>
  • Loading branch information
slintes committed Dec 19, 2018
1 parent 2252080 commit 2ada971
Show file tree
Hide file tree
Showing 129 changed files with 2,554 additions and 17,950 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
*.iml
tools/openapispec/openapispec
tools/crd-generator/crd-generator
tools/resource-generator/resource-generator
**/bin
bin/*
.vagrant
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ all:
hack/dockerized "./hack/check.sh && KUBEVIRT_VERSION=${KUBEVIRT_VERSION} ./hack/build-go.sh install ${WHAT} && ./hack/build-copy-artifacts.sh ${WHAT} && DOCKER_PREFIX=${DOCKER_PREFIX} DOCKER_TAG=${DOCKER_TAG} ./hack/build-manifests.sh"

generate:
hack/dockerized "./hack/generate.sh"
hack/dockerized "KUBEVIRT_PROVIDER=${KUBEVIRT_PROVIDER} DOCKER_PREFIX=${DOCKER_PREFIX} DOCKER_TAG=${DOCKER_TAG} ./hack/generate.sh"

apidocs:
hack/dockerized "./hack/generate.sh && ./hack/gen-swagger-doc/gen-swagger-docs.sh v1 html"
Expand All @@ -30,7 +30,7 @@ functest:

clean:
hack/dockerized "./hack/build-go.sh clean ${WHAT} && rm _out/* -rf"
rm -f tools/openapispec/openapispec tools/crd-generator/crd-generator tools/manifest-templator/manifests-templator tools/vms-generator/vms-generator
rm -f tools/openapispec/openapispec tools/resource-generator/resource-generator tools/manifest-templator/manifests-templator tools/vms-generator/vms-generator

distclean: clean
hack/dockerized "rm -rf vendor/ && rm -f .glide.*.hash && glide cc"
Expand Down Expand Up @@ -63,7 +63,7 @@ verify-build:
hack/verify-build.sh

manifests:
hack/dockerized "DOCKER_PREFIX=${DOCKER_PREFIX} DOCKER_TAG=${DOCKER_TAG} ./hack/build-manifests.sh"
hack/dockerized "KUBEVIRT_PROVIDER=${KUBEVIRT_PROVIDER} DOCKER_PREFIX=${DOCKER_PREFIX} DOCKER_TAG=${DOCKER_TAG} ./hack/build-manifests.sh"

.release-functest:
make functest > .release-functest 2>&1
Expand Down
3 changes: 1 addition & 2 deletions cluster/examples/migration-job.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
---
apiVersion: kubevirt.io/v1alpha2
kind: VirtualMachineInstanceMigration
metadata:
creationTimestamp: null
name: migration-job
spec:
vmiName: vmi-migratable
status: {}
4 changes: 1 addition & 3 deletions cluster/examples/vm-alpine-datavolume.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
apiVersion: kubevirt.io/v1alpha2
kind: VirtualMachine
metadata:
creationTimestamp: null
labels:
kubevirt.io/vm: vm-alpine-datavolume
name: vm-alpine-datavolume
Expand All @@ -25,7 +25,6 @@ spec:
running: false
template:
metadata:
creationTimestamp: null
labels:
kubevirt.io/vm: vm-alpine-datavolume
spec:
Expand All @@ -46,4 +45,3 @@ spec:
- dataVolume:
name: alpine-dv
name: datavolumevolume1
status: {}
4 changes: 1 addition & 3 deletions cluster/examples/vm-alpine-multipvc.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
---
apiVersion: kubevirt.io/v1alpha2
kind: VirtualMachine
metadata:
creationTimestamp: null
labels:
kubevirt.io/vm: vm-alpine-multipvc
name: vm-alpine-multipvc
spec:
running: false
template:
metadata:
creationTimestamp: null
labels:
kubevirt.io/vm: vm-alpine-multipvc
spec:
Expand Down Expand Up @@ -37,4 +36,3 @@ spec:
- name: pvcvolume2
persistentVolumeClaim:
claimName: disk-custom
status: {}
4 changes: 1 addition & 3 deletions cluster/examples/vm-cirros.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
---
apiVersion: kubevirt.io/v1alpha2
kind: VirtualMachine
metadata:
creationTimestamp: null
labels:
kubevirt.io/vm: vm-cirros
name: vm-cirros
spec:
running: false
template:
metadata:
creationTimestamp: null
labels:
kubevirt.io/vm: vm-cirros
spec:
Expand Down Expand Up @@ -40,4 +39,3 @@ spec:
echo 'printed from cloud-init userdata'
name: cloudinitvolume
status: {}
2 changes: 1 addition & 1 deletion cluster/examples/vm-template-fedora.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
apiVersion: v1
kind: Template
metadata:
annotations:
description: OCP KubeVirt Fedora 27 VM template
iconClass: icon-fedora
tags: kubevirt,ocp,template,linux,virtualmachine
creationTimestamp: null
labels:
kubevirt.io/os: fedora27
miq.github.io/kubevirt-is-vm-template: "true"
Expand Down
2 changes: 1 addition & 1 deletion cluster/examples/vm-template-rhel7.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
apiVersion: v1
kind: Template
metadata:
annotations:
description: OCP KubeVirt Red Hat Enterprise Linux 7.4 VM template
iconClass: icon-rhel
tags: kubevirt,ocp,template,linux,virtualmachine
creationTimestamp: null
labels:
kubevirt.io/os: rhel-7.4
miq.github.io/kubevirt-is-vm-template: "true"
Expand Down
2 changes: 1 addition & 1 deletion cluster/examples/vm-template-windows2012r2.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
apiVersion: v1
kind: Template
metadata:
annotations:
description: OCP KubeVirt Microsoft Windows Server 2012 R2 VM template
iconClass: icon-windows
tags: kubevirt,ocp,template,windows,virtualmachine
creationTimestamp: null
labels:
kubevirt.io/os: win2k12r2
miq.github.io/kubevirt-is-vm-template: "true"
Expand Down
3 changes: 1 addition & 2 deletions cluster/examples/vmi-block-pvc.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
apiVersion: kubevirt.io/v1alpha2
kind: VirtualMachineInstance
metadata:
creationTimestamp: null
labels:
special: vmi-block-pvc
name: vmi-block-pvc
Expand All @@ -23,4 +23,3 @@ spec:
- name: blockpvcvolume
persistentVolumeClaim:
claimName: local-block-storage-cirros
status: {}
3 changes: 1 addition & 2 deletions cluster/examples/vmi-ephemeral.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
apiVersion: kubevirt.io/v1alpha2
kind: VirtualMachineInstance
metadata:
creationTimestamp: null
labels:
special: vmi-ephemeral
name: vmi-ephemeral
Expand All @@ -23,4 +23,3 @@ spec:
- containerDisk:
image: registry:5000/kubevirt/cirros-container-disk-demo:devel
name: registryvolume
status: {}
3 changes: 1 addition & 2 deletions cluster/examples/vmi-fedora.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
apiVersion: kubevirt.io/v1alpha2
kind: VirtualMachineInstance
metadata:
creationTimestamp: null
labels:
special: vmi-fedora
name: vmi-fedora
Expand Down Expand Up @@ -33,4 +33,3 @@ spec:
password: fedora
chpasswd: { expire: False }
name: cloudinitvolume
status: {}
3 changes: 1 addition & 2 deletions cluster/examples/vmi-flavor-small.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
apiVersion: kubevirt.io/v1alpha2
kind: VirtualMachineInstance
metadata:
creationTimestamp: null
labels:
kubevirt.io/flavor: small
name: vmi-flavor-small
Expand All @@ -23,4 +23,3 @@ spec:
- containerDisk:
image: registry:5000/kubevirt/cirros-container-disk-demo:devel
name: registryvolume
status: {}
3 changes: 1 addition & 2 deletions cluster/examples/vmi-genie-multiple-net.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
apiVersion: kubevirt.io/v1alpha2
kind: VirtualMachineInstance
metadata:
creationTimestamp: null
labels:
special: vmi-genie-multiple-net
name: vmi-genie-multiple-net
Expand Down Expand Up @@ -45,4 +45,3 @@ spec:
echo "fedora" | passwd fedora --stdin
dhclient eth1
name: cloudinitvolume
status: {}
3 changes: 1 addition & 2 deletions cluster/examples/vmi-genie-ptp.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
apiVersion: kubevirt.io/v1alpha2
kind: VirtualMachineInstance
metadata:
creationTimestamp: null
labels:
special: vmi-genie-ptp
name: vmi-genie-ptp
Expand Down Expand Up @@ -39,4 +39,3 @@ spec:
#!/bin/bash
echo "fedora" | passwd fedora --stdin
name: cloudinitvolume
status: {}
3 changes: 1 addition & 2 deletions cluster/examples/vmi-host-disk.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
apiVersion: kubevirt.io/v1alpha2
kind: VirtualMachineInstance
metadata:
creationTimestamp: null
labels:
special: vmi-host-disk
name: vmi-host-disk
Expand All @@ -25,4 +25,3 @@ spec:
path: /data/disk.img
type: DiskOrCreate
name: hostdiskvolume
status: {}
3 changes: 1 addition & 2 deletions cluster/examples/vmi-masquerade.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
apiVersion: kubevirt.io/v1alpha2
kind: VirtualMachineInstance
metadata:
creationTimestamp: null
labels:
special: vmi-masquerade
name: vmi-masquerade
Expand Down Expand Up @@ -45,4 +45,3 @@ spec:
systemctl enable nginx
systemctl start nginx
name: cloudinitvolume
status: {}
3 changes: 1 addition & 2 deletions cluster/examples/vmi-migratable.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
apiVersion: kubevirt.io/v1alpha2
kind: VirtualMachineInstance
metadata:
creationTimestamp: null
labels:
special: vmi-migratable
name: vmi-migratable
Expand All @@ -23,4 +23,3 @@ spec:
- containerDisk:
image: registry:5000/kubevirt/alpine-container-disk-demo:devel
name: registryvolume
status: {}
3 changes: 1 addition & 2 deletions cluster/examples/vmi-multus-multiple-net.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
apiVersion: kubevirt.io/v1alpha2
kind: VirtualMachineInstance
metadata:
creationTimestamp: null
labels:
special: vmi-multus-multiple-net
name: vmi-multus-multiple-net
Expand Down Expand Up @@ -44,4 +44,3 @@ spec:
echo "fedora" |passwd fedora --stdin
dhclient eth1
name: cloudinitvolume
status: {}
3 changes: 1 addition & 2 deletions cluster/examples/vmi-multus-ptp.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
apiVersion: kubevirt.io/v1alpha2
kind: VirtualMachineInstance
metadata:
creationTimestamp: null
labels:
special: vmi-multus-ptp
name: vmi-multus-ptp
Expand Down Expand Up @@ -39,4 +39,3 @@ spec:
#!/bin/bash
echo "fedora" |passwd fedora --stdin
name: cloudinitvolume
status: {}
3 changes: 1 addition & 2 deletions cluster/examples/vmi-nocloud.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
apiVersion: kubevirt.io/v1alpha2
kind: VirtualMachineInstance
metadata:
creationTimestamp: null
labels:
special: vmi-nocloud
name: vmi-nocloud
Expand Down Expand Up @@ -40,4 +40,3 @@ spec:
- emptyDisk:
capacity: 2Gi
name: emptydiskvolume
status: {}
2 changes: 1 addition & 1 deletion cluster/examples/vmi-preset-small.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
apiVersion: kubevirt.io/v1alpha2
kind: VirtualMachineInstancePreset
metadata:
creationTimestamp: null
name: vmi-preset-small
spec:
domain:
Expand Down
3 changes: 1 addition & 2 deletions cluster/examples/vmi-pvc.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
apiVersion: kubevirt.io/v1alpha2
kind: VirtualMachineInstance
metadata:
creationTimestamp: null
labels:
special: vmi-pvc
name: vmi-pvc
Expand All @@ -23,4 +23,3 @@ spec:
- name: pvcvolume
persistentVolumeClaim:
claimName: disk-alpine
status: {}
4 changes: 1 addition & 3 deletions cluster/examples/vmi-replicaset-cirros.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
apiVersion: kubevirt.io/v1alpha2
kind: VirtualMachineInstanceReplicaSet
metadata:
creationTimestamp: null
name: vmi-replicaset-cirros
spec:
replicas: 3
Expand All @@ -10,7 +10,6 @@ spec:
kubevirt.io/vmReplicaSet: vmi-replicaset-cirros
template:
metadata:
creationTimestamp: null
labels:
kubevirt.io/vmReplicaSet: vmi-replicaset-cirros
spec:
Expand All @@ -31,4 +30,3 @@ spec:
- containerDisk:
image: registry:5000/kubevirt/cirros-container-disk-demo:devel
name: registryvolume
status: {}
3 changes: 1 addition & 2 deletions cluster/examples/vmi-sata.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
apiVersion: kubevirt.io/v1alpha2
kind: VirtualMachineInstance
metadata:
creationTimestamp: null
labels:
special: vmi-sata
name: vmi-sata
Expand All @@ -23,4 +23,3 @@ spec:
- containerDisk:
image: registry:5000/kubevirt/cirros-container-disk-demo:devel
name: registryvolume
status: {}
3 changes: 1 addition & 2 deletions cluster/examples/vmi-slirp.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
apiVersion: kubevirt.io/v1alpha2
kind: VirtualMachineInstance
metadata:
creationTimestamp: null
labels:
special: vmi-slirp
name: vmi-slirp
Expand Down Expand Up @@ -45,4 +45,3 @@ spec:
systemctl enable nginx
systemctl start nginx
name: cloudinitvolume
status: {}
Loading

0 comments on commit 2ada971

Please sign in to comment.