From d83d9b4ce8c3ef494b9d29fb2dcc856adc04b6f7 Mon Sep 17 00:00:00 2001 From: Lee Yarwood Date: Fri, 28 Oct 2022 13:35:27 +0100 Subject: [PATCH] Introduce and use a micro size server instancetype This should be suitable for use with CirrOS [1] and other minimal test OSes used by KubeVirt CI. [1] https://github.com/cirros-dev/cirros/issues/53 Signed-off-by: Lee Yarwood --- README.md | 6 +++++ common-clusterinstancetypes-bundle.yaml | 12 ++++++++++ common-instancetypes-all-bundle.yaml | 24 +++++++++++++++++++ common-instancetypes-bundle.yaml | 12 ++++++++++ .../instancetypes/server/kustomization.yaml | 1 + .../server/micro/kustomization.yaml | 9 +++++++ .../sizes/micro/kustomization.yaml | 13 ++++++++++ .../instancetypes/sizes/micro/micro.yaml | 12 ++++++++++ 8 files changed, 89 insertions(+) create mode 100644 common-instancetypes/instancetypes/server/micro/kustomization.yaml create mode 100644 common-instancetypes/instancetypes/sizes/micro/kustomization.yaml create mode 100644 common-instancetypes/instancetypes/sizes/micro/micro.yaml diff --git a/README.md b/README.md index 8c62eb50..3439e54d 100644 --- a/README.md +++ b/README.md @@ -76,6 +76,9 @@ VirtualMachineClusterInstancetype server.medium --- VirtualMachineClusterInstancetype +server.micro +--- +VirtualMachineClusterInstancetype server.small --- VirtualMachineClusterInstancetype @@ -184,6 +187,9 @@ VirtualMachineInstancetype server.medium --- VirtualMachineInstancetype +server.micro +--- +VirtualMachineInstancetype server.small --- VirtualMachineInstancetype diff --git a/common-clusterinstancetypes-bundle.yaml b/common-clusterinstancetypes-bundle.yaml index 92535e13..5db61ffe 100644 --- a/common-clusterinstancetypes-bundle.yaml +++ b/common-clusterinstancetypes-bundle.yaml @@ -70,6 +70,18 @@ spec: --- apiVersion: instancetype.kubevirt.io/v1alpha2 kind: VirtualMachineClusterInstancetype +metadata: + labels: + kubevirt.io/size: mirco + name: server.micro +spec: + cpu: + guest: 1 + memory: + guest: 256Mi +--- +apiVersion: instancetype.kubevirt.io/v1alpha2 +kind: VirtualMachineClusterInstancetype metadata: labels: kubevirt.io/size: small diff --git a/common-instancetypes-all-bundle.yaml b/common-instancetypes-all-bundle.yaml index ebaa3f37..bb36f725 100644 --- a/common-instancetypes-all-bundle.yaml +++ b/common-instancetypes-all-bundle.yaml @@ -70,6 +70,18 @@ spec: --- apiVersion: instancetype.kubevirt.io/v1alpha2 kind: VirtualMachineClusterInstancetype +metadata: + labels: + kubevirt.io/size: mirco + name: server.micro +spec: + cpu: + guest: 1 + memory: + guest: 256Mi +--- +apiVersion: instancetype.kubevirt.io/v1alpha2 +kind: VirtualMachineClusterInstancetype metadata: labels: kubevirt.io/size: small @@ -827,6 +839,18 @@ spec: --- apiVersion: instancetype.kubevirt.io/v1alpha2 kind: VirtualMachineInstancetype +metadata: + labels: + kubevirt.io/size: mirco + name: server.micro +spec: + cpu: + guest: 1 + memory: + guest: 256Mi +--- +apiVersion: instancetype.kubevirt.io/v1alpha2 +kind: VirtualMachineInstancetype metadata: labels: kubevirt.io/size: small diff --git a/common-instancetypes-bundle.yaml b/common-instancetypes-bundle.yaml index 3b7ad8e9..d91ab5f3 100644 --- a/common-instancetypes-bundle.yaml +++ b/common-instancetypes-bundle.yaml @@ -70,6 +70,18 @@ spec: --- apiVersion: instancetype.kubevirt.io/v1alpha2 kind: VirtualMachineInstancetype +metadata: + labels: + kubevirt.io/size: mirco + name: server.micro +spec: + cpu: + guest: 1 + memory: + guest: 256Mi +--- +apiVersion: instancetype.kubevirt.io/v1alpha2 +kind: VirtualMachineInstancetype metadata: labels: kubevirt.io/size: small diff --git a/common-instancetypes/instancetypes/server/kustomization.yaml b/common-instancetypes/instancetypes/server/kustomization.yaml index 2645dfb1..6506e864 100644 --- a/common-instancetypes/instancetypes/server/kustomization.yaml +++ b/common-instancetypes/instancetypes/server/kustomization.yaml @@ -7,3 +7,4 @@ resources: - ./medium - ./small - ./tiny + - ./micro diff --git a/common-instancetypes/instancetypes/server/micro/kustomization.yaml b/common-instancetypes/instancetypes/server/micro/kustomization.yaml new file mode 100644 index 00000000..f56f9fae --- /dev/null +++ b/common-instancetypes/instancetypes/server/micro/kustomization.yaml @@ -0,0 +1,9 @@ +--- +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: + - ../base + +components: + - ../../sizes/micro diff --git a/common-instancetypes/instancetypes/sizes/micro/kustomization.yaml b/common-instancetypes/instancetypes/sizes/micro/kustomization.yaml new file mode 100644 index 00000000..f2ffcb1e --- /dev/null +++ b/common-instancetypes/instancetypes/sizes/micro/kustomization.yaml @@ -0,0 +1,13 @@ +--- +apiVersion: kustomize.config.k8s.io/v1alpha1 +kind: Component + +nameSuffix: .micro + +patches: + - path: micro.yaml + target: + kind: VirtualMachineInstancetype + - path: micro.yaml + target: + kind: VirtualMachineClusterInstancetype diff --git a/common-instancetypes/instancetypes/sizes/micro/micro.yaml b/common-instancetypes/instancetypes/sizes/micro/micro.yaml new file mode 100644 index 00000000..b5fe4906 --- /dev/null +++ b/common-instancetypes/instancetypes/sizes/micro/micro.yaml @@ -0,0 +1,12 @@ +--- +apiVersion: instancetype.kubevirt.io/v1alpha1 +kind: VirtualMachineInstancetype +metadata: + name: VirtualMachineInstancetype + labels: + kubevirt.io/size: mirco +spec: + cpu: + guest: 1 + memory: + guest: 256Mi