-
Notifications
You must be signed in to change notification settings - Fork 7
Update Machine Instances and Templates OCP+V #27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
10e04eb
dcb16b4
c3503ad
50724de
62a1438
9d447fb
b48f3d5
658bbcf
5e65b51
56869f0
868568c
8210393
baba93b
261b30c
ddd39d2
581bbb5
84a8fad
5620292
5ef3f47
70496fa
1a98ba2
6d394d3
c8b44ef
ec7d794
1833d51
8481e11
6076952
3eb987a
0bf8f2f
706177b
e81deae
c05e78a
cce2a51
cd67bed
e34ff0b
32b1843
64ca573
7e531d5
dff561c
c5251b7
37e1a2e
469cd57
200d849
f60707c
1fba21b
3c82aae
ee67f1f
a01f23f
1b9bf3f
adb1d12
2ac6bb0
ac9ec6a
b35ab3f
0fbcb96
f2689f8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| apiVersion: instancetype.kubevirt.io/v1beta1 | ||
| kind: VirtualMachineClusterInstancetype | ||
| metadata: | ||
| name: custom-rhel-broadwell-instancetype | ||
| spec: | ||
| cpu: | ||
| guest: 2 | ||
| model: "Broadwell-v4" | ||
| memory: | ||
| guest: "4Gi" | ||
| nodeSelector: | ||
| usage-broadwell: "yes" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| apiVersion: instancetype.kubevirt.io/v1beta1 | ||
| kind: VirtualMachineClusterInstancetype | ||
| metadata: | ||
| name: custom-rhel-haswell-instancetype | ||
| spec: | ||
| cpu: | ||
| guest: 2 | ||
| model: "Haswell-v4" | ||
| memory: | ||
| guest: "4Gi" | ||
| nodeSelector: | ||
| usage-haswell: "yes" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as above. But different label:
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, like you said |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
|
|
||
| apiVersion: cdi.kubevirt.io/v1beta1 | ||
| kind: DataSource | ||
| metadata: | ||
| name: custom-rhel10-broadwell | ||
| namespace: custom-os-images | ||
| annotations: | ||
| virt.kubevirt.io/os-display-name: "RHEL 10 Custom (Broadwell)" | ||
| labels: | ||
| app.kubernetes.io/component: storage | ||
| kubevirt.io/dynamic-credentials-support: "true" | ||
| os.template.kubevirt.io/rhel10: "true" | ||
| instancetype.kubevirt.io/default-instancetype: rhel-broadwell-instancetype | ||
| instancetype.kubevirt.io/default-instancetype-kind: VirtualMachineClusterInstancetype | ||
| spec: | ||
| source: | ||
| pvc: | ||
| name: rhel10-clean-base | ||
| namespace: custom-os-images |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| apiVersion: cdi.kubevirt.io/v1beta1 | ||
| kind: DataSource | ||
| metadata: | ||
| name: custom-rhel10-haswell | ||
| namespace: custom-os-images | ||
| annotations: | ||
| virt.kubevirt.io/os-display-name: "RHEL 10 Custom (Haswell)" | ||
| labels: | ||
| app.kubernetes.io/component: storage | ||
| kubevirt.io/dynamic-credentials-support: "true" | ||
| os.template.kubevirt.io/rhel10: "true" | ||
| instancetype.kubevirt.io/default-instancetype: rhel-haswell-instancetype | ||
| instancetype.kubevirt.io/default-instancetype-kind: VirtualMachineClusterInstancetype | ||
| spec: | ||
| source: | ||
| pvc: | ||
| name: rhel10-clean-base | ||
| namespace: custom-os-images |
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do we not use the DataSource: It's based on You mentioned it in the call, but I forgot it.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wanted to have a new one since we had trouble with the metadata in the Original RHEL10 in connection with the SSP Operator. Furthermore, as you remember - we discussed to push all the customize stuff also in a new NS - "custom-os-images" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| apiVersion: cdi.kubevirt.io/v1beta1 | ||
| kind: DataVolume | ||
| metadata: | ||
| name: rhel10-clean-base | ||
| namespace: custom-os-images | ||
| spec: | ||
| source: | ||
| registry: | ||
| url: "docker://registry.redhat.io/rhel10/rhel-guest-image:latest" | ||
| secretRef: redhat-registry-credentials | ||
| storage: | ||
| storageClassName: coe-netapp-san | ||
| accessModes: | ||
| - ReadWriteMany | ||
| resources: | ||
| requests: | ||
| storage: 30Gi |
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as above: Why do we not use the DataSource:
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. above - the ds - we need another set of Metadata - look in the Issue 312 please, there I was suppose to document. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| apiVersion: cdi.kubevirt.io/v1beta1 | ||
| kind: DataSource | ||
| metadata: | ||
| name: custom-rhel10-broadwell | ||
| namespace: custom-os-images | ||
| annotations: | ||
| virt.kubevirt.io/os-display-name: "RHEL 10 Custom (Broadwell)" | ||
| labels: | ||
| app.kubernetes.io/component: storage | ||
| kubevirt.io/dynamic-credentials-support: "true" | ||
| os.template.kubevirt.io/rhel10: "true" | ||
| instancetype.kubevirt.io/default-instancetype: rhel-broadwell-instancetype | ||
| instancetype.kubevirt.io/default-instancetype-kind: VirtualMachineClusterInstancetype | ||
| spec: | ||
| source: | ||
| pvc: | ||
| name: rhel10-clean-base | ||
| namespace: custom-os-images |
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as above but for rhel9
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. above - the ds - we need another set of Metadata - look in the Issue 312 please, there I was suppose to document. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| apiVersion: cdi.kubevirt.io/v1beta1 | ||
| kind: DataSource | ||
| metadata: | ||
| name: custom-rhel9-haswell | ||
| namespace: custom-os-images | ||
| annotations: | ||
| virt.kubevirt.io/os-display-name: "RHEL 9 Custom (Haswell)" | ||
| labels: | ||
| app.kubernetes.io/component: storage | ||
| kubevirt.io/dynamic-credentials-support: "true" | ||
| os.template.kubevirt.io/rhel9: "true" | ||
| instancetype.kubevirt.io/default-instancetype: "rhel-haswell-instancetype" | ||
| instancetype.kubevirt.io/default-instancetype-kind: "VirtualMachineClusterInstancetype" | ||
| spec: | ||
| source: | ||
| pvc: | ||
| name: rhel9-clean-base | ||
| namespace: custom-os-images |
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as above but for rhel9
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. above - the ds - we need another set of Metadata - look in the Issue 312 please, there I was suppose to document. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| apiVersion: cdi.kubevirt.io/v1beta1 | ||
| kind: DataVolume | ||
| metadata: | ||
| name: rhel9-clean-base | ||
| namespace: custom-os-images | ||
| spec: | ||
| source: | ||
| registry: | ||
| url: "docker://registry.redhat.io/rhel9/rhel-guest-image:latest" | ||
| secretRef: redhat-registry-credentials | ||
| storage: | ||
| storageClassName: coe-netapp-san | ||
| accessModes: | ||
| - ReadWriteMany | ||
| resources: | ||
| requests: | ||
| storage: 30Gi |
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not needed if we use the provided rhel9/10 images.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We discussed to push all the customize stuff also in a new NS - "custom-os-images"
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But I forgot what is custom on that image?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe nothing, just wanted to make absolutely sure that we does not get any interference using images from the openshift-virtualization-os-images NS so that the SSP Operator maybe does not overwrite anything. So, we might change this again to the default image in the ds files:
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But we should keep all other resources in the new NS "custom-os-images"- apart from the dv's. simply for clean separation
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would prefer to use the What is recommend from RH adding own images into
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We might as well put it in openshift-virtualization-os-images. This was just our call - where we wanted to strictly distinguish between custom images and default images - even so it is the same, just to able to differ them visually. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| --- | ||
| apiVersion: v1 | ||
| kind: Namespace | ||
| metadata: | ||
| name: custom-os-images | ||
| labels: | ||
| openshift.io/cluster-monitoring: "true" | ||
| --- | ||
| apiVersion: rbac.authorization.k8s.io/v1 | ||
| kind: RoleBinding | ||
| metadata: | ||
| name: all-user-view-images | ||
| namespace: custom-os-images | ||
| roleRef: | ||
| apiGroup: rbac.authorization.k8s.io | ||
| kind: ClusterRole | ||
| name: view | ||
| subjects: | ||
| - kind: Group | ||
| name: system:authenticated | ||
| apiGroup: rbac.authorization.k8s.io | ||
| --- | ||
| apiVersion: rbac.authorization.k8s.io/v1 | ||
| kind: RoleBinding | ||
| metadata: | ||
| name: cdi-image-puller | ||
| namespace: custom-os-images | ||
| roleRef: | ||
| apiGroup: rbac.authorization.k8s.io | ||
| kind: ClusterRole | ||
| name: system:image-puller | ||
| subjects: | ||
| - kind: ServiceAccount | ||
| name: cdi-sa | ||
| namespace: openshift-cnv |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,3 +8,5 @@ resources: | |
| #- OperatorGroup.yaml | ||
| #- Subscription.yaml | ||
| - MigrationPolicy/ | ||
| - instancetypes/ | ||
| - templates/ | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,104 @@ | ||
| kind: Template | ||
| apiVersion: template.openshift.io/v1 | ||
| metadata: | ||
| name: custom-rhel10-broadwell | ||
| namespace: openshift | ||
| labels: | ||
| app.kubernetes.io/name: custom-templates | ||
| flavor.template.kubevirt.io/medium: 'true' | ||
| os.template.kubevirt.io/rhel10.0: 'true' | ||
| template.kubevirt.io/architecture: amd64 | ||
| template.kubevirt.io/type: vm | ||
| vm.kubevirt.io/template: custom-rhel10-broadwell | ||
| vm.kubevirt.io/template.namespace: openshift | ||
| workload.template.kubevirt.io/server: 'true' | ||
| annotations: | ||
| description: RHEL 10 Template using the existing rhel10 VolumeSnapshot DataSource. | ||
| iconClass: icon-rhel | ||
| openshift.io/display-name: Red Hat Enterprise Linux 10 (Broadwell-v4) | ||
| openshift.io/provider-display-name: '' | ||
| tags: 'kubevirt,virtualmachine,rhel,rhel10' | ||
| template.kubevirt.io/provider: '' | ||
| objects: | ||
| - apiVersion: kubevirt.io/v1 | ||
| kind: VirtualMachine | ||
| metadata: | ||
| labels: | ||
| app: '${NAME}' | ||
| vm.kubevirt.io/template: custom-rhel10-broadwell | ||
| vm.kubevirt.io/template.namespace: openshift | ||
| name: '${NAME}' | ||
| spec: | ||
| dataVolumeTemplates: | ||
| - apiVersion: cdi.kubevirt.io/v1beta1 | ||
| kind: DataVolume | ||
| metadata: | ||
| name: '${NAME}' | ||
| spec: | ||
| sourceRef: | ||
| kind: DataSource | ||
| name: rhel10 | ||
| namespace: openshift-virtualization-os-images | ||
| storage: | ||
| resources: | ||
| requests: | ||
| storage: 30Gi | ||
| runStrategy: Halted | ||
| template: | ||
| metadata: | ||
| labels: | ||
| kubevirt.io/domain: '${NAME}' | ||
| spec: | ||
| affinity: | ||
| nodeAffinity: | ||
| requiredDuringSchedulingIgnoredDuringExecution: | ||
| nodeSelectorTerms: | ||
| - matchExpressions: | ||
| - key: kubernetes.io/hostname | ||
| operator: In | ||
| values: | ||
| - storm5 | ||
| - storm6 | ||
| matchFields: [] | ||
| domain: | ||
| cpu: | ||
| cores: 1 | ||
| sockets: 1 | ||
| threads: 1 | ||
| model: Broadwell-v4 | ||
| devices: | ||
| disks: | ||
| - disk: | ||
| bus: virtio | ||
| name: rootdisk | ||
| - disk: | ||
| bus: virtio | ||
| name: cloudinitdisk | ||
| interfaces: | ||
| - masquerade: {} | ||
| model: virtio | ||
| name: default | ||
| memory: | ||
| guest: 4Gi | ||
| networks: | ||
| - name: default | ||
| pod: {} | ||
| volumes: | ||
| - dataVolume: | ||
| name: '${NAME}' | ||
| name: rootdisk | ||
| - cloudInitNoCloud: | ||
| userData: |- | ||
| #cloud-config | ||
| user: cloud-user | ||
| password: ${CLOUD_USER_PASSWORD} | ||
| name: cloudinitdisk | ||
| parameters: | ||
| - name: NAME | ||
| description: Name for the new VM | ||
| generate: expression | ||
| from: 'rhel10-[a-z0-9]{6}' | ||
| - name: CLOUD_USER_PASSWORD | ||
| description: Password for cloud-user | ||
| generate: expression | ||
| from: '[a-z0-9]{8}' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Who created the label at the node?
It's not defined here: https://github.com/stormshift/clusters/blob/main/configuration/overlays/isar/cluster-scope/Node/storm6.yaml
Additionally, why not use the kubevirt one:
cpu-model.node.kubevirt.io/Broadwell-v4There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, using the kubevirt one.
cpu-model.node.kubevirt.io/Broadwell-v4=true
I# going to change that in the files, same for haswell