Skip to content

Commit

Permalink
Introduce OpenShift metadata to generated resources (#17)
Browse files Browse the repository at this point in the history
* Add OpenShift KubeVirt provider metadata to preferences

This change adds some generic OpenShift specific support metadata to
each preference.

Signed-off-by: Lee Yarwood <lyarwood@redhat.com>

* Add OpenShift metadata to CentOS preferences

Signed-off-by: Lee Yarwood <lyarwood@redhat.com>

* Add OpenShift metadata to RHEL preferences

Signed-off-by: Lee Yarwood <lyarwood@redhat.com>

* Add OpenShift metadata to Windows preferences

Signed-off-by: Lee Yarwood <lyarwood@redhat.com>

* Add OpenShift metadata to Fedora preferences

Signed-off-by: Lee Yarwood <lyarwood@redhat.com>

* Add OpenShift metadata to Ubuntu preferences

Signed-off-by: Lee Yarwood <lyarwood@redhat.com>

* Add OpenShift metadata to Alpine preferences

Signed-off-by: Lee Yarwood <lyarwood@redhat.com>

* Add OpenShift metadata to CirrOS preferences

Signed-off-by: Lee Yarwood <lyarwood@redhat.com>

* Add virtio to the display name of Window preferences

Signed-off-by: Lee Yarwood <lyarwood@redhat.com>

* Add an instancetype.kubevirt.io/os-type label to each preference

We plan on eventually supporting preferences that are not aligned
directly to an OS and version but with an application workload, for
example SAP. This label introduces a simple way for users to query the
available preferences in an environment given the underlying OS of their
workload.

Signed-off-by: Lee Yarwood <lyarwood@redhat.com>

Signed-off-by: Lee Yarwood <lyarwood@redhat.com>
  • Loading branch information
lyarwood authored Jan 25, 2023
1 parent b1640f7 commit d1fc7ca
Show file tree
Hide file tree
Showing 81 changed files with 1,410 additions and 1 deletion.
224 changes: 224 additions & 0 deletions common-clusterpreferences-bundle.yaml

Large diffs are not rendered by default.

450 changes: 449 additions & 1 deletion common-instancetypes-all-bundle.yaml

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions common-instancetypes/preferences/alpine/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ resources:
- ../base

components:
- ./metadata
- ../components/diskbus-virtio-blk
- ../components/interfacemodel-virtio-net

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component
patches:
- path: ./metadata.yaml
target:
kind: VirtualMachinePreference
- path: ./metadata.yaml
target:
kind: VirtualMachineClusterPreference
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
apiVersion: instancetype.kubevirt.io/v1alpha1
kind: VirtualMachinePreference
metadata:
name: metadata
annotations:
tags: "hidden,kubevirt,alpine"
iconClass: "icon-alpine"
openshift.io/display-name: "Alpine"
4 changes: 4 additions & 0 deletions common-instancetypes/preferences/base/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- ./VirtualMachineClusterPreference.yaml
- ./VirtualMachinePreference.yaml

components:
- ./metadata
10 changes: 10 additions & 0 deletions common-instancetypes/preferences/base/metadata/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component
patches:
- path: ./metadata.yaml
target:
kind: VirtualMachinePreference
- path: ./metadata.yaml
target:
kind: VirtualMachineClusterPreference
11 changes: 11 additions & 0 deletions common-instancetypes/preferences/base/metadata/metadata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
apiVersion: instancetype.kubevirt.io/v1alpha1
kind: VirtualMachinePreference
metadata:
name: metadata
annotations:
openshift.io/provider-display-name: "KubeVirt"
openshift.io/documentation-url: "https://github.com/kubevirt/common-instancetypes"
openshift.io/support-url: "https://github.com/kubevirt/common-instancetypes/issues"
labels:
instancetype.kubevirt.io/os-type: "linux"
4 changes: 4 additions & 0 deletions common-instancetypes/preferences/centos/7/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,8 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../base

components:
- ./metadata

nameSuffix: ".7"
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component
patches:
- path: ./metadata.yaml
target:
kind: VirtualMachinePreference
- path: ./metadata.yaml
target:
kind: VirtualMachineClusterPreference
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
apiVersion: instancetype.kubevirt.io/v1alpha1
kind: VirtualMachinePreference
metadata:
name: metadata
annotations:
openshift.io/display-name: "CentOS 7"
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@ kind: Kustomization
resources:
- ../base

components:
- ./metadata

nameSuffix: ".8.stream"
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component
patches:
- path: ./metadata.yaml
target:
kind: VirtualMachinePreference
- path: ./metadata.yaml
target:
kind: VirtualMachineClusterPreference
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
apiVersion: instancetype.kubevirt.io/v1alpha1
kind: VirtualMachinePreference
metadata:
name: metadata
annotations:
openshift.io/display-name: "CentOS Stream 8"
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ resources:
nameSuffix: ".9.stream"

components:
- ./metadata
- ../../components/rng
- ../../components/secureboot
- ../../components/disk-dedicatediothread
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component
patches:
- path: ./metadata.yaml
target:
kind: VirtualMachinePreference
- path: ./metadata.yaml
target:
kind: VirtualMachineClusterPreference
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
apiVersion: instancetype.kubevirt.io/v1alpha1
kind: VirtualMachinePreference
metadata:
name: metadata
annotations:
openshift.io/display-name: "CentOS Stream 9"
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ resources:
- ../../base

components:
- ./metadata
- ../../components/diskbus-virtio-blk
- ../../components/interfacemodel-virtio-net

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component
patches:
- path: ./metadata.yaml
target:
kind: VirtualMachinePreference
- path: ./metadata.yaml
target:
kind: VirtualMachineClusterPreference
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
apiVersion: instancetype.kubevirt.io/v1alpha1
kind: VirtualMachinePreference
metadata:
name: metadata
annotations:
tags: "hidden,kubevirt,linux,centos-stream"
iconClass: "icon-centos"
1 change: 1 addition & 0 deletions common-instancetypes/preferences/cirros/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ resources:
- ../base

components:
- ./metadata
- ../components/diskbus-virtio-blk
- ../components/interfacemodel-virtio-net

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component
patches:
- path: ./metadata.yaml
target:
kind: VirtualMachinePreference
- path: ./metadata.yaml
target:
kind: VirtualMachineClusterPreference
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
apiVersion: instancetype.kubevirt.io/v1alpha1
kind: VirtualMachinePreference
metadata:
name: metadata
annotations:
tags: "hidden,kubevirt,cirros"
iconClass: "icon-cirros"
openshift.io/display-name: "Cirros"
1 change: 1 addition & 0 deletions common-instancetypes/preferences/fedora/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ resources:
- ../base

components:
- ./metadata
- ../components/diskbus-virtio-blk
- ../components/interfacemodel-virtio-net
- ../components/rng
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component
patches:
- path: ./metadata.yaml
target:
kind: VirtualMachinePreference
- path: ./metadata.yaml
target:
kind: VirtualMachineClusterPreference
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
apiVersion: instancetype.kubevirt.io/v1alpha1
kind: VirtualMachinePreference
metadata:
name: metadata
annotations:
tags: "hidden,kubevirt,fedora"
iconClass: "icon-fedora"
openshift.io/display-name: "Fedora"
3 changes: 3 additions & 0 deletions common-instancetypes/preferences/rhel/7/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@ kind: Kustomization
resources:
- ../base

components:
- ./metadata

nameSuffix: ".7"
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component
patches:
- path: ./metadata.yaml
target:
kind: VirtualMachinePreference
- path: ./metadata.yaml
target:
kind: VirtualMachineClusterPreference
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
apiVersion: instancetype.kubevirt.io/v1alpha1
kind: VirtualMachinePreference
metadata:
name: metadata
annotations:
openshift.io/display-name: "Red Hat Enterprise Linux 7"
3 changes: 3 additions & 0 deletions common-instancetypes/preferences/rhel/8/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@ kind: Kustomization
resources:
- ../base

components:
- ./metadata

nameSuffix: ".8"
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component
patches:
- path: ./metadata.yaml
target:
kind: VirtualMachinePreference
- path: ./metadata.yaml
target:
kind: VirtualMachineClusterPreference
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
apiVersion: instancetype.kubevirt.io/v1alpha1
kind: VirtualMachinePreference
metadata:
name: metadata
annotations:
openshift.io/display-name: "Red Hat Enterprise Linux 8"
1 change: 1 addition & 0 deletions common-instancetypes/preferences/rhel/9/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ resources:
nameSuffix: ".9"

components:
- ./metadata
- ../../components/disk-dedicatediothread
- ../../components/rng
- ../../components/secureboot
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component
patches:
- path: ./metadata.yaml
target:
kind: VirtualMachinePreference
- path: ./metadata.yaml
target:
kind: VirtualMachineClusterPreference
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
apiVersion: instancetype.kubevirt.io/v1alpha1
kind: VirtualMachinePreference
metadata:
name: metadata
annotations:
openshift.io/display-name: "Red Hat Enterprise Linux 9"
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ resources:
- ../../base

components:
- ./metadata
- ../../components/diskbus-virtio-blk
- ../../components/interfacemodel-virtio-net

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component
patches:
- path: ./metadata.yaml
target:
kind: VirtualMachinePreference
- path: ./metadata.yaml
target:
kind: VirtualMachineClusterPreference
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
apiVersion: instancetype.kubevirt.io/v1alpha1
kind: VirtualMachinePreference
metadata:
name: metadata
annotations:
tags: "hidden,kubevirt,linux,rhel"
iconClass: "icon-rhel"
1 change: 1 addition & 0 deletions common-instancetypes/preferences/ubuntu/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ resources:
- ../base

components:
- ./metadata
- ../components/diskbus-virtio-blk
- ../components/interfacemodel-virtio-net
- ../components/rng
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component
patches:
- path: ./metadata.yaml
target:
kind: VirtualMachinePreference
- path: ./metadata.yaml
target:
kind: VirtualMachineClusterPreference
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
apiVersion: instancetype.kubevirt.io/v1alpha1
kind: VirtualMachinePreference
metadata:
name: metadata
annotations:
tags: "hidden,kubevirt,ubuntu"
iconClass: "icon-ubuntu"
openshift.io/display-name: "Ubuntu"
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- ../base

components:
- ./metadata

nameSuffix: ".10"
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component
patches:
- path: ./metadata.yaml
target:
kind: VirtualMachinePreference
- path: ./metadata.yaml
target:
kind: VirtualMachineClusterPreference
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
apiVersion: instancetype.kubevirt.io/v1alpha1
kind: VirtualMachinePreference
metadata:
name: metadata
annotations:
openshift.io/display-name: "Microsoft Windows 10"
Loading

0 comments on commit d1fc7ca

Please sign in to comment.